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,74 @@
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 168
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ Q
26
+ q
27
+ 21.260 802.772 111.685 22.677 re
28
+ S
29
+
30
+ BT
31
+ 23.25984251968504 819.350818897638 Td
32
+ /F1.0 6 Tf
33
+ [<494e53435249c7c2> 55 <4f20455354> 93 <414455> 40 <414c>] TJ
34
+ ET
35
+
36
+ Q
37
+
38
+ endstream
39
+ endobj
40
+ 5 0 obj
41
+ << /Type /Page
42
+ /Parent 3 0 R
43
+ /MediaBox [0 0 595.28 841.89]
44
+ /Contents 4 0 R
45
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
46
+ /Font << /F1.0 6 0 R
47
+ >>
48
+ >>
49
+ >>
50
+ endobj
51
+ 6 0 obj
52
+ << /Type /Font
53
+ /Subtype /Type1
54
+ /BaseFont /Times-Roman
55
+ /Encoding /WinAnsiEncoding
56
+ >>
57
+ endobj
58
+ xref
59
+ 0 7
60
+ 0000000000 65535 f
61
+ 0000000015 00000 n
62
+ 0000000109 00000 n
63
+ 0000000158 00000 n
64
+ 0000000215 00000 n
65
+ 0000000434 00000 n
66
+ 0000000614 00000 n
67
+ trailer
68
+ << /Size 7
69
+ /Root 2 0 R
70
+ /Info 1 0 R
71
+ >>
72
+ startxref
73
+ 713
74
+ %%EOF
@@ -0,0 +1,81 @@
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 265
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ Q
26
+ q
27
+ 21.260 802.772 111.685 22.677 re
28
+ S
29
+
30
+ BT
31
+ 23.25984251968504 819.350818897638 Td
32
+ /F1.0 6 Tf
33
+ [<494e53435249c7c2> 55 <4f20455354> 93 <414455> 40 <414c>] TJ
34
+ ET
35
+
36
+
37
+ BT
38
+ 23.25984251968504 805.6188188976379 Td
39
+ /F1.0 10 Tf
40
+ [<3936342e3530382e3939302e303839>] TJ
41
+ ET
42
+
43
+ Q
44
+
45
+ endstream
46
+ endobj
47
+ 5 0 obj
48
+ << /Type /Page
49
+ /Parent 3 0 R
50
+ /MediaBox [0 0 595.28 841.89]
51
+ /Contents 4 0 R
52
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
53
+ /Font << /F1.0 6 0 R
54
+ >>
55
+ >>
56
+ >>
57
+ endobj
58
+ 6 0 obj
59
+ << /Type /Font
60
+ /Subtype /Type1
61
+ /BaseFont /Times-Roman
62
+ /Encoding /WinAnsiEncoding
63
+ >>
64
+ endobj
65
+ xref
66
+ 0 7
67
+ 0000000000 65535 f
68
+ 0000000015 00000 n
69
+ 0000000109 00000 n
70
+ 0000000158 00000 n
71
+ 0000000215 00000 n
72
+ 0000000531 00000 n
73
+ 0000000711 00000 n
74
+ trailer
75
+ << /Size 7
76
+ /Root 2 0 R
77
+ /Info 1 0 R
78
+ >>
79
+ startxref
80
+ 810
81
+ %%EOF
@@ -0,0 +1,216 @@
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 1638
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 21.25984251968504 514.0950551181104 Td
28
+ /F2.0 8 Tf
29
+ [<46> 90 <41> 95 <54555241202f204455504c494341> 95 <54> 90 <4153>] TJ
30
+ ET
31
+
32
+ 21.260 487.559 554.740 24.094 re
33
+ S
34
+
35
+ BT
36
+ 23.25984251968504 503.55554330708674 Td
37
+ /F3.0 6 Tf
38
+ [<4efa6d2e3a>] TJ
39
+ ET
40
+
41
+
42
+ BT
43
+ 43.102362204724415 503.55554330708674 Td
44
+ /F1.0 6 Tf
45
+ [<31>] TJ
46
+ ET
47
+
48
+
49
+ BT
50
+ 23.25984251968504 497.88625196850404 Td
51
+ /F3.0 6 Tf
52
+ [<56> 111 <656e632e3a>] TJ
53
+ ET
54
+
55
+
56
+ BT
57
+ 43.102362204724415 497.88625196850404 Td
58
+ /F1.0 6 Tf
59
+ [<31332f30322f32303135>] TJ
60
+ ET
61
+
62
+
63
+ BT
64
+ 23.25984251968504 492.2169606299214 Td
65
+ /F3.0 6 Tf
66
+ [<56> 111 <616c6f723a205224>] TJ
67
+ ET
68
+
69
+
70
+ BT
71
+ 61.03543307086615 492.2169606299214 Td
72
+ /F1.0 6 Tf
73
+ [<32352c3536>] TJ
74
+ ET
75
+
76
+
77
+ BT
78
+ 88.45669291338584 503.55554330708674 Td
79
+ /F3.0 6 Tf
80
+ [<4efa6d2e3a>] TJ
81
+ ET
82
+
83
+
84
+ BT
85
+ 108.29921259842521 503.55554330708674 Td
86
+ /F1.0 6 Tf
87
+ [<32>] TJ
88
+ ET
89
+
90
+
91
+ BT
92
+ 88.45669291338584 497.88625196850404 Td
93
+ /F3.0 6 Tf
94
+ [<56> 111 <656e632e3a>] TJ
95
+ ET
96
+
97
+
98
+ BT
99
+ 108.29921259842521 497.88625196850404 Td
100
+ /F1.0 6 Tf
101
+ [<31352f30332f32303135>] TJ
102
+ ET
103
+
104
+
105
+ BT
106
+ 88.45669291338584 492.2169606299214 Td
107
+ /F3.0 6 Tf
108
+ [<56> 111 <616c6f723a205224>] TJ
109
+ ET
110
+
111
+
112
+ BT
113
+ 126.23228346456693 492.2169606299214 Td
114
+ /F1.0 6 Tf
115
+ [<32352c3536>] TJ
116
+ ET
117
+
118
+
119
+ BT
120
+ 153.65354330708664 503.55554330708674 Td
121
+ /F3.0 6 Tf
122
+ [<4efa6d2e3a>] TJ
123
+ ET
124
+
125
+
126
+ BT
127
+ 173.496062992126 503.55554330708674 Td
128
+ /F1.0 6 Tf
129
+ [<33>] TJ
130
+ ET
131
+
132
+
133
+ BT
134
+ 153.65354330708664 497.88625196850404 Td
135
+ /F3.0 6 Tf
136
+ [<56> 111 <656e632e3a>] TJ
137
+ ET
138
+
139
+
140
+ BT
141
+ 173.496062992126 497.88625196850404 Td
142
+ /F1.0 6 Tf
143
+ [<31342f30342f32303135>] TJ
144
+ ET
145
+
146
+
147
+ BT
148
+ 153.65354330708664 492.2169606299214 Td
149
+ /F3.0 6 Tf
150
+ [<56> 111 <616c6f723a205224>] TJ
151
+ ET
152
+
153
+
154
+ BT
155
+ 191.42913385826773 492.2169606299214 Td
156
+ /F1.0 6 Tf
157
+ [<32352c3535>] TJ
158
+ ET
159
+
160
+ Q
161
+
162
+ endstream
163
+ endobj
164
+ 5 0 obj
165
+ << /Type /Page
166
+ /Parent 3 0 R
167
+ /MediaBox [0 0 595.28 841.89]
168
+ /Contents 4 0 R
169
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
170
+ /Font << /F2.0 6 0 R
171
+ /F3.0 7 0 R
172
+ /F1.0 8 0 R
173
+ >>
174
+ >>
175
+ >>
176
+ endobj
177
+ 6 0 obj
178
+ << /Type /Font
179
+ /Subtype /Type1
180
+ /BaseFont /Times-Bold
181
+ /Encoding /WinAnsiEncoding
182
+ >>
183
+ endobj
184
+ 7 0 obj
185
+ << /Type /Font
186
+ /Subtype /Type1
187
+ /BaseFont /Times-Italic
188
+ /Encoding /WinAnsiEncoding
189
+ >>
190
+ endobj
191
+ 8 0 obj
192
+ << /Type /Font
193
+ /Subtype /Type1
194
+ /BaseFont /Times-Roman
195
+ /Encoding /WinAnsiEncoding
196
+ >>
197
+ endobj
198
+ xref
199
+ 0 9
200
+ 0000000000 65535 f
201
+ 0000000015 00000 n
202
+ 0000000109 00000 n
203
+ 0000000158 00000 n
204
+ 0000000215 00000 n
205
+ 0000001905 00000 n
206
+ 0000002109 00000 n
207
+ 0000002207 00000 n
208
+ 0000002307 00000 n
209
+ trailer
210
+ << /Size 9
211
+ /Root 2 0 R
212
+ /Info 1 0 R
213
+ >>
214
+ startxref
215
+ 2406
216
+ %%EOF
@@ -0,0 +1,143 @@
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 1438
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ 21.260 631.843 284.598 22.677 re
26
+ S
27
+
28
+ BT
29
+ 23.25984251968504 648.4216850393702 Td
30
+ /F1.0 6 Tf
31
+ [<4e> 35 <41> 111 <545552455a412044> 40 <41204f50455241> 40 <c7c3> 55 <4f>] TJ
32
+ ET
33
+
34
+
35
+ BT
36
+ 23.25984251968504 634.6896850393701 Td
37
+ /F1.0 10 Tf
38
+ [<56> 111 <656e6461732064652070726f647563616f20646f206573746162656c6563696d656e746f>] TJ
39
+ ET
40
+
41
+ 305.858 631.843 269.858 22.677 re
42
+ S
43
+
44
+ BT
45
+ 307.85826771653547 648.4216850393702 Td
46
+ /F1.0 6 Tf
47
+ [<5052> 40 <4f> 40 <54> 18 <4f434f4c4f2044452041> 55 <5554> 18 <4f52495a41> 40 <c7c3> 55 <4f2044452055534f>] TJ
48
+ ET
49
+
50
+
51
+ BT
52
+ 360.2274015748032 634.6896850393701 Td
53
+ /F1.0 10 Tf
54
+ [<3332353131303031323836363332302032392f31302f323031312031343a33373a3039>] TJ
55
+ ET
56
+
57
+ 21.260 609.165 180.283 22.677 re
58
+ S
59
+
60
+ BT
61
+ 23.25984251968504 625.7445196850396 Td
62
+ /F1.0 6 Tf
63
+ [<494e53435249c7c3> 55 <4f20455354> 93 <414455> 40 <414c>] TJ
64
+ ET
65
+
66
+
67
+ BT
68
+ 23.25984251968504 612.0125196850395 Td
69
+ /F1.0 10 Tf
70
+ [<3532362e3932362e3331332e353533>] TJ
71
+ ET
72
+
73
+ 201.543 609.165 194.457 22.677 re
74
+ S
75
+
76
+ BT
77
+ 203.54330708661422 625.7445196850396 Td
78
+ /F1.0 6 Tf
79
+ [<494e53432e455354> 93 <414455> 40 <414c20444f205355425354> 74 <2e2054524942> 10 <5554> 93 <c152494f>] TJ
80
+ ET
81
+
82
+
83
+ BT
84
+ 203.54330708661422 612.0125196850395 Td
85
+ /F1.0 10 Tf
86
+ [<3631312e3732342e3039322e303339>] TJ
87
+ ET
88
+
89
+ 396.000 609.165 179.717 22.677 re
90
+ S
91
+
92
+ BT
93
+ 398.0000000000001 625.7445196850396 Td
94
+ /F1.0 6 Tf
95
+ [<434e504a>] TJ
96
+ ET
97
+
98
+
99
+ BT
100
+ 398.0000000000001 612.0125196850395 Td
101
+ /F1.0 10 Tf
102
+ [<36322e3031332e3239342f303030312d3433>] TJ
103
+ ET
104
+
105
+ Q
106
+
107
+ endstream
108
+ endobj
109
+ 5 0 obj
110
+ << /Type /Page
111
+ /Parent 3 0 R
112
+ /MediaBox [0 0 595.28 841.89]
113
+ /Contents 4 0 R
114
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
115
+ /Font << /F1.0 6 0 R
116
+ >>
117
+ >>
118
+ >>
119
+ endobj
120
+ 6 0 obj
121
+ << /Type /Font
122
+ /Subtype /Type1
123
+ /BaseFont /Times-Roman
124
+ /Encoding /WinAnsiEncoding
125
+ >>
126
+ endobj
127
+ xref
128
+ 0 7
129
+ 0000000000 65535 f
130
+ 0000000015 00000 n
131
+ 0000000109 00000 n
132
+ 0000000158 00000 n
133
+ 0000000215 00000 n
134
+ 0000001705 00000 n
135
+ 0000001885 00000 n
136
+ trailer
137
+ << /Size 7
138
+ /Root 2 0 R
139
+ /Info 1 0 R
140
+ >>
141
+ startxref
142
+ 1984
143
+ %%EOF