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,100 @@
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 1295
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 35 798.694 Td
28
+ /F1.0 12 Tf
29
+ [<546865736520617265207468652041504920646f63756d656e747320666f7220746865206261736520636c617373657320616e64206d6f64756c657320696e207468652063757272656e7420737461626c652072656c65617365206f66205275627920322e322e205468657365>] TJ
30
+ ET
31
+
32
+
33
+ BT
34
+ 35 785.3019999999999 Td
35
+ /F1.0 12 Tf
36
+ [<617265207468652041504920646f63756d656e747320666f7220746865206261736520636c617373657320616e64206d6f64756c657320696e207468652063757272656e7420737461626c652072656c65617365206f66205275627920322e322e20546865736520617265>] TJ
37
+ ET
38
+
39
+
40
+ BT
41
+ 35 771.91 Td
42
+ /F1.0 12 Tf
43
+ [<7468652041504920646f63756d656e747320666f7220746865206261736520636c617373657320616e64206d6f64756c657320696e207468652063757272656e7420737461626c652072656c65617365206f66205275627920322e322e2054686573652061726520746865>] TJ
44
+ ET
45
+
46
+
47
+ BT
48
+ 35 758.518 Td
49
+ /F1.0 12 Tf
50
+ [<41504920646f63756d656e747320666f7220746865206261736520636c617373657320616e64206d6f64756c657320696e207468652063757272656e7420737461626c652072656c65617365206f66205275627920322e322e205468657365206172652074686520415049>] TJ
51
+ ET
52
+
53
+
54
+ BT
55
+ 35 745.126 Td
56
+ /F1.0 12 Tf
57
+ [<646f63756d656e747320666f7220746865206261736520636c617373657320616e64206d6f64756c657320696e207468652063757272656e7420737461626c652072656c65617365206f66205275627920322e322e>] TJ
58
+ ET
59
+
60
+ 30.000 321.890 535.280 490.000 re
61
+ S
62
+ Q
63
+
64
+ endstream
65
+ endobj
66
+ 5 0 obj
67
+ << /Type /Page
68
+ /Parent 3 0 R
69
+ /MediaBox [0 0 595.28 841.89]
70
+ /Contents 4 0 R
71
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
72
+ /Font << /F1.0 6 0 R
73
+ >>
74
+ >>
75
+ >>
76
+ endobj
77
+ 6 0 obj
78
+ << /Type /Font
79
+ /Subtype /Type1
80
+ /BaseFont /Times-Roman
81
+ /Encoding /WinAnsiEncoding
82
+ >>
83
+ endobj
84
+ xref
85
+ 0 7
86
+ 0000000000 65535 f
87
+ 0000000015 00000 n
88
+ 0000000109 00000 n
89
+ 0000000158 00000 n
90
+ 0000000215 00000 n
91
+ 0000001562 00000 n
92
+ 0000001742 00000 n
93
+ trailer
94
+ << /Size 7
95
+ /Root 2 0 R
96
+ /Info 1 0 R
97
+ >>
98
+ startxref
99
+ 1841
100
+ %%EOF
@@ -0,0 +1,55 @@
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 45
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ 30.000 761.890 535.280 50.000 re
26
+ S
27
+ Q
28
+
29
+ endstream
30
+ endobj
31
+ 5 0 obj
32
+ << /Type /Page
33
+ /Parent 3 0 R
34
+ /MediaBox [0 0 595.28 841.89]
35
+ /Contents 4 0 R
36
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
37
+ >>
38
+ >>
39
+ endobj
40
+ xref
41
+ 0 6
42
+ 0000000000 65535 f
43
+ 0000000015 00000 n
44
+ 0000000109 00000 n
45
+ 0000000158 00000 n
46
+ 0000000215 00000 n
47
+ 0000000310 00000 n
48
+ trailer
49
+ << /Size 6
50
+ /Root 2 0 R
51
+ /Info 1 0 R
52
+ >>
53
+ startxref
54
+ 466
55
+ %%EOF
@@ -0,0 +1,72 @@
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 115
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 35 798.694 Td
28
+ /F1.0 12 Tf
29
+ [<73616d706c65207465> 15 <7874>] TJ
30
+ ET
31
+
32
+ 30.000 761.890 535.280 50.000 re
33
+ S
34
+ Q
35
+
36
+ endstream
37
+ endobj
38
+ 5 0 obj
39
+ << /Type /Page
40
+ /Parent 3 0 R
41
+ /MediaBox [0 0 595.28 841.89]
42
+ /Contents 4 0 R
43
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
44
+ /Font << /F1.0 6 0 R
45
+ >>
46
+ >>
47
+ >>
48
+ endobj
49
+ 6 0 obj
50
+ << /Type /Font
51
+ /Subtype /Type1
52
+ /BaseFont /Times-Roman
53
+ /Encoding /WinAnsiEncoding
54
+ >>
55
+ endobj
56
+ xref
57
+ 0 7
58
+ 0000000000 65535 f
59
+ 0000000015 00000 n
60
+ 0000000109 00000 n
61
+ 0000000158 00000 n
62
+ 0000000215 00000 n
63
+ 0000000381 00000 n
64
+ 0000000561 00000 n
65
+ trailer
66
+ << /Size 7
67
+ /Root 2 0 R
68
+ /Info 1 0 R
69
+ >>
70
+ startxref
71
+ 660
72
+ %%EOF
@@ -0,0 +1,70 @@
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 91
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 266.404 803.694 Td
28
+ /F1.0 12 Tf
29
+ [<7465> 15 <787420696e2063656e746572>] TJ
30
+ ET
31
+
32
+ Q
33
+
34
+ endstream
35
+ endobj
36
+ 5 0 obj
37
+ << /Type /Page
38
+ /Parent 3 0 R
39
+ /MediaBox [0 0 595.28 841.89]
40
+ /Contents 4 0 R
41
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
42
+ /Font << /F1.0 6 0 R
43
+ >>
44
+ >>
45
+ >>
46
+ endobj
47
+ 6 0 obj
48
+ << /Type /Font
49
+ /Subtype /Type1
50
+ /BaseFont /Times-Roman
51
+ /Encoding /WinAnsiEncoding
52
+ >>
53
+ endobj
54
+ xref
55
+ 0 7
56
+ 0000000000 65535 f
57
+ 0000000015 00000 n
58
+ 0000000109 00000 n
59
+ 0000000158 00000 n
60
+ 0000000215 00000 n
61
+ 0000000356 00000 n
62
+ 0000000536 00000 n
63
+ trailer
64
+ << /Size 7
65
+ /Root 2 0 R
66
+ /Info 1 0 R
67
+ >>
68
+ startxref
69
+ 635
70
+ %%EOF
@@ -0,0 +1,70 @@
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 84
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 30 753.694 Td
28
+ /F1.0 12 Tf
29
+ [<7465> 15 <7874207769746820706164>] TJ
30
+ ET
31
+
32
+ Q
33
+
34
+ endstream
35
+ endobj
36
+ 5 0 obj
37
+ << /Type /Page
38
+ /Parent 3 0 R
39
+ /MediaBox [0 0 595.28 841.89]
40
+ /Contents 4 0 R
41
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
42
+ /Font << /F1.0 6 0 R
43
+ >>
44
+ >>
45
+ >>
46
+ endobj
47
+ 6 0 obj
48
+ << /Type /Font
49
+ /Subtype /Type1
50
+ /BaseFont /Times-Roman
51
+ /Encoding /WinAnsiEncoding
52
+ >>
53
+ endobj
54
+ xref
55
+ 0 7
56
+ 0000000000 65535 f
57
+ 0000000015 00000 n
58
+ 0000000109 00000 n
59
+ 0000000158 00000 n
60
+ 0000000215 00000 n
61
+ 0000000349 00000 n
62
+ 0000000529 00000 n
63
+ trailer
64
+ << /Size 7
65
+ /Root 2 0 R
66
+ /Info 1 0 R
67
+ >>
68
+ startxref
69
+ 628
70
+ %%EOF
@@ -0,0 +1,70 @@
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 80
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 30 803.694 Td
28
+ /F1.0 12 Tf
29
+ [<73696d706c65207465> 15 <7874>] TJ
30
+ ET
31
+
32
+ Q
33
+
34
+ endstream
35
+ endobj
36
+ 5 0 obj
37
+ << /Type /Page
38
+ /Parent 3 0 R
39
+ /MediaBox [0 0 595.28 841.89]
40
+ /Contents 4 0 R
41
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
42
+ /Font << /F1.0 6 0 R
43
+ >>
44
+ >>
45
+ >>
46
+ endobj
47
+ 6 0 obj
48
+ << /Type /Font
49
+ /Subtype /Type1
50
+ /BaseFont /Times-Roman
51
+ /Encoding /WinAnsiEncoding
52
+ >>
53
+ endobj
54
+ xref
55
+ 0 7
56
+ 0000000000 65535 f
57
+ 0000000015 00000 n
58
+ 0000000109 00000 n
59
+ 0000000158 00000 n
60
+ 0000000215 00000 n
61
+ 0000000345 00000 n
62
+ 0000000525 00000 n
63
+ trailer
64
+ << /Size 7
65
+ /Root 2 0 R
66
+ /Info 1 0 R
67
+ >>
68
+ startxref
69
+ 624
70
+ %%EOF
@@ -0,0 +1,70 @@
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 84
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+
26
+ BT
27
+ 30 794.8149999999999 Td
28
+ /F1.0 25 Tf
29
+ [<626967207465> 15 <7874>] TJ
30
+ ET
31
+
32
+ Q
33
+
34
+ endstream
35
+ endobj
36
+ 5 0 obj
37
+ << /Type /Page
38
+ /Parent 3 0 R
39
+ /MediaBox [0 0 595.28 841.89]
40
+ /Contents 4 0 R
41
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
42
+ /Font << /F1.0 6 0 R
43
+ >>
44
+ >>
45
+ >>
46
+ endobj
47
+ 6 0 obj
48
+ << /Type /Font
49
+ /Subtype /Type1
50
+ /BaseFont /Times-Roman
51
+ /Encoding /WinAnsiEncoding
52
+ >>
53
+ endobj
54
+ xref
55
+ 0 7
56
+ 0000000000 65535 f
57
+ 0000000015 00000 n
58
+ 0000000109 00000 n
59
+ 0000000158 00000 n
60
+ 0000000215 00000 n
61
+ 0000000349 00000 n
62
+ 0000000529 00000 n
63
+ trailer
64
+ << /Size 7
65
+ /Root 2 0 R
66
+ /Info 1 0 R
67
+ >>
68
+ startxref
69
+ 628
70
+ %%EOF