br_danfe 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,239 @@
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 2378
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 21.25984251968504 415.1659212598426 Td
28
+ /F2.0 8 Tf
29
+ [<5452414e53504f52> 40 <54> 90 <41444f52202f2056> 45 <4f4c554d4553205452414e53504f52> 40 <54> 90 <41444f53>] TJ
30
+ ET
31
+
32
+ 21.260 390.047 241.512 22.677 re
33
+ S
34
+
35
+ BT
36
+ 23.25984251968504 406.626409448819 Td
37
+ /F1.0 6 Tf
38
+ [<52415ac3> 55 <4f20534f4349414c>] TJ
39
+ ET
40
+
41
+
42
+ BT
43
+ 23.25984251968504 392.89440944881903 Td
44
+ /F1.0 10 Tf
45
+ [<4e6f6d6520646f2054> 35 <72616e73706f727461646f72204c746461>] TJ
46
+ ET
47
+
48
+ 262.772 390.047 79.087 22.677 re
49
+ S
50
+
51
+ BT
52
+ 264.7716535433071 406.626409448819 Td
53
+ /F1.0 6 Tf
54
+ [<465245544520504f5220434f4e54> 93 <41>] TJ
55
+ ET
56
+
57
+
58
+ BT
59
+ 264.7716535433071 392.89440944881903 Td
60
+ /F1.0 10 Tf
61
+ [<302d456d6974656e7465>] TJ
62
+ ET
63
+
64
+ 341.858 390.047 50.457 22.677 re
65
+ S
66
+
67
+ BT
68
+ 343.85826771653547 406.626409448819 Td
69
+ /F1.0 6 Tf
70
+ [<434f4449474f20414e5454>] TJ
71
+ ET
72
+
73
+
74
+ BT
75
+ 343.85826771653547 392.89440944881903 Td
76
+ /F1.0 10 Tf
77
+ [<313233343536>] TJ
78
+ ET
79
+
80
+ 392.315 390.047 64.913 22.677 re
81
+ S
82
+
83
+ BT
84
+ 394.3149606299213 406.626409448819 Td
85
+ /F1.0 6 Tf
86
+ [<504c41> 40 <434120444f205645cd43554c4f>] TJ
87
+ ET
88
+
89
+
90
+ BT
91
+ 394.3149606299213 392.89440944881903 Td
92
+ /F1.0 10 Tf
93
+ [<4142432d31323334>] TJ
94
+ ET
95
+
96
+ 457.228 390.047 21.543 22.677 re
97
+ S
98
+
99
+ BT
100
+ 459.2283464566929 406.626409448819 Td
101
+ /F1.0 6 Tf
102
+ [<5546>] TJ
103
+ ET
104
+
105
+
106
+ BT
107
+ 459.2283464566929 392.89440944881903 Td
108
+ /F1.0 10 Tf
109
+ [<5350>] TJ
110
+ ET
111
+
112
+ 478.772 390.047 97.512 22.677 re
113
+ S
114
+
115
+ BT
116
+ 480.77165354330714 406.626409448819 Td
117
+ /F1.0 6 Tf
118
+ [<434e504a2f435046>] TJ
119
+ ET
120
+
121
+
122
+ BT
123
+ 480.77165354330714 392.89440944881903 Td
124
+ /F1.0 10 Tf
125
+ [<37312e3433342e3036342f303030312d3439>] TJ
126
+ ET
127
+
128
+ 21.260 367.370 241.512 22.677 re
129
+ S
130
+
131
+ BT
132
+ 23.25984251968504 383.9492440944882 Td
133
+ /F1.0 6 Tf
134
+ [<454e44455245c74f>] TJ
135
+ ET
136
+
137
+
138
+ BT
139
+ 23.25984251968504 370.21724409448825 Td
140
+ /F1.0 10 Tf
141
+ [<52756120646f2054> 35 <72616e73706f727461646f72> 40 <2c20343536>] TJ
142
+ ET
143
+
144
+ 262.772 367.370 194.457 22.677 re
145
+ S
146
+
147
+ BT
148
+ 264.7716535433071 383.9492440944882 Td
149
+ /F1.0 6 Tf
150
+ [<4d554e4943cd50494f>] TJ
151
+ ET
152
+
153
+
154
+ BT
155
+ 264.7716535433071 370.21724409448825 Td
156
+ /F1.0 10 Tf
157
+ [<56> 129 <6f746f72616e74696d>] TJ
158
+ ET
159
+
160
+ 457.228 367.370 21.543 22.677 re
161
+ S
162
+
163
+ BT
164
+ 459.2283464566929 383.9492440944882 Td
165
+ /F1.0 6 Tf
166
+ [<5546>] TJ
167
+ ET
168
+
169
+
170
+ BT
171
+ 459.2283464566929 370.21724409448825 Td
172
+ /F1.0 10 Tf
173
+ [<5350>] TJ
174
+ ET
175
+
176
+ 478.772 367.370 97.512 22.677 re
177
+ S
178
+
179
+ BT
180
+ 480.77165354330714 383.9492440944882 Td
181
+ /F1.0 6 Tf
182
+ [<494e53435249c7c2> 55 <4f20455354> 93 <414455> 40 <414c>] TJ
183
+ ET
184
+
185
+
186
+ BT
187
+ 480.77165354330714 370.21724409448825 Td
188
+ /F1.0 10 Tf
189
+ [<3936342e3530382e3939302e303839>] TJ
190
+ ET
191
+
192
+ Q
193
+
194
+ endstream
195
+ endobj
196
+ 5 0 obj
197
+ << /Type /Page
198
+ /Parent 3 0 R
199
+ /MediaBox [0 0 595.28 841.89]
200
+ /Contents 4 0 R
201
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
202
+ /Font << /F2.0 6 0 R
203
+ /F1.0 7 0 R
204
+ >>
205
+ >>
206
+ >>
207
+ endobj
208
+ 6 0 obj
209
+ << /Type /Font
210
+ /Subtype /Type1
211
+ /BaseFont /Times-Bold
212
+ /Encoding /WinAnsiEncoding
213
+ >>
214
+ endobj
215
+ 7 0 obj
216
+ << /Type /Font
217
+ /Subtype /Type1
218
+ /BaseFont /Times-Roman
219
+ /Encoding /WinAnsiEncoding
220
+ >>
221
+ endobj
222
+ xref
223
+ 0 8
224
+ 0000000000 65535 f
225
+ 0000000015 00000 n
226
+ 0000000109 00000 n
227
+ 0000000158 00000 n
228
+ 0000000215 00000 n
229
+ 0000002645 00000 n
230
+ 0000002837 00000 n
231
+ 0000002935 00000 n
232
+ trailer
233
+ << /Size 8
234
+ /Root 2 0 R
235
+ /Info 1 0 R
236
+ >>
237
+ startxref
238
+ 3034
239
+ %%EOF
@@ -0,0 +1,117 @@
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 772
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ 21.260 343.276 68.598 24.094 re
26
+ S
27
+
28
+ BT
29
+ 23.25984251968504 361.2720787401575 Td
30
+ /F1.0 6 Tf
31
+ [<51> 10 <55> 40 <414e544944> 40 <414445>] TJ
32
+ ET
33
+
34
+ 89.858 343.276 86.457 24.094 re
35
+ S
36
+
37
+ BT
38
+ 91.85826771653544 361.2720787401575 Td
39
+ /F1.0 6 Tf
40
+ [<455350c9434945>] TJ
41
+ ET
42
+
43
+ 176.315 343.276 86.457 24.094 re
44
+ S
45
+
46
+ BT
47
+ 178.31496062992127 361.2720787401575 Td
48
+ /F1.0 6 Tf
49
+ [<4d41524341>] TJ
50
+ ET
51
+
52
+ 262.772 343.276 136.913 24.094 re
53
+ S
54
+
55
+ BT
56
+ 264.7716535433071 361.2720787401575 Td
57
+ /F1.0 6 Tf
58
+ [<4e554d455241> 40 <c7c3> 55 <4f>] TJ
59
+ ET
60
+
61
+ 399.685 343.276 97.228 24.094 re
62
+ S
63
+
64
+ BT
65
+ 401.68503937007875 361.2720787401575 Td
66
+ /F1.0 6 Tf
67
+ [<5045534f204252> 40 <5554> 18 <4f>] TJ
68
+ ET
69
+
70
+ 496.913 343.276 79.370 24.094 re
71
+ S
72
+
73
+ BT
74
+ 498.91338582677173 361.2720787401575 Td
75
+ /F1.0 6 Tf
76
+ [<5045534f204ccd51> 10 <5549444f>] TJ
77
+ ET
78
+
79
+ Q
80
+
81
+ endstream
82
+ endobj
83
+ 5 0 obj
84
+ << /Type /Page
85
+ /Parent 3 0 R
86
+ /MediaBox [0 0 595.28 841.89]
87
+ /Contents 4 0 R
88
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
89
+ /Font << /F1.0 6 0 R
90
+ >>
91
+ >>
92
+ >>
93
+ endobj
94
+ 6 0 obj
95
+ << /Type /Font
96
+ /Subtype /Type1
97
+ /BaseFont /Times-Roman
98
+ /Encoding /WinAnsiEncoding
99
+ >>
100
+ endobj
101
+ xref
102
+ 0 7
103
+ 0000000000 65535 f
104
+ 0000000015 00000 n
105
+ 0000000109 00000 n
106
+ 0000000158 00000 n
107
+ 0000000215 00000 n
108
+ 0000001038 00000 n
109
+ 0000001218 00000 n
110
+ trailer
111
+ << /Size 7
112
+ /Root 2 0 R
113
+ /Info 1 0 R
114
+ >>
115
+ startxref
116
+ 1317
117
+ %%EOF
@@ -0,0 +1,152 @@
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 1190
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ 21.260 343.276 68.598 24.094 re
26
+ S
27
+
28
+ BT
29
+ 23.25984251968504 361.2720787401575 Td
30
+ /F1.0 6 Tf
31
+ [<51> 10 <55> 40 <414e544944> 40 <414445>] TJ
32
+ ET
33
+
34
+
35
+ BT
36
+ 23.25984251968504 347.5400787401575 Td
37
+ /F1.0 10 Tf
38
+ [<31>] TJ
39
+ ET
40
+
41
+ 89.858 343.276 86.457 24.094 re
42
+ S
43
+
44
+ BT
45
+ 91.85826771653544 361.2720787401575 Td
46
+ /F1.0 6 Tf
47
+ [<455350c9434945>] TJ
48
+ ET
49
+
50
+
51
+ BT
52
+ 91.85826771653544 347.5400787401575 Td
53
+ /F1.0 10 Tf
54
+ [<56> 40 <4f4c554d45532031>] TJ
55
+ ET
56
+
57
+ 176.315 343.276 86.457 24.094 re
58
+ S
59
+
60
+ BT
61
+ 178.31496062992127 361.2720787401575 Td
62
+ /F1.0 6 Tf
63
+ [<4d41524341>] TJ
64
+ ET
65
+
66
+
67
+ BT
68
+ 178.31496062992127 347.5400787401575 Td
69
+ /F1.0 10 Tf
70
+ [<4449564552534f532031>] TJ
71
+ ET
72
+
73
+ 262.772 343.276 136.913 24.094 re
74
+ S
75
+
76
+ BT
77
+ 264.7716535433071 361.2720787401575 Td
78
+ /F1.0 6 Tf
79
+ [<4e554d455241> 40 <c7c3> 55 <4f>] TJ
80
+ ET
81
+
82
+ 399.685 343.276 97.228 24.094 re
83
+ S
84
+
85
+ BT
86
+ 401.68503937007875 361.2720787401575 Td
87
+ /F1.0 6 Tf
88
+ [<5045534f204252> 40 <5554> 18 <4f>] TJ
89
+ ET
90
+
91
+
92
+ BT
93
+ 454.9133858267717 347.5400787401575 Td
94
+ /F1.0 10 Tf
95
+ [<312e3130302c303030>] TJ
96
+ ET
97
+
98
+ 496.913 343.276 79.370 24.094 re
99
+ S
100
+
101
+ BT
102
+ 498.91338582677173 361.2720787401575 Td
103
+ /F1.0 6 Tf
104
+ [<5045534f204ccd51> 10 <5549444f>] TJ
105
+ ET
106
+
107
+
108
+ BT
109
+ 534.2834645669292 347.5400787401575 Td
110
+ /F1.0 10 Tf
111
+ [<312e3030302c303030>] TJ
112
+ ET
113
+
114
+ Q
115
+
116
+ endstream
117
+ endobj
118
+ 5 0 obj
119
+ << /Type /Page
120
+ /Parent 3 0 R
121
+ /MediaBox [0 0 595.28 841.89]
122
+ /Contents 4 0 R
123
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
124
+ /Font << /F1.0 6 0 R
125
+ >>
126
+ >>
127
+ >>
128
+ endobj
129
+ 6 0 obj
130
+ << /Type /Font
131
+ /Subtype /Type1
132
+ /BaseFont /Times-Roman
133
+ /Encoding /WinAnsiEncoding
134
+ >>
135
+ endobj
136
+ xref
137
+ 0 7
138
+ 0000000000 65535 f
139
+ 0000000015 00000 n
140
+ 0000000109 00000 n
141
+ 0000000158 00000 n
142
+ 0000000215 00000 n
143
+ 0000001457 00000 n
144
+ 0000001637 00000 n
145
+ trailer
146
+ << /Size 7
147
+ /Root 2 0 R
148
+ /Info 1 0 R
149
+ >>
150
+ startxref
151
+ 1736
152
+ %%EOF