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,207 @@
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 1840
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 21.25984251968504 332.3942677165356 Td
28
+ /F2.0 8 Tf
29
+ [<44> 35 <41444f5320444f205052> 30 <4f445554> 18 <4f202f20534552> 55 <5649c74f>] TJ
30
+ ET
31
+
32
+ 21.260 148.535 42.520 181.417 re
33
+ S
34
+
35
+ BT
36
+ 23.25984251968504 323.8547559055119 Td
37
+ /F1.0 6 Tf
38
+ [<43d34449474f>] TJ
39
+ ET
40
+
41
+ 63.780 148.535 124.724 181.417 re
42
+ S
43
+
44
+ BT
45
+ 65.77952755905513 323.8547559055119 Td
46
+ /F1.0 6 Tf
47
+ [<444553435249c7c3> 55 <4f>] TJ
48
+ ET
49
+
50
+ 188.504 148.535 36.850 181.417 re
51
+ S
52
+
53
+ BT
54
+ 190.50393700787404 323.8547559055119 Td
55
+ /F1.0 6 Tf
56
+ [<4e434d>] TJ
57
+ ET
58
+
59
+ 225.354 148.535 22.677 181.417 re
60
+ S
61
+
62
+ BT
63
+ 227.35433070866145 323.8547559055119 Td
64
+ /F1.0 6 Tf
65
+ [<435354>] TJ
66
+ ET
67
+
68
+ 248.031 148.535 28.346 181.417 re
69
+ S
70
+
71
+ BT
72
+ 250.03149606299215 323.8547559055119 Td
73
+ /F1.0 6 Tf
74
+ [<43464f50>] TJ
75
+ ET
76
+
77
+ 276.378 148.535 28.346 181.417 re
78
+ S
79
+
80
+ BT
81
+ 278.37795275590554 323.8547559055119 Td
82
+ /F1.0 6 Tf
83
+ [<554e4944>] TJ
84
+ ET
85
+
86
+ 304.724 148.535 36.850 181.417 re
87
+ S
88
+
89
+ BT
90
+ 306.7244094488189 323.8547559055119 Td
91
+ /F1.0 6 Tf
92
+ [<51> 10 <55> 40 <414e54>] TJ
93
+ ET
94
+
95
+ 341.575 148.535 42.520 181.417 re
96
+ S
97
+
98
+ BT
99
+ 343.57480314960634 323.8547559055119 Td
100
+ /F1.0 6 Tf
101
+ [<56> 135 <414c4f5220554e4954>] TJ
102
+ ET
103
+
104
+ 384.094 148.535 42.520 181.417 re
105
+ S
106
+
107
+ BT
108
+ 386.0944881889764 323.8547559055119 Td
109
+ /F1.0 6 Tf
110
+ [<56> 135 <414c4f522054> 18 <4f> 40 <54>] TJ
111
+ ET
112
+
113
+ 426.614 148.535 42.520 181.417 re
114
+ S
115
+
116
+ BT
117
+ 428.6141732283465 323.8547559055119 Td
118
+ /F1.0 6 Tf
119
+ [<42> 35 <4153452043c14c43>] TJ
120
+ ET
121
+
122
+ 469.134 148.535 28.346 181.417 re
123
+ S
124
+
125
+ BT
126
+ 471.13385826771656 323.8547559055119 Td
127
+ /F1.0 6 Tf
128
+ [<564c2049434d53>] TJ
129
+ ET
130
+
131
+ 497.480 148.535 28.346 181.417 re
132
+ S
133
+
134
+ BT
135
+ 499.48031496063 323.8547559055119 Td
136
+ /F1.0 6 Tf
137
+ [<564c20495049>] TJ
138
+ ET
139
+
140
+ 525.827 148.535 25.512 181.417 re
141
+ S
142
+
143
+ BT
144
+ 527.8267716535433 323.8547559055119 Td
145
+ /F1.0 6 Tf
146
+ [<252049434d53>] TJ
147
+ ET
148
+
149
+ 551.339 148.535 24.378 181.417 re
150
+ S
151
+
152
+ BT
153
+ 553.3385826771654 323.8547559055119 Td
154
+ /F1.0 6 Tf
155
+ [<2520495049>] TJ
156
+ ET
157
+
158
+ 21.260 322.583 m
159
+ 575.717 322.583 l
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
+ /F1.0 7 0 R
172
+ >>
173
+ >>
174
+ >>
175
+ endobj
176
+ 6 0 obj
177
+ << /Type /Font
178
+ /Subtype /Type1
179
+ /BaseFont /Times-Bold
180
+ /Encoding /WinAnsiEncoding
181
+ >>
182
+ endobj
183
+ 7 0 obj
184
+ << /Type /Font
185
+ /Subtype /Type1
186
+ /BaseFont /Times-Roman
187
+ /Encoding /WinAnsiEncoding
188
+ >>
189
+ endobj
190
+ xref
191
+ 0 8
192
+ 0000000000 65535 f
193
+ 0000000015 00000 n
194
+ 0000000109 00000 n
195
+ 0000000158 00000 n
196
+ 0000000215 00000 n
197
+ 0000002107 00000 n
198
+ 0000002299 00000 n
199
+ 0000002397 00000 n
200
+ trailer
201
+ << /Size 8
202
+ /Root 2 0 R
203
+ /Info 1 0 R
204
+ >>
205
+ startxref
206
+ 2496
207
+ %%EOF
@@ -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 130
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
+ [<434e504a2f435046>] 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
+ 0000000396 00000 n
66
+ 0000000576 00000 n
67
+ trailer
68
+ << /Size 7
69
+ /Root 2 0 R
70
+ /Info 1 0 R
71
+ >>
72
+ startxref
73
+ 675
74
+ %%EOF
@@ -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 130
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
+ [<434e504a2f435046>] 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
+ 0000000396 00000 n
66
+ 0000000576 00000 n
67
+ trailer
68
+ << /Size 7
69
+ /Root 2 0 R
70
+ /Info 1 0 R
71
+ >>
72
+ startxref
73
+ 675
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 233
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
+ [<434e504a2f435046>] TJ
34
+ ET
35
+
36
+
37
+ BT
38
+ 23.25984251968504 805.6188188976379 Td
39
+ /F1.0 10 Tf
40
+ [<37312e3433342e3036342f303030312d3439>] 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
+ 0000000499 00000 n
73
+ 0000000679 00000 n
74
+ trailer
75
+ << /Size 7
76
+ /Root 2 0 R
77
+ /Info 1 0 R
78
+ >>
79
+ startxref
80
+ 778
81
+ %%EOF
@@ -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