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,255 @@
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 2578
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 21.25984251968504 475.260409448819 Td
28
+ /F2.0 8 Tf
29
+ [<43c14c43554c4f20444f20494d504f5354> 18 <4f>] TJ
30
+ ET
31
+
32
+ 21.260 450.142 100.913 22.677 re
33
+ S
34
+
35
+ BT
36
+ 23.25984251968504 466.7208976377954 Td
37
+ /F1.0 6 Tf
38
+ [<42> 35 <4153452044452043c14c43554c4f20444f2049434d53>] TJ
39
+ ET
40
+
41
+
42
+ BT
43
+ 102.67322834645671 452.98889763779545 Td
44
+ /F1.0 10 Tf
45
+ [<312c3233>] TJ
46
+ ET
47
+
48
+ 122.173 450.142 115.087 22.677 re
49
+ S
50
+
51
+ BT
52
+ 124.1732283464567 466.7208976377954 Td
53
+ /F1.0 6 Tf
54
+ [<56> 135 <414c4f5220444f2049434d53>] TJ
55
+ ET
56
+
57
+
58
+ BT
59
+ 217.75984251968504 452.98889763779545 Td
60
+ /F1.0 10 Tf
61
+ [<322c3334>] TJ
62
+ ET
63
+
64
+ 237.260 450.142 115.087 22.677 re
65
+ S
66
+
67
+ BT
68
+ 239.25984251968504 466.7208976377954 Td
69
+ /F1.0 6 Tf
70
+ [<42> 35 <4153452044452043c14c43554c4f20444f2049434d53205354>] TJ
71
+ ET
72
+
73
+
74
+ BT
75
+ 332.84645669291336 452.98889763779545 Td
76
+ /F1.0 10 Tf
77
+ [<332c3435>] TJ
78
+ ET
79
+
80
+ 352.346 450.142 115.087 22.677 re
81
+ S
82
+
83
+ BT
84
+ 354.3464566929134 466.7208976377954 Td
85
+ /F1.0 6 Tf
86
+ [<56> 135 <414c4f5220444f2049434d53205354>] TJ
87
+ ET
88
+
89
+
90
+ BT
91
+ 447.93307086614175 452.98889763779545 Td
92
+ /F1.0 10 Tf
93
+ [<342c3536>] TJ
94
+ ET
95
+
96
+ 467.433 450.142 108.283 22.677 re
97
+ S
98
+
99
+ BT
100
+ 469.4330708661417 466.7208976377954 Td
101
+ /F1.0 6 Tf
102
+ [<56> 135 <414c4f522054> 18 <4f> 40 <54> 93 <414c20444f53205052> 40 <4f445554> 18 <4f53>] TJ
103
+ ET
104
+
105
+
106
+ BT
107
+ 556.2165354330708 452.98889763779545 Td
108
+ /F1.0 10 Tf
109
+ [<352c3637>] TJ
110
+ ET
111
+
112
+ 21.260 427.465 72.283 22.677 re
113
+ S
114
+
115
+ BT
116
+ 23.25984251968504 444.04373228346464 Td
117
+ /F1.0 6 Tf
118
+ [<56> 135 <414c4f5220444f204652455445>] TJ
119
+ ET
120
+
121
+
122
+ BT
123
+ 74.04330708661418 430.31173228346466 Td
124
+ /F1.0 10 Tf
125
+ [<362c3738>] TJ
126
+ ET
127
+
128
+ 93.543 427.465 86.457 22.677 re
129
+ S
130
+
131
+ BT
132
+ 95.54330708661418 444.04373228346464 Td
133
+ /F1.0 6 Tf
134
+ [<56> 135 <414c4f5220444f205345475552> 40 <4f>] TJ
135
+ ET
136
+
137
+
138
+ BT
139
+ 160.5 430.31173228346466 Td
140
+ /F1.0 10 Tf
141
+ [<372c3839>] TJ
142
+ ET
143
+
144
+ 180.000 427.465 86.173 22.677 re
145
+ S
146
+
147
+ BT
148
+ 182.00000000000003 444.04373228346464 Td
149
+ /F1.0 6 Tf
150
+ [<444553434f4e54> 18 <4f>] TJ
151
+ ET
152
+
153
+
154
+ BT
155
+ 246.6732283464567 430.31173228346466 Td
156
+ /F1.0 10 Tf
157
+ [<392c3031>] TJ
158
+ ET
159
+
160
+ 266.173 427.465 86.173 22.677 re
161
+ S
162
+
163
+ BT
164
+ 268.1732283464567 444.04373228346464 Td
165
+ /F1.0 6 Tf
166
+ [<4f5554524153204445535045534153>] TJ
167
+ ET
168
+
169
+
170
+ BT
171
+ 332.8464566929134 430.31173228346466 Td
172
+ /F1.0 10 Tf
173
+ [<312c3334>] TJ
174
+ ET
175
+
176
+ 352.346 427.465 115.087 22.677 re
177
+ S
178
+
179
+ BT
180
+ 354.3464566929134 444.04373228346464 Td
181
+ /F1.0 6 Tf
182
+ [<56> 135 <414c4f5220444f20495049>] TJ
183
+ ET
184
+
185
+
186
+ BT
187
+ 447.93307086614175 430.31173228346466 Td
188
+ /F1.0 10 Tf
189
+ [<302c3132>] TJ
190
+ ET
191
+
192
+ 467.433 427.465 108.283 22.677 re
193
+ S
194
+
195
+ BT
196
+ 469.4330708661417 444.04373228346464 Td
197
+ /F1.0 6 Tf
198
+ [<56> 135 <414c4f522054> 18 <4f> 40 <54> 93 <414c2044> 40 <41204e4f> 40 <54> 93 <41>] TJ
199
+ ET
200
+
201
+
202
+ BT
203
+ 556.2165354330708 430.31173228346466 Td
204
+ /F2.0 10 Tf
205
+ [<342c3335>] TJ
206
+ ET
207
+
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 << /F2.0 6 0 R
219
+ /F1.0 7 0 R
220
+ >>
221
+ >>
222
+ >>
223
+ endobj
224
+ 6 0 obj
225
+ << /Type /Font
226
+ /Subtype /Type1
227
+ /BaseFont /Times-Bold
228
+ /Encoding /WinAnsiEncoding
229
+ >>
230
+ endobj
231
+ 7 0 obj
232
+ << /Type /Font
233
+ /Subtype /Type1
234
+ /BaseFont /Times-Roman
235
+ /Encoding /WinAnsiEncoding
236
+ >>
237
+ endobj
238
+ xref
239
+ 0 8
240
+ 0000000000 65535 f
241
+ 0000000015 00000 n
242
+ 0000000109 00000 n
243
+ 0000000158 00000 n
244
+ 0000000215 00000 n
245
+ 0000002845 00000 n
246
+ 0000003037 00000 n
247
+ 0000003135 00000 n
248
+ trailer
249
+ << /Size 8
250
+ /Root 2 0 R
251
+ /Info 1 0 R
252
+ >>
253
+ startxref
254
+ 3234
255
+ %%EOF
@@ -0,0 +1,295 @@
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 2836
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 21.25984251968504 98.81946456692918 Td
28
+ /F2.0 8 Tf
29
+ [<44> 35 <41444f532041444943494f4e> 20 <414953>] TJ
30
+ ET
31
+
32
+ 21.260 21.543 352.913 75.118 re
33
+ S
34
+
35
+ BT
36
+ 23.25984251968504 90.56341732283484 Td
37
+ /F1.0 6 Tf
38
+ [<494e464f524d41> 40 <c7d5455320434f4d504c454d454e54> 93 <41524553>] TJ
39
+ ET
40
+
41
+
42
+ BT
43
+ 23.25984251968504 81.59287401574827 Td
44
+ /F1.0 5 Tf
45
+ [<434f4e54494e55> 40 <41> 40 <c7c3> 55 <4f205452414e53504f52> 60 <54> 93 <41444f522f56> 40 <4f4c554d4553205452414e53504f52> 60 <54> 93 <41444f53>] TJ
46
+ ET
47
+
48
+
49
+ BT
50
+ 23.25984251968504 77.45697637795283 Td
51
+ /F1.0 4 Tf
52
+ [<51> 10 <55> 40 <414e54> 74 <2e3a>] TJ
53
+ ET
54
+
55
+
56
+ BT
57
+ 31.480314960629926 77.45697637795283 Td
58
+ /F3.0 4 Tf
59
+ [<32>] TJ
60
+ ET
61
+
62
+
63
+ BT
64
+ 40.267716535433074 77.45697637795283 Td
65
+ /F1.0 4 Tf
66
+ [<455350> 111 <2e3a>] TJ
67
+ ET
68
+
69
+
70
+ BT
71
+ 51.60629921259843 77.45697637795283 Td
72
+ /F3.0 4 Tf
73
+ [<56> 30 <4f4c554d45532032>] TJ
74
+ ET
75
+
76
+
77
+ BT
78
+ 119.63779527559056 77.45697637795283 Td
79
+ /F1.0 4 Tf
80
+ [<4d415243413a>] TJ
81
+ ET
82
+
83
+
84
+ BT
85
+ 136.6456692913386 77.45697637795283 Td
86
+ /F3.0 4 Tf
87
+ [<4449564552534f532032>] TJ
88
+ ET
89
+
90
+
91
+ BT
92
+ 174.91338582677167 77.45697637795283 Td
93
+ /F1.0 4 Tf
94
+ [<4e554d2e3a>] TJ
95
+ ET
96
+
97
+
98
+ BT
99
+ 191.9212598425197 77.45697637795283 Td
100
+ /F3.0 4 Tf
101
+ [<32>] TJ
102
+ ET
103
+
104
+
105
+ BT
106
+ 200.42519685039372 77.45697637795283 Td
107
+ /F1.0 4 Tf
108
+ [<5045534f20422e3a>] TJ
109
+ ET
110
+
111
+
112
+ BT
113
+ 217.27559055118112 77.45697637795283 Td
114
+ /F3.0 4 Tf
115
+ [<322e3230302c303030>] TJ
116
+ ET
117
+
118
+
119
+ BT
120
+ 242.9448818897638 77.45697637795283 Td
121
+ /F1.0 4 Tf
122
+ [<5045534f204ccd512e3a>] TJ
123
+ ET
124
+
125
+
126
+ BT
127
+ 265.46456692913387 77.45697637795283 Td
128
+ /F3.0 4 Tf
129
+ [<322e3030302c303030>] TJ
130
+ ET
131
+
132
+
133
+ BT
134
+ 23.25984251968504 73.20500787401576 Td
135
+ /F1.0 4 Tf
136
+ [<51> 10 <55> 40 <414e54> 74 <2e3a>] TJ
137
+ ET
138
+
139
+
140
+ BT
141
+ 31.480314960629926 73.20500787401576 Td
142
+ /F3.0 4 Tf
143
+ [<33>] TJ
144
+ ET
145
+
146
+
147
+ BT
148
+ 40.267716535433074 73.20500787401576 Td
149
+ /F1.0 4 Tf
150
+ [<455350> 111 <2e3a>] TJ
151
+ ET
152
+
153
+
154
+ BT
155
+ 51.60629921259843 73.20500787401576 Td
156
+ /F3.0 4 Tf
157
+ [<56> 30 <4f4c554d45532033>] TJ
158
+ ET
159
+
160
+
161
+ BT
162
+ 119.63779527559056 73.20500787401576 Td
163
+ /F1.0 4 Tf
164
+ [<4d415243413a>] TJ
165
+ ET
166
+
167
+
168
+ BT
169
+ 136.6456692913386 73.20500787401576 Td
170
+ /F3.0 4 Tf
171
+ [<4449564552534f532033>] TJ
172
+ ET
173
+
174
+
175
+ BT
176
+ 174.91338582677167 73.20500787401576 Td
177
+ /F1.0 4 Tf
178
+ [<4e554d2e3a>] TJ
179
+ ET
180
+
181
+
182
+ BT
183
+ 191.9212598425197 73.20500787401576 Td
184
+ /F3.0 4 Tf
185
+ [<33>] TJ
186
+ ET
187
+
188
+
189
+ BT
190
+ 200.42519685039372 73.20500787401576 Td
191
+ /F1.0 4 Tf
192
+ [<5045534f20422e3a>] TJ
193
+ ET
194
+
195
+
196
+ BT
197
+ 217.27559055118112 73.20500787401576 Td
198
+ /F3.0 4 Tf
199
+ [<332e3330302c303030>] TJ
200
+ ET
201
+
202
+
203
+ BT
204
+ 242.9448818897638 73.20500787401576 Td
205
+ /F1.0 4 Tf
206
+ [<5045534f204ccd512e3a>] TJ
207
+ ET
208
+
209
+
210
+ BT
211
+ 265.46456692913387 73.20500787401576 Td
212
+ /F3.0 4 Tf
213
+ [<332e3030302c303030>] TJ
214
+ ET
215
+
216
+
217
+ BT
218
+ 23.25984251968504 61.91774803149629 Td
219
+ /F1.0 6 Tf
220
+ [<4f555452415320494e464f524d41> 40 <c7d54553>] TJ
221
+ ET
222
+
223
+
224
+ BT
225
+ 23.25984251968504 56.93145669291365 Td
226
+ /F1.0 5 Tf
227
+ [<556d61206f6273657276> 25 <61e7e36f>] TJ
228
+ ET
229
+
230
+ 374.173 21.543 202.677 75.118 re
231
+ S
232
+
233
+ BT
234
+ 376.1732283464567 90.56341732283484 Td
235
+ /F1.0 6 Tf
236
+ [<5245534552> 80 <56> 135 <41444f2041> 55 <4f20464953434f>] TJ
237
+ ET
238
+
239
+ Q
240
+
241
+ endstream
242
+ endobj
243
+ 5 0 obj
244
+ << /Type /Page
245
+ /Parent 3 0 R
246
+ /MediaBox [0 0 595.28 841.89]
247
+ /Contents 4 0 R
248
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
249
+ /Font << /F2.0 6 0 R
250
+ /F1.0 7 0 R
251
+ /F3.0 8 0 R
252
+ >>
253
+ >>
254
+ >>
255
+ endobj
256
+ 6 0 obj
257
+ << /Type /Font
258
+ /Subtype /Type1
259
+ /BaseFont /Times-Bold
260
+ /Encoding /WinAnsiEncoding
261
+ >>
262
+ endobj
263
+ 7 0 obj
264
+ << /Type /Font
265
+ /Subtype /Type1
266
+ /BaseFont /Times-Roman
267
+ /Encoding /WinAnsiEncoding
268
+ >>
269
+ endobj
270
+ 8 0 obj
271
+ << /Type /Font
272
+ /Subtype /Type1
273
+ /BaseFont /Times-Italic
274
+ /Encoding /WinAnsiEncoding
275
+ >>
276
+ endobj
277
+ xref
278
+ 0 9
279
+ 0000000000 65535 f
280
+ 0000000015 00000 n
281
+ 0000000109 00000 n
282
+ 0000000158 00000 n
283
+ 0000000215 00000 n
284
+ 0000003103 00000 n
285
+ 0000003307 00000 n
286
+ 0000003405 00000 n
287
+ 0000003504 00000 n
288
+ trailer
289
+ << /Size 9
290
+ /Root 2 0 R
291
+ /Info 1 0 R
292
+ >>
293
+ startxref
294
+ 3604
295
+ %%EOF