br_danfe 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/README.md +12 -0
  4. data/lib/br_danfe/danfe.rb +4 -1
  5. data/lib/br_danfe/danfe_lib/det_body.rb +6 -5
  6. data/lib/br_danfe/danfe_lib/options.rb +3 -1
  7. data/lib/br_danfe/version.rb +1 -1
  8. data/spec/features/danfe_spec.rb +20 -0
  9. data/spec/fixtures/cce/lib/barcode#render.pdf +511 -0
  10. data/spec/fixtures/cce/lib/correction#render.pdf +100 -0
  11. data/spec/fixtures/cce/lib/document#box.pdf +55 -0
  12. data/spec/fixtures/cce/lib/document#box.with.block.pdf +72 -0
  13. data/spec/fixtures/cce/lib/document#text.align.pdf +70 -0
  14. data/spec/fixtures/cce/lib/document#text.pad.pdf +70 -0
  15. data/spec/fixtures/cce/lib/document#text.simple.pdf +70 -0
  16. data/spec/fixtures/cce/lib/document#text.size.pdf +70 -0
  17. data/spec/fixtures/cce/lib/document#text.style.pdf +70 -0
  18. data/spec/fixtures/cce/lib/footer#render.pdf +114 -0
  19. data/spec/fixtures/cce/lib/header#render.pdf +72 -0
  20. data/spec/fixtures/cce/lib/nfe_key#render.pdf +88 -0
  21. data/spec/fixtures/cce/lib/protocol#render.pdf +88 -0
  22. data/spec/fixtures/cce/v1.00/cce.fixture.pdf +659 -0
  23. data/spec/fixtures/nfe/lib/dest#render-v2.00.pdf +271 -0
  24. data/spec/fixtures/nfe/lib/dest#render-v3.10.pdf +271 -0
  25. data/spec/fixtures/nfe/lib/dest#render-with_cnpj.pdf +201 -0
  26. data/spec/fixtures/nfe/lib/dest#render-with_cpf.pdf +201 -0
  27. data/spec/fixtures/nfe/lib/dest#render-with_ie.pdf +208 -0
  28. data/spec/fixtures/nfe/lib/det_body#render-csosn.pdf +855 -0
  29. data/spec/fixtures/nfe/lib/det_body#render-cst.pdf +512 -0
  30. data/spec/fixtures/nfe/lib/det_body#render-fci.pdf +267 -0
  31. data/spec/fixtures/nfe/lib/det_body#render-icms_st.pdf +267 -0
  32. data/spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf +246 -0
  33. data/spec/fixtures/nfe/lib/det_body#render-unit_price_with_custom_precision.pdf +246 -0
  34. data/spec/fixtures/nfe/lib/det_header#render.pdf +207 -0
  35. data/spec/fixtures/nfe/lib/document#lcnpj-blank.pdf +74 -0
  36. data/spec/fixtures/nfe/lib/document#lcnpj-invalid.pdf +74 -0
  37. data/spec/fixtures/nfe/lib/document#lcnpj-valid.pdf +81 -0
  38. data/spec/fixtures/nfe/lib/document#lie-blank.pdf +74 -0
  39. data/spec/fixtures/nfe/lib/document#lie-invalid.pdf +74 -0
  40. data/spec/fixtures/nfe/lib/document#lie-valid.pdf +81 -0
  41. data/spec/fixtures/nfe/lib/dup#render.pdf +216 -0
  42. data/spec/fixtures/nfe/lib/emit#render.pdf +143 -0
  43. data/spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf +712 -0
  44. data/spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf +650 -0
  45. data/spec/fixtures/nfe/lib/icmstot#render.pdf +255 -0
  46. data/spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf +295 -0
  47. data/spec/fixtures/nfe/lib/infadic#render.pdf +104 -0
  48. data/spec/fixtures/nfe/lib/issqn#render.pdf +143 -0
  49. data/spec/fixtures/nfe/lib/ticket#render.pdf +113 -0
  50. data/spec/fixtures/nfe/lib/transp#render-modfrete_0.pdf +176 -0
  51. data/spec/fixtures/nfe/lib/transp#render-modfrete_1.pdf +176 -0
  52. data/spec/fixtures/nfe/lib/transp#render-modfrete_2.pdf +176 -0
  53. data/spec/fixtures/nfe/lib/transp#render-modfrete_9.pdf +176 -0
  54. data/spec/fixtures/nfe/lib/transp#render.pdf +239 -0
  55. data/spec/fixtures/nfe/lib/vol#render-blank-boxes.pdf +117 -0
  56. data/spec/fixtures/nfe/lib/vol#render.pdf +152 -0
  57. data/spec/fixtures/nfe/v2.00/custom_options.fixture.pdf +1994 -0
  58. data/spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml.fixture.pdf +1932 -0
  59. data/spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml.fixture.pdf +5207 -0
  60. data/spec/fixtures/nfe/v2.00/nfe_with_fci.xml.fixture.pdf +1980 -0
  61. data/spec/fixtures/nfe/v2.00/nfe_with_ns.xml.fixture.pdf +5032 -0
  62. data/spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf +2314 -0
  63. data/spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf +2807 -0
  64. data/spec/lib/danfe_lib/det_body_spec.rb +80 -2
  65. data/spec/lib/danfe_lib/options_spec.rb +8 -1
  66. metadata +30 -2
@@ -0,0 +1,246 @@
1
+ %PDF-1.3
2
+ %����
3
+ 1 0 obj
4
+ << /Creator <feff0050007200610077006e>
5
+ /Producer <feff0050007200610077006e>
6
+ >>
7
+ endobj
8
+ 2 0 obj
9
+ << /Type /Catalog
10
+ /Pages 3 0 R
11
+ >>
12
+ endobj
13
+ 3 0 obj
14
+ << /Type /Pages
15
+ /Count 1
16
+ /Kids [5 0 R]
17
+ >>
18
+ endobj
19
+ 4 0 obj
20
+ << /Length 2304
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ [0.3 0.6] 0 d
26
+ 0.3 w
27
+ /DeviceRGB CS
28
+ 0.000 0.000 0.000 SCN
29
+ 21.260 311.887 m
30
+ 63.780 311.887 l
31
+ S
32
+ [ ] 0 d
33
+ 0.3 w
34
+ 0.000 0.000 0.000 SCN
35
+
36
+ BT
37
+ 23.25984251968504 315.18567716535443 Td
38
+ /F1.0 6 Tf
39
+ [<33>] TJ
40
+ ET
41
+
42
+ [0.3 0.6] 0 d
43
+ 0.3 w
44
+ 0.000 0.000 0.000 SCN
45
+ 63.780 311.887 m
46
+ 188.504 311.887 l
47
+ S
48
+ [ ] 0 d
49
+ 0.3 w
50
+ 0.000 0.000 0.000 SCN
51
+
52
+ BT
53
+ 65.77952755905513 315.18567716535443 Td
54
+ /F1.0 6 Tf
55
+ [<50726f6475746f20436f6d2043736f736e20323031202d2049434d53205354>] TJ
56
+ ET
57
+
58
+ [0.3 0.6] 0 d
59
+ 0.3 w
60
+ 0.000 0.000 0.000 SCN
61
+ 188.504 311.887 m
62
+ 225.354 311.887 l
63
+ S
64
+ [ ] 0 d
65
+ 0.3 w
66
+ 0.000 0.000 0.000 SCN
67
+
68
+ BT
69
+ 190.50393700787401 315.18567716535443 Td
70
+ /F1.0 6 Tf
71
+ [<3435363738393031>] TJ
72
+ ET
73
+
74
+ [0.3 0.6] 0 d
75
+ 0.3 w
76
+ 0.000 0.000 0.000 SCN
77
+ 225.354 311.887 m
78
+ 248.031 311.887 l
79
+ S
80
+ [ ] 0 d
81
+ 0.3 w
82
+ 0.000 0.000 0.000 SCN
83
+ [0.3 0.6] 0 d
84
+ 0.3 w
85
+ 0.000 0.000 0.000 SCN
86
+ 248.031 311.887 m
87
+ 276.378 311.887 l
88
+ S
89
+ [ ] 0 d
90
+ 0.3 w
91
+ 0.000 0.000 0.000 SCN
92
+
93
+ BT
94
+ 250.03149606299212 315.18567716535443 Td
95
+ /F1.0 6 Tf
96
+ [<35343031>] TJ
97
+ ET
98
+
99
+ [0.3 0.6] 0 d
100
+ 0.3 w
101
+ 0.000 0.000 0.000 SCN
102
+ 276.378 311.887 m
103
+ 304.724 311.887 l
104
+ S
105
+ [ ] 0 d
106
+ 0.3 w
107
+ 0.000 0.000 0.000 SCN
108
+
109
+ BT
110
+ 278.37795275590554 315.18567716535443 Td
111
+ /F1.0 6 Tf
112
+ [<554e>] TJ
113
+ ET
114
+
115
+ [0.3 0.6] 0 d
116
+ 0.3 w
117
+ 0.000 0.000 0.000 SCN
118
+ 304.724 311.887 m
119
+ 341.575 311.887 l
120
+ S
121
+ [ ] 0 d
122
+ 0.3 w
123
+ 0.000 0.000 0.000 SCN
124
+
125
+ BT
126
+ 324.0748031496063 315.18567716535443 Td
127
+ /F1.0 6 Tf
128
+ [<362c34353435>] TJ
129
+ ET
130
+
131
+ [0.3 0.6] 0 d
132
+ 0.3 w
133
+ 0.000 0.000 0.000 SCN
134
+ 341.575 311.887 m
135
+ 384.094 311.887 l
136
+ S
137
+ [ ] 0 d
138
+ 0.3 w
139
+ 0.000 0.000 0.000 SCN
140
+
141
+ BT
142
+ 372.5944881889764 315.18567716535443 Td
143
+ /F1.0 6 Tf
144
+ [<312c3033>] TJ
145
+ ET
146
+
147
+ [0.3 0.6] 0 d
148
+ 0.3 w
149
+ 0.000 0.000 0.000 SCN
150
+ 384.094 311.887 m
151
+ 426.614 311.887 l
152
+ S
153
+ [ ] 0 d
154
+ 0.3 w
155
+ 0.000 0.000 0.000 SCN
156
+
157
+ BT
158
+ 415.1141732283465 315.18567716535443 Td
159
+ /F1.0 6 Tf
160
+ [<362c3635>] TJ
161
+ ET
162
+
163
+ [0.3 0.6] 0 d
164
+ 0.3 w
165
+ 0.000 0.000 0.000 SCN
166
+ 426.614 311.887 m
167
+ 469.134 311.887 l
168
+ S
169
+ [ ] 0 d
170
+ 0.3 w
171
+ 0.000 0.000 0.000 SCN
172
+ [0.3 0.6] 0 d
173
+ 0.3 w
174
+ 0.000 0.000 0.000 SCN
175
+ 469.134 311.887 m
176
+ 497.480 311.887 l
177
+ S
178
+ [ ] 0 d
179
+ 0.3 w
180
+ 0.000 0.000 0.000 SCN
181
+ [0.3 0.6] 0 d
182
+ 0.3 w
183
+ 0.000 0.000 0.000 SCN
184
+ 497.480 311.887 m
185
+ 525.827 311.887 l
186
+ S
187
+ [ ] 0 d
188
+ 0.3 w
189
+ 0.000 0.000 0.000 SCN
190
+ [0.3 0.6] 0 d
191
+ 0.3 w
192
+ 0.000 0.000 0.000 SCN
193
+ 525.827 311.887 m
194
+ 551.339 311.887 l
195
+ S
196
+ [ ] 0 d
197
+ 0.3 w
198
+ 0.000 0.000 0.000 SCN
199
+ [0.3 0.6] 0 d
200
+ 0.3 w
201
+ 0.000 0.000 0.000 SCN
202
+ 551.339 311.887 m
203
+ 575.717 311.887 l
204
+ S
205
+ [ ] 0 d
206
+ 0.3 w
207
+ 0.000 0.000 0.000 SCN
208
+ Q
209
+
210
+ endstream
211
+ endobj
212
+ 5 0 obj
213
+ << /Type /Page
214
+ /Parent 3 0 R
215
+ /MediaBox [0 0 595.28 841.89]
216
+ /Contents 4 0 R
217
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
218
+ /Font << /F1.0 6 0 R
219
+ >>
220
+ >>
221
+ >>
222
+ endobj
223
+ 6 0 obj
224
+ << /Type /Font
225
+ /Subtype /Type1
226
+ /BaseFont /Times-Roman
227
+ /Encoding /WinAnsiEncoding
228
+ >>
229
+ endobj
230
+ xref
231
+ 0 7
232
+ 0000000000 65535 f
233
+ 0000000015 00000 n
234
+ 0000000109 00000 n
235
+ 0000000158 00000 n
236
+ 0000000215 00000 n
237
+ 0000002571 00000 n
238
+ 0000002751 00000 n
239
+ trailer
240
+ << /Size 7
241
+ /Root 2 0 R
242
+ /Info 1 0 R
243
+ >>
244
+ startxref
245
+ 2850
246
+ %%EOF
@@ -0,0 +1,246 @@
1
+ %PDF-1.3
2
+ %����
3
+ 1 0 obj
4
+ << /Creator <feff0050007200610077006e>
5
+ /Producer <feff0050007200610077006e>
6
+ >>
7
+ endobj
8
+ 2 0 obj
9
+ << /Type /Catalog
10
+ /Pages 3 0 R
11
+ >>
12
+ endobj
13
+ 3 0 obj
14
+ << /Type /Pages
15
+ /Count 1
16
+ /Kids [5 0 R]
17
+ >>
18
+ endobj
19
+ 4 0 obj
20
+ << /Length 2304
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ [0.3 0.6] 0 d
26
+ 0.3 w
27
+ /DeviceRGB CS
28
+ 0.000 0.000 0.000 SCN
29
+ 21.260 311.887 m
30
+ 63.780 311.887 l
31
+ S
32
+ [ ] 0 d
33
+ 0.3 w
34
+ 0.000 0.000 0.000 SCN
35
+
36
+ BT
37
+ 23.25984251968504 315.18567716535443 Td
38
+ /F1.0 6 Tf
39
+ [<33>] TJ
40
+ ET
41
+
42
+ [0.3 0.6] 0 d
43
+ 0.3 w
44
+ 0.000 0.000 0.000 SCN
45
+ 63.780 311.887 m
46
+ 188.504 311.887 l
47
+ S
48
+ [ ] 0 d
49
+ 0.3 w
50
+ 0.000 0.000 0.000 SCN
51
+
52
+ BT
53
+ 65.77952755905513 315.18567716535443 Td
54
+ /F1.0 6 Tf
55
+ [<50726f6475746f20436f6d2043736f736e20323031202d2049434d53205354>] TJ
56
+ ET
57
+
58
+ [0.3 0.6] 0 d
59
+ 0.3 w
60
+ 0.000 0.000 0.000 SCN
61
+ 188.504 311.887 m
62
+ 225.354 311.887 l
63
+ S
64
+ [ ] 0 d
65
+ 0.3 w
66
+ 0.000 0.000 0.000 SCN
67
+
68
+ BT
69
+ 190.50393700787401 315.18567716535443 Td
70
+ /F1.0 6 Tf
71
+ [<3435363738393031>] TJ
72
+ ET
73
+
74
+ [0.3 0.6] 0 d
75
+ 0.3 w
76
+ 0.000 0.000 0.000 SCN
77
+ 225.354 311.887 m
78
+ 248.031 311.887 l
79
+ S
80
+ [ ] 0 d
81
+ 0.3 w
82
+ 0.000 0.000 0.000 SCN
83
+ [0.3 0.6] 0 d
84
+ 0.3 w
85
+ 0.000 0.000 0.000 SCN
86
+ 248.031 311.887 m
87
+ 276.378 311.887 l
88
+ S
89
+ [ ] 0 d
90
+ 0.3 w
91
+ 0.000 0.000 0.000 SCN
92
+
93
+ BT
94
+ 250.03149606299212 315.18567716535443 Td
95
+ /F1.0 6 Tf
96
+ [<35343031>] TJ
97
+ ET
98
+
99
+ [0.3 0.6] 0 d
100
+ 0.3 w
101
+ 0.000 0.000 0.000 SCN
102
+ 276.378 311.887 m
103
+ 304.724 311.887 l
104
+ S
105
+ [ ] 0 d
106
+ 0.3 w
107
+ 0.000 0.000 0.000 SCN
108
+
109
+ BT
110
+ 278.37795275590554 315.18567716535443 Td
111
+ /F1.0 6 Tf
112
+ [<554e>] TJ
113
+ ET
114
+
115
+ [0.3 0.6] 0 d
116
+ 0.3 w
117
+ 0.000 0.000 0.000 SCN
118
+ 304.724 311.887 m
119
+ 341.575 311.887 l
120
+ S
121
+ [ ] 0 d
122
+ 0.3 w
123
+ 0.000 0.000 0.000 SCN
124
+
125
+ BT
126
+ 330.0748031496063 315.18567716535443 Td
127
+ /F1.0 6 Tf
128
+ [<362c3030>] TJ
129
+ ET
130
+
131
+ [0.3 0.6] 0 d
132
+ 0.3 w
133
+ 0.000 0.000 0.000 SCN
134
+ 341.575 311.887 m
135
+ 384.094 311.887 l
136
+ S
137
+ [ ] 0 d
138
+ 0.3 w
139
+ 0.000 0.000 0.000 SCN
140
+
141
+ BT
142
+ 366.5944881889764 315.18567716535443 Td
143
+ /F1.0 6 Tf
144
+ [<312c31333132>] TJ
145
+ ET
146
+
147
+ [0.3 0.6] 0 d
148
+ 0.3 w
149
+ 0.000 0.000 0.000 SCN
150
+ 384.094 311.887 m
151
+ 426.614 311.887 l
152
+ S
153
+ [ ] 0 d
154
+ 0.3 w
155
+ 0.000 0.000 0.000 SCN
156
+
157
+ BT
158
+ 415.1141732283465 315.18567716535443 Td
159
+ /F1.0 6 Tf
160
+ [<362c3739>] TJ
161
+ ET
162
+
163
+ [0.3 0.6] 0 d
164
+ 0.3 w
165
+ 0.000 0.000 0.000 SCN
166
+ 426.614 311.887 m
167
+ 469.134 311.887 l
168
+ S
169
+ [ ] 0 d
170
+ 0.3 w
171
+ 0.000 0.000 0.000 SCN
172
+ [0.3 0.6] 0 d
173
+ 0.3 w
174
+ 0.000 0.000 0.000 SCN
175
+ 469.134 311.887 m
176
+ 497.480 311.887 l
177
+ S
178
+ [ ] 0 d
179
+ 0.3 w
180
+ 0.000 0.000 0.000 SCN
181
+ [0.3 0.6] 0 d
182
+ 0.3 w
183
+ 0.000 0.000 0.000 SCN
184
+ 497.480 311.887 m
185
+ 525.827 311.887 l
186
+ S
187
+ [ ] 0 d
188
+ 0.3 w
189
+ 0.000 0.000 0.000 SCN
190
+ [0.3 0.6] 0 d
191
+ 0.3 w
192
+ 0.000 0.000 0.000 SCN
193
+ 525.827 311.887 m
194
+ 551.339 311.887 l
195
+ S
196
+ [ ] 0 d
197
+ 0.3 w
198
+ 0.000 0.000 0.000 SCN
199
+ [0.3 0.6] 0 d
200
+ 0.3 w
201
+ 0.000 0.000 0.000 SCN
202
+ 551.339 311.887 m
203
+ 575.717 311.887 l
204
+ S
205
+ [ ] 0 d
206
+ 0.3 w
207
+ 0.000 0.000 0.000 SCN
208
+ Q
209
+
210
+ endstream
211
+ endobj
212
+ 5 0 obj
213
+ << /Type /Page
214
+ /Parent 3 0 R
215
+ /MediaBox [0 0 595.28 841.89]
216
+ /Contents 4 0 R
217
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
218
+ /Font << /F1.0 6 0 R
219
+ >>
220
+ >>
221
+ >>
222
+ endobj
223
+ 6 0 obj
224
+ << /Type /Font
225
+ /Subtype /Type1
226
+ /BaseFont /Times-Roman
227
+ /Encoding /WinAnsiEncoding
228
+ >>
229
+ endobj
230
+ xref
231
+ 0 7
232
+ 0000000000 65535 f
233
+ 0000000015 00000 n
234
+ 0000000109 00000 n
235
+ 0000000158 00000 n
236
+ 0000000215 00000 n
237
+ 0000002571 00000 n
238
+ 0000002751 00000 n
239
+ trailer
240
+ << /Size 7
241
+ /Root 2 0 R
242
+ /Info 1 0 R
243
+ >>
244
+ startxref
245
+ 2850
246
+ %%EOF