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,512 @@
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 5548
21
+ >>
22
+ stream
23
+ q
24
+ 0.3 w
25
+ [0.3 0.6] 0 d
26
+ 0.3 w
27
+ /DeviceRGB CS
28
+ 0.000 0.000 0.000 SCN
29
+ 21.260 311.887 m
30
+ 63.780 311.887 l
31
+ S
32
+ [ ] 0 d
33
+ 0.3 w
34
+ 0.000 0.000 0.000 SCN
35
+
36
+ BT
37
+ 23.25984251968504 315.18567716535443 Td
38
+ /F1.0 6 Tf
39
+ [<524546203034>] TJ
40
+ ET
41
+
42
+ [0.3 0.6] 0 d
43
+ 0.3 w
44
+ 0.000 0.000 0.000 SCN
45
+ 63.780 311.887 m
46
+ 188.504 311.887 l
47
+ S
48
+ [ ] 0 d
49
+ 0.3 w
50
+ 0.000 0.000 0.000 SCN
51
+
52
+ BT
53
+ 65.77952755905513 315.18567716535443 Td
54
+ /F1.0 6 Tf
55
+ [<50726f6475746f20636f6d20435354203030202d204e6163696f6e616c202d2049434d53202d20495049>] TJ
56
+ ET
57
+
58
+ [0.3 0.6] 0 d
59
+ 0.3 w
60
+ 0.000 0.000 0.000 SCN
61
+ 188.504 311.887 m
62
+ 225.354 311.887 l
63
+ S
64
+ [ ] 0 d
65
+ 0.3 w
66
+ 0.000 0.000 0.000 SCN
67
+
68
+ BT
69
+ 190.50393700787401 315.18567716535443 Td
70
+ /F1.0 6 Tf
71
+ [<3930333033333239>] TJ
72
+ ET
73
+
74
+ [0.3 0.6] 0 d
75
+ 0.3 w
76
+ 0.000 0.000 0.000 SCN
77
+ 225.354 311.887 m
78
+ 248.031 311.887 l
79
+ S
80
+ [ ] 0 d
81
+ 0.3 w
82
+ 0.000 0.000 0.000 SCN
83
+
84
+ BT
85
+ 227.35433070866142 315.18567716535443 Td
86
+ /F1.0 6 Tf
87
+ [<303030>] TJ
88
+ ET
89
+
90
+ [0.3 0.6] 0 d
91
+ 0.3 w
92
+ 0.000 0.000 0.000 SCN
93
+ 248.031 311.887 m
94
+ 276.378 311.887 l
95
+ S
96
+ [ ] 0 d
97
+ 0.3 w
98
+ 0.000 0.000 0.000 SCN
99
+
100
+ BT
101
+ 250.03149606299212 315.18567716535443 Td
102
+ /F1.0 6 Tf
103
+ [<35313031>] TJ
104
+ ET
105
+
106
+ [0.3 0.6] 0 d
107
+ 0.3 w
108
+ 0.000 0.000 0.000 SCN
109
+ 276.378 311.887 m
110
+ 304.724 311.887 l
111
+ S
112
+ [ ] 0 d
113
+ 0.3 w
114
+ 0.000 0.000 0.000 SCN
115
+
116
+ BT
117
+ 278.37795275590554 315.18567716535443 Td
118
+ /F1.0 6 Tf
119
+ [<5043>] TJ
120
+ ET
121
+
122
+ [0.3 0.6] 0 d
123
+ 0.3 w
124
+ 0.000 0.000 0.000 SCN
125
+ 304.724 311.887 m
126
+ 341.575 311.887 l
127
+ S
128
+ [ ] 0 d
129
+ 0.3 w
130
+ 0.000 0.000 0.000 SCN
131
+
132
+ BT
133
+ 330.0748031496063 315.18567716535443 Td
134
+ /F1.0 6 Tf
135
+ [<312c3030>] TJ
136
+ ET
137
+
138
+ [0.3 0.6] 0 d
139
+ 0.3 w
140
+ 0.000 0.000 0.000 SCN
141
+ 341.575 311.887 m
142
+ 384.094 311.887 l
143
+ S
144
+ [ ] 0 d
145
+ 0.3 w
146
+ 0.000 0.000 0.000 SCN
147
+
148
+ BT
149
+ 369.5944881889764 315.18567716535443 Td
150
+ /F1.0 6 Tf
151
+ [<34392c3233>] TJ
152
+ ET
153
+
154
+ [0.3 0.6] 0 d
155
+ 0.3 w
156
+ 0.000 0.000 0.000 SCN
157
+ 384.094 311.887 m
158
+ 426.614 311.887 l
159
+ S
160
+ [ ] 0 d
161
+ 0.3 w
162
+ 0.000 0.000 0.000 SCN
163
+
164
+ BT
165
+ 412.1141732283465 315.18567716535443 Td
166
+ /F1.0 6 Tf
167
+ [<34392c3233>] TJ
168
+ ET
169
+
170
+ [0.3 0.6] 0 d
171
+ 0.3 w
172
+ 0.000 0.000 0.000 SCN
173
+ 426.614 311.887 m
174
+ 469.134 311.887 l
175
+ S
176
+ [ ] 0 d
177
+ 0.3 w
178
+ 0.000 0.000 0.000 SCN
179
+
180
+ BT
181
+ 454.63385826771656 315.18567716535443 Td
182
+ /F1.0 6 Tf
183
+ [<34392c3233>] TJ
184
+ ET
185
+
186
+ [0.3 0.6] 0 d
187
+ 0.3 w
188
+ 0.000 0.000 0.000 SCN
189
+ 469.134 311.887 m
190
+ 497.480 311.887 l
191
+ S
192
+ [ ] 0 d
193
+ 0.3 w
194
+ 0.000 0.000 0.000 SCN
195
+
196
+ BT
197
+ 485.9803149606299 315.18567716535443 Td
198
+ /F1.0 6 Tf
199
+ [<352c3930>] TJ
200
+ ET
201
+
202
+ [0.3 0.6] 0 d
203
+ 0.3 w
204
+ 0.000 0.000 0.000 SCN
205
+ 497.480 311.887 m
206
+ 525.827 311.887 l
207
+ S
208
+ [ ] 0 d
209
+ 0.3 w
210
+ 0.000 0.000 0.000 SCN
211
+
212
+ BT
213
+ 514.3267716535433 315.18567716535443 Td
214
+ /F1.0 6 Tf
215
+ [<322c3436>] TJ
216
+ ET
217
+
218
+ [0.3 0.6] 0 d
219
+ 0.3 w
220
+ 0.000 0.000 0.000 SCN
221
+ 525.827 311.887 m
222
+ 551.339 311.887 l
223
+ S
224
+ [ ] 0 d
225
+ 0.3 w
226
+ 0.000 0.000 0.000 SCN
227
+
228
+ BT
229
+ 536.8385826771654 315.18567716535443 Td
230
+ /F1.0 6 Tf
231
+ [<31322c3030>] TJ
232
+ ET
233
+
234
+ [0.3 0.6] 0 d
235
+ 0.3 w
236
+ 0.000 0.000 0.000 SCN
237
+ 551.339 311.887 m
238
+ 575.717 311.887 l
239
+ S
240
+ [ ] 0 d
241
+ 0.3 w
242
+ 0.000 0.000 0.000 SCN
243
+
244
+ BT
245
+ 564.2165354330709 315.18567716535443 Td
246
+ /F1.0 6 Tf
247
+ [<352c3030>] TJ
248
+ ET
249
+
250
+ [0.3 0.6] 0 d
251
+ 0.3 w
252
+ 0.000 0.000 0.000 SCN
253
+ 21.260 301.191 m
254
+ 63.780 301.191 l
255
+ S
256
+ [ ] 0 d
257
+ 0.3 w
258
+ 0.000 0.000 0.000 SCN
259
+
260
+ BT
261
+ 23.25984251968504 304.4896771653544 Td
262
+ /F1.0 6 Tf
263
+ [<524546203035>] TJ
264
+ ET
265
+
266
+ [0.3 0.6] 0 d
267
+ 0.3 w
268
+ 0.000 0.000 0.000 SCN
269
+ 63.780 301.191 m
270
+ 188.504 301.191 l
271
+ S
272
+ [ ] 0 d
273
+ 0.3 w
274
+ 0.000 0.000 0.000 SCN
275
+
276
+ BT
277
+ 65.77952755905513 304.4896771653544 Td
278
+ /F1.0 6 Tf
279
+ [<50726f6475746f20636f6d20435354203030202d2045737472616e676569726f202d2049434d53202d20495049>] TJ
280
+ ET
281
+
282
+ [0.3 0.6] 0 d
283
+ 0.3 w
284
+ 0.000 0.000 0.000 SCN
285
+ 188.504 301.191 m
286
+ 225.354 301.191 l
287
+ S
288
+ [ ] 0 d
289
+ 0.3 w
290
+ 0.000 0.000 0.000 SCN
291
+
292
+ BT
293
+ 190.50393700787401 304.4896771653544 Td
294
+ /F1.0 6 Tf
295
+ [<3930333033333239>] TJ
296
+ ET
297
+
298
+ [0.3 0.6] 0 d
299
+ 0.3 w
300
+ 0.000 0.000 0.000 SCN
301
+ 225.354 301.191 m
302
+ 248.031 301.191 l
303
+ S
304
+ [ ] 0 d
305
+ 0.3 w
306
+ 0.000 0.000 0.000 SCN
307
+
308
+ BT
309
+ 227.35433070866142 304.4896771653544 Td
310
+ /F1.0 6 Tf
311
+ [<313030>] TJ
312
+ ET
313
+
314
+ [0.3 0.6] 0 d
315
+ 0.3 w
316
+ 0.000 0.000 0.000 SCN
317
+ 248.031 301.191 m
318
+ 276.378 301.191 l
319
+ S
320
+ [ ] 0 d
321
+ 0.3 w
322
+ 0.000 0.000 0.000 SCN
323
+
324
+ BT
325
+ 250.03149606299212 304.4896771653544 Td
326
+ /F1.0 6 Tf
327
+ [<35313031>] TJ
328
+ ET
329
+
330
+ [0.3 0.6] 0 d
331
+ 0.3 w
332
+ 0.000 0.000 0.000 SCN
333
+ 276.378 301.191 m
334
+ 304.724 301.191 l
335
+ S
336
+ [ ] 0 d
337
+ 0.3 w
338
+ 0.000 0.000 0.000 SCN
339
+
340
+ BT
341
+ 278.37795275590554 304.4896771653544 Td
342
+ /F1.0 6 Tf
343
+ [<5043>] TJ
344
+ ET
345
+
346
+ [0.3 0.6] 0 d
347
+ 0.3 w
348
+ 0.000 0.000 0.000 SCN
349
+ 304.724 301.191 m
350
+ 341.575 301.191 l
351
+ S
352
+ [ ] 0 d
353
+ 0.3 w
354
+ 0.000 0.000 0.000 SCN
355
+
356
+ BT
357
+ 330.0748031496063 304.4896771653544 Td
358
+ /F1.0 6 Tf
359
+ [<312c3030>] TJ
360
+ ET
361
+
362
+ [0.3 0.6] 0 d
363
+ 0.3 w
364
+ 0.000 0.000 0.000 SCN
365
+ 341.575 301.191 m
366
+ 384.094 301.191 l
367
+ S
368
+ [ ] 0 d
369
+ 0.3 w
370
+ 0.000 0.000 0.000 SCN
371
+
372
+ BT
373
+ 369.5944881889764 304.4896771653544 Td
374
+ /F1.0 6 Tf
375
+ [<34392c3233>] TJ
376
+ ET
377
+
378
+ [0.3 0.6] 0 d
379
+ 0.3 w
380
+ 0.000 0.000 0.000 SCN
381
+ 384.094 301.191 m
382
+ 426.614 301.191 l
383
+ S
384
+ [ ] 0 d
385
+ 0.3 w
386
+ 0.000 0.000 0.000 SCN
387
+
388
+ BT
389
+ 412.1141732283465 304.4896771653544 Td
390
+ /F1.0 6 Tf
391
+ [<34392c3233>] TJ
392
+ ET
393
+
394
+ [0.3 0.6] 0 d
395
+ 0.3 w
396
+ 0.000 0.000 0.000 SCN
397
+ 426.614 301.191 m
398
+ 469.134 301.191 l
399
+ S
400
+ [ ] 0 d
401
+ 0.3 w
402
+ 0.000 0.000 0.000 SCN
403
+
404
+ BT
405
+ 454.63385826771656 304.4896771653544 Td
406
+ /F1.0 6 Tf
407
+ [<34392c3233>] TJ
408
+ ET
409
+
410
+ [0.3 0.6] 0 d
411
+ 0.3 w
412
+ 0.000 0.000 0.000 SCN
413
+ 469.134 301.191 m
414
+ 497.480 301.191 l
415
+ S
416
+ [ ] 0 d
417
+ 0.3 w
418
+ 0.000 0.000 0.000 SCN
419
+
420
+ BT
421
+ 485.9803149606299 304.4896771653544 Td
422
+ /F1.0 6 Tf
423
+ [<352c3930>] TJ
424
+ ET
425
+
426
+ [0.3 0.6] 0 d
427
+ 0.3 w
428
+ 0.000 0.000 0.000 SCN
429
+ 497.480 301.191 m
430
+ 525.827 301.191 l
431
+ S
432
+ [ ] 0 d
433
+ 0.3 w
434
+ 0.000 0.000 0.000 SCN
435
+
436
+ BT
437
+ 514.3267716535433 304.4896771653544 Td
438
+ /F1.0 6 Tf
439
+ [<322c3436>] TJ
440
+ ET
441
+
442
+ [0.3 0.6] 0 d
443
+ 0.3 w
444
+ 0.000 0.000 0.000 SCN
445
+ 525.827 301.191 m
446
+ 551.339 301.191 l
447
+ S
448
+ [ ] 0 d
449
+ 0.3 w
450
+ 0.000 0.000 0.000 SCN
451
+
452
+ BT
453
+ 536.8385826771654 304.4896771653544 Td
454
+ /F1.0 6 Tf
455
+ [<31322c3030>] TJ
456
+ ET
457
+
458
+ [0.3 0.6] 0 d
459
+ 0.3 w
460
+ 0.000 0.000 0.000 SCN
461
+ 551.339 301.191 m
462
+ 575.717 301.191 l
463
+ S
464
+ [ ] 0 d
465
+ 0.3 w
466
+ 0.000 0.000 0.000 SCN
467
+
468
+ BT
469
+ 564.2165354330709 304.4896771653544 Td
470
+ /F1.0 6 Tf
471
+ [<352c3030>] TJ
472
+ ET
473
+
474
+ Q
475
+
476
+ endstream
477
+ endobj
478
+ 5 0 obj
479
+ << /Type /Page
480
+ /Parent 3 0 R
481
+ /MediaBox [0 0 595.28 841.89]
482
+ /Contents 4 0 R
483
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
484
+ /Font << /F1.0 6 0 R
485
+ >>
486
+ >>
487
+ >>
488
+ endobj
489
+ 6 0 obj
490
+ << /Type /Font
491
+ /Subtype /Type1
492
+ /BaseFont /Times-Roman
493
+ /Encoding /WinAnsiEncoding
494
+ >>
495
+ endobj
496
+ xref
497
+ 0 7
498
+ 0000000000 65535 f
499
+ 0000000015 00000 n
500
+ 0000000109 00000 n
501
+ 0000000158 00000 n
502
+ 0000000215 00000 n
503
+ 0000005815 00000 n
504
+ 0000005995 00000 n
505
+ trailer
506
+ << /Size 7
507
+ /Root 2 0 R
508
+ /Info 1 0 R
509
+ >>
510
+ startxref
511
+ 6094
512
+ %%EOF