invoice_printer 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63f93d4c152d2abbbae2b1b8ceb8eb5dfd8be827
4
- data.tar.gz: a1c352ad082498294f84bd041768e7a7c3f47e63
3
+ metadata.gz: 8fc3304fb8f82abe319e931b27297b2caeb636b7
4
+ data.tar.gz: 96e10e8e77440dfde5db0f60e32b1affc48114ff
5
5
  SHA512:
6
- metadata.gz: f2fbdf0d91fcd1fbd6b478b4e6a9325697a02d355d3e7b03c3e4d5f1c0f6be60b62f8e66f410bbe9d64e219b052d72786f2fb60de83dbc2b08fcf8af21916013
7
- data.tar.gz: 828eff18046495b5bf2e4481715524c8742444af0722b11e74fe0158b8f792c63183588313e8159e0a99c9ed2a1850f1af05e90930c126d87f5fe7d6b52910b0
6
+ metadata.gz: 23fc46d3926aebf880c2980403815098fa06a9883811164ab3760ff06c477d3fdd65ee1db53ab2db7c04a5e2d2c5938a82f7f01ca5813e79332b20dd473cb6ab
7
+ data.tar.gz: 24a6748f0bf622127fcfa958f72b51711571cf87311ec0cb3aad978e021e55286aee3557ac9349d2037893cbc14c924c05f49e0d0cadbe9836734ec509c68979
data/README.md CHANGED
@@ -7,7 +7,9 @@ designed only to provide an interface to build the PDF version of these document
7
7
 
8
8
  **This project is still in development. 0.0.x versions are all development versions.**
9
9
 
10
- <img src="https://github.com/strzibny/invoice_printer/raw/master/examples/czech_invoice.jpg" width="193" />
10
+ <a href="https://github.com/strzibny/invoice_printer/raw/master/examples/complex_invoice.pdf">
11
+ <img src="https://github.com/strzibny/invoice_printer/raw/master/examples/complex_invoice.png" width="519" />
12
+ </a>
11
13
 
12
14
  See more usecases in the `examples/` directory.
13
15
 
@@ -22,7 +24,7 @@ See more usecases in the `examples/` directory.
22
24
  - Page numbers
23
25
  - Configurable labels
24
26
  - Configurable font file
25
- - Logotype
27
+ - Logotype (as image scaled to fit 50px of height)
26
28
  - Stamp & signature (as image)
27
29
  - Note
28
30
  - Well tested
@@ -0,0 +1,985 @@
1
+ %PDF-1.4
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 9110
21
+ >>
22
+ stream
23
+ q
24
+ /DeviceRGB cs
25
+ 0.000 0.000 0.000 scn
26
+
27
+ BT
28
+ 36.0 741.64 Td
29
+ /F1.0 20 Tf
30
+ [<496e> 20 <76> 25 <6f696365>] TJ
31
+ ET
32
+
33
+
34
+ BT
35
+ 402.24 741.64 Td
36
+ /F1.0 20 Tf
37
+ [<4e4f> 40 <2e20313938393030303030303031>] TJ
38
+ ET
39
+
40
+
41
+ BT
42
+ 46.0 688.82 Td
43
+ /F1.0 10 Tf
44
+ [<50726f> 15 <7669646572>] TJ
45
+ ET
46
+
47
+
48
+ BT
49
+ 46.0 665.948 Td
50
+ /F1.0 14 Tf
51
+ [<4a6f686e205768697465>] TJ
52
+ ET
53
+
54
+
55
+ BT
56
+ 46.0 648.82 Td
57
+ /F1.0 10 Tf
58
+ [<3574682041> 40 <76> 25 <656e> 10 <75652020202031>] TJ
59
+ ET
60
+
61
+
62
+ BT
63
+ 46.0 633.82 Td
64
+ /F1.0 10 Tf
65
+ [<373437203035>] TJ
66
+ ET
67
+
68
+
69
+ BT
70
+ 96.0 633.82 Td
71
+ /F1.0 10 Tf
72
+ [<4e5943>] TJ
73
+ ET
74
+
75
+ 42.0 706.0 m
76
+ 300.0 706.0 l
77
+ 303.3137 706.0 306.0 703.3137 306.0 700.0 c
78
+ 306.0 562.0 l
79
+ 306.0 558.6863 303.3137 556.0 300.0 556.0 c
80
+ 42.0 556.0 l
81
+ 38.6863 556.0 36.0 558.6863 36.0 562.0 c
82
+ 36.0 700.0 l
83
+ 36.0 703.3137 38.6863 706.0 42.0 706.0 c
84
+ h
85
+ S
86
+
87
+ BT
88
+ 326.0 688.82 Td
89
+ /F1.0 10 Tf
90
+ [<507572636861736572>] TJ
91
+ ET
92
+
93
+
94
+ BT
95
+ 326.0 665.948 Td
96
+ /F1.0 14 Tf
97
+ [<57696c6c20426c6163> 20 <6b>] TJ
98
+ ET
99
+
100
+
101
+ BT
102
+ 326.0 648.82 Td
103
+ /F1.0 10 Tf
104
+ [<3774682041> 40 <76> 25 <656e> 10 <75652020202031>] TJ
105
+ ET
106
+
107
+
108
+ BT
109
+ 326.0 633.82 Td
110
+ /F1.0 10 Tf
111
+ [<373437203730>] TJ
112
+ ET
113
+
114
+
115
+ BT
116
+ 376.0 633.82 Td
117
+ /F1.0 10 Tf
118
+ [<4e5943>] TJ
119
+ ET
120
+
121
+ 322.0 706.0 m
122
+ 580.0 706.0 l
123
+ 583.3137 706.0 586.0 703.3137 586.0 700.0 c
124
+ 586.0 562.0 l
125
+ 586.0 558.6863 583.3137 556.0 580.0 556.0 c
126
+ 322.0 556.0 l
127
+ 318.6863 556.0 316.0 558.6863 316.0 562.0 c
128
+ 316.0 700.0 l
129
+ 316.0 703.3137 318.6863 706.0 322.0 706.0 c
130
+ h
131
+ S
132
+
133
+ BT
134
+ 46.0 526.82 Td
135
+ /F1.0 10 Tf
136
+ [<50> 40 <61> 30 <796d656e742062> 20 <792062616e6b207472> 10 <616e7366> 30 <6572206f6e20746865206163636f756e742062656c6f> 15 <773a>] TJ
137
+ ET
138
+
139
+
140
+ BT
141
+ 46.0 511.82 Td
142
+ /F1.0 10 Tf
143
+ [<4163636f756e74204e4f3a>] TJ
144
+ ET
145
+
146
+
147
+ BT
148
+ 111.0 511.82 Td
149
+ /F1.0 10 Tf
150
+ [<313536353436353436343635>] TJ
151
+ ET
152
+
153
+ 42.0 544.0 m
154
+ 300.0 544.0 l
155
+ 303.3137 544.0 306.0 541.3137 306.0 538.0 c
156
+ 306.0 505.0 l
157
+ 306.0 501.6863 303.3137 499.0 300.0 499.0 c
158
+ 42.0 499.0 l
159
+ 38.6863 499.0 36.0 501.6863 36.0 505.0 c
160
+ 36.0 538.0 l
161
+ 36.0 541.3137 38.6863 544.0 42.0 544.0 c
162
+ h
163
+ S
164
+
165
+ BT
166
+ 326.0 526.82 Td
167
+ /F1.0 10 Tf
168
+ [<497373756520646174653a>] TJ
169
+ ET
170
+
171
+
172
+ BT
173
+ 426.0 526.82 Td
174
+ /F1.0 10 Tf
175
+ [<30352f30332f32303136>] TJ
176
+ ET
177
+
178
+
179
+ BT
180
+ 326.0 511.82 Td
181
+ /F1.0 10 Tf
182
+ [<44756520646174653a>] TJ
183
+ ET
184
+
185
+
186
+ BT
187
+ 426.0 511.82 Td
188
+ /F1.0 10 Tf
189
+ [<31392f30332f32303136>] TJ
190
+ ET
191
+
192
+ 322.0 544.0 m
193
+ 580.0 544.0 l
194
+ 583.3137 544.0 586.0 541.3137 586.0 538.0 c
195
+ 586.0 505.0 l
196
+ 586.0 501.6863 583.3137 499.0 580.0 499.0 c
197
+ 322.0 499.0 l
198
+ 318.6863 499.0 316.0 501.6863 316.0 505.0 c
199
+ 316.0 538.0 l
200
+ 316.0 541.3137 318.6863 544.0 322.0 544.0 c
201
+ h
202
+ S
203
+ 0.961 0.961 0.961 scn
204
+ 36.0 458.128 124.0489 22.872 re
205
+ f
206
+ 0.000 0.000 0.000 scn
207
+ 1 w
208
+ 36.0 481.5 m
209
+ 36.0 456.628 l
210
+ S
211
+ 160.0489 481.5 m
212
+ 160.0489 456.628 l
213
+ S
214
+ 36.0 481.0 m
215
+ 160.0489 481.0 l
216
+ S
217
+ 36.0 457.128 m
218
+ 160.0489 457.128 l
219
+ S
220
+ /DeviceRGB CS
221
+ 0.000 0.000 0.000 SCN
222
+ 1 w
223
+
224
+ BT
225
+ 41.0 464.756 Td
226
+ /F1.0 12 Tf
227
+ [<4974656d>] TJ
228
+ ET
229
+
230
+ 0.000 0.000 0.000 scn
231
+ 0.961 0.961 0.961 scn
232
+ 160.0489 458.128 82.2011 22.872 re
233
+ f
234
+ 0.000 0.000 0.000 scn
235
+ 1 w
236
+ 160.0489 481.5 m
237
+ 160.0489 456.628 l
238
+ S
239
+ 242.25 481.5 m
240
+ 242.25 456.628 l
241
+ S
242
+ 160.0489 481.0 m
243
+ 242.25 481.0 l
244
+ S
245
+ 160.0489 457.128 m
246
+ 242.25 457.128 l
247
+ S
248
+ 0.000 0.000 0.000 SCN
249
+ 1 w
250
+
251
+ BT
252
+ 192.562 464.756 Td
253
+ /F1.0 12 Tf
254
+ [<5175616e74697479>] TJ
255
+ ET
256
+
257
+ 0.000 0.000 0.000 scn
258
+ 0.961 0.961 0.961 scn
259
+ 242.25 458.128 47.8261 22.872 re
260
+ f
261
+ 0.000 0.000 0.000 scn
262
+ 1 w
263
+ 242.25 481.5 m
264
+ 242.25 456.628 l
265
+ S
266
+ 290.0761 481.5 m
267
+ 290.0761 456.628 l
268
+ S
269
+ 242.25 481.0 m
270
+ 290.0761 481.0 l
271
+ S
272
+ 242.25 457.128 m
273
+ 290.0761 457.128 l
274
+ S
275
+ 0.000 0.000 0.000 SCN
276
+ 1 w
277
+
278
+ BT
279
+ 263.7401 464.756 Td
280
+ /F1.0 12 Tf
281
+ [<556e6974>] TJ
282
+ ET
283
+
284
+ 0.000 0.000 0.000 scn
285
+ 0.961 0.961 0.961 scn
286
+ 290.0761 458.128 127.038 22.872 re
287
+ f
288
+ 0.000 0.000 0.000 scn
289
+ 1 w
290
+ 290.0761 481.5 m
291
+ 290.0761 456.628 l
292
+ S
293
+ 417.1141 481.5 m
294
+ 417.1141 456.628 l
295
+ S
296
+ 290.0761 481.0 m
297
+ 417.1141 481.0 l
298
+ S
299
+ 290.0761 457.128 m
300
+ 417.1141 457.128 l
301
+ S
302
+ 0.000 0.000 0.000 SCN
303
+ 1 w
304
+
305
+ BT
306
+ 337.9181 464.756 Td
307
+ /F1.0 12 Tf
308
+ [<5072> -15 <69636520706572206974656d>] TJ
309
+ ET
310
+
311
+ 0.000 0.000 0.000 scn
312
+ 0.961 0.961 0.961 scn
313
+ 417.1141 458.128 91.1685 22.872 re
314
+ f
315
+ 0.000 0.000 0.000 scn
316
+ 1 w
317
+ 417.1141 481.5 m
318
+ 417.1141 456.628 l
319
+ S
320
+ 508.2826 481.5 m
321
+ 508.2826 456.628 l
322
+ S
323
+ 417.1141 481.0 m
324
+ 508.2826 481.0 l
325
+ S
326
+ 417.1141 457.128 m
327
+ 508.2826 457.128 l
328
+ S
329
+ 0.000 0.000 0.000 SCN
330
+ 1 w
331
+
332
+ BT
333
+ 454.9946 464.756 Td
334
+ /F1.0 12 Tf
335
+ [<3130252056> 80 <41> 120 <54>] TJ
336
+ ET
337
+
338
+ 0.000 0.000 0.000 scn
339
+ 0.961 0.961 0.961 scn
340
+ 508.2826 458.128 77.7174 22.872 re
341
+ f
342
+ 0.000 0.000 0.000 scn
343
+ 1 w
344
+ 508.2826 481.5 m
345
+ 508.2826 456.628 l
346
+ S
347
+ 586.0 481.5 m
348
+ 586.0 456.628 l
349
+ S
350
+ 508.2826 481.0 m
351
+ 586.0 481.0 l
352
+ S
353
+ 508.2826 457.128 m
354
+ 586.0 457.128 l
355
+ S
356
+ 0.000 0.000 0.000 SCN
357
+ 1 w
358
+
359
+ BT
360
+ 539.648 464.756 Td
361
+ /F1.0 12 Tf
362
+ [<416d6f756e74>] TJ
363
+ ET
364
+
365
+ 0.000 0.000 0.000 scn
366
+ 1 w
367
+ 36.0 457.628 m
368
+ 36.0 432.756 l
369
+ S
370
+ 160.0489 457.628 m
371
+ 160.0489 432.756 l
372
+ S
373
+ 0.000 0.000 0.000 SCN
374
+ 1 w
375
+
376
+ BT
377
+ 41.0 440.884 Td
378
+ /F1.0 12 Tf
379
+ [<50726f67> 10 <72> 10 <616d6d696e67>] TJ
380
+ ET
381
+
382
+ 0.000 0.000 0.000 scn
383
+ 1 w
384
+ 160.0489 457.628 m
385
+ 160.0489 432.756 l
386
+ S
387
+ 242.25 457.628 m
388
+ 242.25 432.756 l
389
+ S
390
+ 0.000 0.000 0.000 SCN
391
+ 1 w
392
+
393
+ BT
394
+ 223.906 440.884 Td
395
+ /F1.0 12 Tf
396
+ [<3130>] TJ
397
+ ET
398
+
399
+ 0.000 0.000 0.000 scn
400
+ 1 w
401
+ 242.25 457.628 m
402
+ 242.25 432.756 l
403
+ S
404
+ 290.0761 457.628 m
405
+ 290.0761 432.756 l
406
+ S
407
+ 0.000 0.000 0.000 SCN
408
+ 1 w
409
+
410
+ BT
411
+ 274.4081 440.884 Td
412
+ /F1.0 12 Tf
413
+ [<6872>] TJ
414
+ ET
415
+
416
+ 0.000 0.000 0.000 scn
417
+ 1 w
418
+ 290.0761 457.628 m
419
+ 290.0761 432.756 l
420
+ S
421
+ 417.1141 457.628 m
422
+ 417.1141 432.756 l
423
+ S
424
+ 0.000 0.000 0.000 SCN
425
+ 1 w
426
+
427
+ BT
428
+ 388.7621 440.884 Td
429
+ /F1.0 12 Tf
430
+ [<24203630>] TJ
431
+ ET
432
+
433
+ 0.000 0.000 0.000 scn
434
+ 1 w
435
+ 417.1141 457.628 m
436
+ 417.1141 432.756 l
437
+ S
438
+ 508.2826 457.628 m
439
+ 508.2826 432.756 l
440
+ S
441
+ 0.000 0.000 0.000 SCN
442
+ 1 w
443
+
444
+ BT
445
+ 479.9306 440.884 Td
446
+ /F1.0 12 Tf
447
+ [<24203630>] TJ
448
+ ET
449
+
450
+ 0.000 0.000 0.000 scn
451
+ 1 w
452
+ 508.2826 457.628 m
453
+ 508.2826 432.756 l
454
+ S
455
+ 586.0 457.628 m
456
+ 586.0 432.756 l
457
+ S
458
+ 0.000 0.000 0.000 SCN
459
+ 1 w
460
+
461
+ BT
462
+ 550.976 440.884 Td
463
+ /F1.0 12 Tf
464
+ [<2420363030>] TJ
465
+ ET
466
+
467
+ 0.000 0.000 0.000 scn
468
+ 0.961 0.961 0.961 scn
469
+ 36.0 408.884 124.0489 24.372 re
470
+ f
471
+ 0.000 0.000 0.000 scn
472
+ 1 w
473
+ 36.0 433.756 m
474
+ 36.0 408.884 l
475
+ S
476
+ 160.0489 433.756 m
477
+ 160.0489 408.884 l
478
+ S
479
+ 0.000 0.000 0.000 SCN
480
+ 1 w
481
+
482
+ BT
483
+ 41.0 417.012 Td
484
+ /F1.0 12 Tf
485
+ [<436f6e736f6c74696e67>] TJ
486
+ ET
487
+
488
+ 0.000 0.000 0.000 scn
489
+ 0.961 0.961 0.961 scn
490
+ 160.0489 408.884 82.2011 24.372 re
491
+ f
492
+ 0.000 0.000 0.000 scn
493
+ 1 w
494
+ 160.0489 433.756 m
495
+ 160.0489 408.884 l
496
+ S
497
+ 242.25 433.756 m
498
+ 242.25 408.884 l
499
+ S
500
+ 0.000 0.000 0.000 SCN
501
+ 1 w
502
+
503
+ BT
504
+ 223.906 417.012 Td
505
+ /F1.0 12 Tf
506
+ [<3130>] TJ
507
+ ET
508
+
509
+ 0.000 0.000 0.000 scn
510
+ 0.961 0.961 0.961 scn
511
+ 242.25 408.884 47.8261 24.372 re
512
+ f
513
+ 0.000 0.000 0.000 scn
514
+ 1 w
515
+ 242.25 433.756 m
516
+ 242.25 408.884 l
517
+ S
518
+ 290.0761 433.756 m
519
+ 290.0761 408.884 l
520
+ S
521
+ 0.000 0.000 0.000 SCN
522
+ 1 w
523
+
524
+ BT
525
+ 274.4081 417.012 Td
526
+ /F1.0 12 Tf
527
+ [<6872>] TJ
528
+ ET
529
+
530
+ 0.000 0.000 0.000 scn
531
+ 0.961 0.961 0.961 scn
532
+ 290.0761 408.884 127.038 24.372 re
533
+ f
534
+ 0.000 0.000 0.000 scn
535
+ 1 w
536
+ 290.0761 433.756 m
537
+ 290.0761 408.884 l
538
+ S
539
+ 417.1141 433.756 m
540
+ 417.1141 408.884 l
541
+ S
542
+ 0.000 0.000 0.000 SCN
543
+ 1 w
544
+
545
+ BT
546
+ 388.7621 417.012 Td
547
+ /F1.0 12 Tf
548
+ [<24203330>] TJ
549
+ ET
550
+
551
+ 0.000 0.000 0.000 scn
552
+ 0.961 0.961 0.961 scn
553
+ 417.1141 408.884 91.1685 24.372 re
554
+ f
555
+ 0.000 0.000 0.000 scn
556
+ 1 w
557
+ 417.1141 433.756 m
558
+ 417.1141 408.884 l
559
+ S
560
+ 508.2826 433.756 m
561
+ 508.2826 408.884 l
562
+ S
563
+ 0.000 0.000 0.000 SCN
564
+ 1 w
565
+
566
+ BT
567
+ 479.9306 417.012 Td
568
+ /F1.0 12 Tf
569
+ [<24203330>] TJ
570
+ ET
571
+
572
+ 0.000 0.000 0.000 scn
573
+ 0.961 0.961 0.961 scn
574
+ 508.2826 408.884 77.7174 24.372 re
575
+ f
576
+ 0.000 0.000 0.000 scn
577
+ 1 w
578
+ 508.2826 433.756 m
579
+ 508.2826 408.884 l
580
+ S
581
+ 586.0 433.756 m
582
+ 586.0 408.884 l
583
+ S
584
+ 0.000 0.000 0.000 SCN
585
+ 1 w
586
+
587
+ BT
588
+ 550.976 417.012 Td
589
+ /F1.0 12 Tf
590
+ [<2420333030>] TJ
591
+ ET
592
+
593
+ 0.000 0.000 0.000 scn
594
+ 1 w
595
+ 36.0 409.884 m
596
+ 36.0 385.012 l
597
+ S
598
+ 160.0489 409.884 m
599
+ 160.0489 385.012 l
600
+ S
601
+ 36.0 385.512 m
602
+ 160.0489 385.512 l
603
+ S
604
+ 0.000 0.000 0.000 SCN
605
+ 1 w
606
+
607
+ BT
608
+ 41.0 393.14 Td
609
+ /F1.0 12 Tf
610
+ [<537570706f72> -40 <74>] TJ
611
+ ET
612
+
613
+ 0.000 0.000 0.000 scn
614
+ 1 w
615
+ 160.0489 409.884 m
616
+ 160.0489 385.012 l
617
+ S
618
+ 242.25 409.884 m
619
+ 242.25 385.012 l
620
+ S
621
+ 160.0489 385.512 m
622
+ 242.25 385.512 l
623
+ S
624
+ 0.000 0.000 0.000 SCN
625
+ 1 w
626
+
627
+ BT
628
+ 223.906 393.14 Td
629
+ /F1.0 12 Tf
630
+ [<3230>] TJ
631
+ ET
632
+
633
+ 0.000 0.000 0.000 scn
634
+ 1 w
635
+ 242.25 409.884 m
636
+ 242.25 385.012 l
637
+ S
638
+ 290.0761 409.884 m
639
+ 290.0761 385.012 l
640
+ S
641
+ 242.25 385.512 m
642
+ 290.0761 385.512 l
643
+ S
644
+ 0.000 0.000 0.000 SCN
645
+ 1 w
646
+
647
+ BT
648
+ 274.4081 393.14 Td
649
+ /F1.0 12 Tf
650
+ [<6872>] TJ
651
+ ET
652
+
653
+ 0.000 0.000 0.000 scn
654
+ 1 w
655
+ 290.0761 409.884 m
656
+ 290.0761 385.012 l
657
+ S
658
+ 417.1141 409.884 m
659
+ 417.1141 385.012 l
660
+ S
661
+ 290.0761 385.512 m
662
+ 417.1141 385.512 l
663
+ S
664
+ 0.000 0.000 0.000 SCN
665
+ 1 w
666
+
667
+ BT
668
+ 388.7621 393.14 Td
669
+ /F1.0 12 Tf
670
+ [<24203135>] TJ
671
+ ET
672
+
673
+ 0.000 0.000 0.000 scn
674
+ 1 w
675
+ 417.1141 409.884 m
676
+ 417.1141 385.012 l
677
+ S
678
+ 508.2826 409.884 m
679
+ 508.2826 385.012 l
680
+ S
681
+ 417.1141 385.512 m
682
+ 508.2826 385.512 l
683
+ S
684
+ 0.000 0.000 0.000 SCN
685
+ 1 w
686
+
687
+ BT
688
+ 479.9306 393.14 Td
689
+ /F1.0 12 Tf
690
+ [<24203330>] TJ
691
+ ET
692
+
693
+ 0.000 0.000 0.000 scn
694
+ 1 w
695
+ 508.2826 409.884 m
696
+ 508.2826 385.012 l
697
+ S
698
+ 586.0 409.884 m
699
+ 586.0 385.012 l
700
+ S
701
+ 508.2826 385.512 m
702
+ 586.0 385.512 l
703
+ S
704
+ 0.000 0.000 0.000 SCN
705
+ 1 w
706
+
707
+ BT
708
+ 550.976 393.14 Td
709
+ /F1.0 12 Tf
710
+ [<2420333330>] TJ
711
+ ET
712
+
713
+ 0.000 0.000 0.000 scn
714
+
715
+ BT
716
+ 483.636 344.268 Td
717
+ /F1.0 12 Tf
718
+ [<537562746f74616c3a>] TJ
719
+ ET
720
+
721
+ 0.000 0.000 0.000 scn
722
+
723
+ BT
724
+ 541.0 344.268 Td
725
+ /F1.0 12 Tf
726
+ [<2420312c303030>] TJ
727
+ ET
728
+
729
+ 0.000 0.000 0.000 scn
730
+
731
+ BT
732
+ 479.616 320.396 Td
733
+ /F1.0 12 Tf
734
+ [<3130252056> 80 <41> 120 <54> 20 <3a>] TJ
735
+ ET
736
+
737
+ 0.000 0.000 0.000 scn
738
+
739
+ BT
740
+ 541.0 320.396 Td
741
+ /F1.0 12 Tf
742
+ [<2420313030>] TJ
743
+ ET
744
+
745
+ 0.000 0.000 0.000 scn
746
+
747
+ BT
748
+ 467.008 286.28 Td
749
+ /F2.0 16 Tf
750
+ [<54> 80 <6f74616c3a2020202420312c313030>] TJ
751
+ ET
752
+
753
+
754
+ q
755
+ 142.0 0.0 0.0 75.0 434.0 188.728 cm
756
+ /I1 Do
757
+ Q
758
+
759
+ q
760
+ 49.6479 0.0 0.0 50.0 36.0 71.0 cm
761
+ /I2 Do
762
+ Q
763
+
764
+ BT
765
+ 36.0 38.82 Td
766
+ /F1.0 10 Tf
767
+ [<546869732069732061206e6f74652061742074686520656e642e>] TJ
768
+ ET
769
+
770
+ Q
771
+
772
+ endstream
773
+ endobj
774
+ 5 0 obj
775
+ << /Type /Page
776
+ /Parent 3 0 R
777
+ /MediaBox [0 0 612.0 792.0]
778
+ /Contents 4 0 R
779
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
780
+ /Font << /F1.0 6 0 R
781
+ /F2.0 7 0 R
782
+ >>
783
+ /XObject << /I1 8 0 R
784
+ /I2 10 0 R
785
+ >>
786
+ >>
787
+ >>
788
+ endobj
789
+ 6 0 obj
790
+ << /Type /Font
791
+ /Subtype /Type1
792
+ /BaseFont /Helvetica
793
+ /Encoding /WinAnsiEncoding
794
+ >>
795
+ endobj
796
+ 7 0 obj
797
+ << /Type /Font
798
+ /Subtype /Type1
799
+ /BaseFont /Helvetica-Bold
800
+ /Encoding /WinAnsiEncoding
801
+ >>
802
+ endobj
803
+ 8 0 obj
804
+ << /Type /XObject
805
+ /Subtype /Image
806
+ /Height 75
807
+ /Width 142
808
+ /BitsPerComponent 8
809
+ /ColorSpace /DeviceRGB
810
+ /SMask 9 0 R
811
+ /Length 5425
812
+ /Filter [/FlateDecode]
813
+ /DecodeParms [<< /Predictor 15
814
+ /Colors 3
815
+ /BitsPerComponent 8
816
+ /Columns 142
817
+ >>]
818
+ >>
819
+ stream
820
+ x��] TG�nf�d�c��� ^Qt=����F�11��$1j���E���"1/F�k��jb��U�xF��r�� ��0��=����tAg�ap�<��k��������UWwk@�B���
821
+ ���m۶����mʟ������S��v��
822
+ [���[kk����H���b�p� CKKCc{{Skk#[[c�W�I
823
+ MR��F���ܿ/x�@�������oA��UKK#0ggg��hjoo��:9��W
824
+ ;v�III&L���'U��3f��A��x�p/�2`L
825
+
826
+ G��?fee!maa4w��G
827
+ �/_����P��><��T����� ��@�gs�U�V���}��W���9
828
+ g���� oܸ�L �8q���x֬YEEE�^��a�;���(z�
829
+ JK��m��Ҷu�� �g�`�k�G�ԥjԨ�ƳgK���E�֊1y:~�h��\���q��$E��ի}�<��'膪��KSR�����H��UUU;v��O�����T���5��
830
+ �o�ٳg5�ބ,0&�ZܻW��"(+EF>B��>cCEDx���=z�(77W���,��j�����Buu��q�(��M��C�(����%3f8�'O�ߠ��ʺ:
831
+
832
+ joIvvvP��…�����&[� ��k}��li�*--=r�������
833
+ 9���,[�lժUr��S��4lذ��0%�~�7֭[��χ[?z�haa���),|��G��l��A��H�0���NN]�~��ˆ��'LH(�1
834
+ g�-�I���҅Ѓ�H����+��݀ �b���߿h�"__�/���+����2 xB����FVU|||������%��~O���ª��J��D��p��)-��}��\]]y�|��t� ��-[�0K�]���T�kΜ9�lW�^=u��͛7�j!�! Xa���_{�5�%6?|X}��Zq�Xqk��!N ���]�ʯ]�Ѝ������D `��pV�}���b+V�@@rr�,�4&'{nذa�ҥk֬�F�s������3P�L���!�2��y*�b���&L@���
835
+ ���i����r
836
+ 
837
+ �gll �����rv^���ںAA���)�ܜ���NL����1brN��o�ڵ:���KNNFX����H���P���-��rp��#G���U"� 1 www�
838
+ ?��>��o��.\i�+'ړ�8�\)c��D"Iff������..�M�������B@% B���$%UC��Ԉ��.k�F?��{��ƌ�ݽ;���55U��go/]{������U����5
839
+ %�s����Fh���&8O���P�ٳFl��P���\]�`���\Y��ᰡԳ��Q���վ˗�67K�ޭ�p��曎j�����Ə���W>"��-%}ܕ�����,dA�BP���M���M�\5���� ��m�����`����yyq��l��X�2�����pw���B����=h���M���(��ϟ�)��z����1 R��?�TLNRVV6cKJ���ٙ0��U��uJG��{��a[_~��oAK[T��r1!���LIh�;87L`e�����5��5��7bJ��� � �ʔ�m��Tħ�(ߕ+S�i+*��n���Az��&-~� ��K�B��!1�%�G��h=�q��� !�B��ZO �ی~�?���y�����'I�HUH������w�T�֊-,zӟ |bN�m�\gX�@��9�0�s�W���`��i�ݛ��'���f9�S����<D�AXYaxJ�ζm烃�șP�7Y��*!A���I|�4����e���ƍS����1J,nss�/O���&�m�^�.�(��CZ>�f1���u��)*U�C�SY%Ϧ�8����L��P%b���n�3EA����nP�%E��>�QT3E=VZ�ޭc����)�4E��𤱰v���O�m�"�����i�t��v����d^e�AD,����~Q�[�i��H)��EU���=9��ުhʻE�et�}i�G��J_�B��?����)���e𢅵��������>Pt3�Ϡ�:��)�Y_&=�v%e{ܐ���t=ROu�(>[a �h&N�^WЗ���6z�)tY& \�,ڝ�^2�H
840
+ ����.�XucU�e.�S��z"��B�#���b1ƅ06$� �],EN�@�x��0�%�Mx��{̨'�5��y1����E�*�:H�tTҦ��ҙG��>��;�.?OP��?���L������t�� � h&��\�����j':�hQ��g�H���!������{":�Dw�t��\[�"��� }GCV?����Х;b� �?G�G��s&2�h����+�C�?��C̠ �"I���OcL
841
+ 񶢰�I�t�_@����S:���L�t�j8��뒥����)�r����Ո7��o��3���h
842
+ endstream
843
+ endobj
844
+ 9 0 obj
845
+ << /Type /XObject
846
+ /Subtype /Image
847
+ /Height 75
848
+ /Width 142
849
+ /BitsPerComponent 8
850
+ /ColorSpace /DeviceGray
851
+ /Decode [0 1]
852
+ /Length 683
853
+ /Filter [/FlateDecode]
854
+ /DecodeParms [<< /Predictor 15
855
+ /Colors 1
856
+ /BitsPerComponent 8
857
+ /Columns 142
858
+ >>]
859
+ >>
860
+ stream
861
+ x��KhA��i�I5A
862
+ �Aoۛ�B�ăh�R��P�@��P�(��"A�J��R�)�Z����M�1�&
863
+ 9�P��RD���w��ԡLGt
864
+ �C!u(��ԡLG�ũ��`�LG��L� ֮�`ّ:R�B�PH
865
+ �C!u(�m��ȹ� ���l2�ɜڠ*���Y�>m�l�Ux��c���ܜȔ���G�Ѱ�>�Ϫr����%� q'�/[���3������gm�ٱ�6�^��
866
+ c��G��U�dt`v� 3=`�}LG��AWn���[���O�O?������ۻ�w��A(�>�g�\:l����;�J�a�X_C:��6k���8�����z��WN2�/R���p��
867
+ endstream
868
+ endobj
869
+ 10 0 obj
870
+ << /Type /XObject
871
+ /Subtype /Image
872
+ /Height 142
873
+ /Width 141
874
+ /BitsPerComponent 8
875
+ /ColorSpace /DeviceRGB
876
+ /SMask 11 0 R
877
+ /Length 9550
878
+ /Filter [/FlateDecode]
879
+ /DecodeParms [<< /Predictor 15
880
+ /Colors 3
881
+ /BitsPerComponent 8
882
+ /Columns 141
883
+ >>]
884
+ >>
885
+ stream
886
+ x��}ipיX���sa�$NR$P��^--S�-��Ij�q���cWAiW E[�ʟ�L����ة�U: ��C��X�se7�JT�J����,�o�$sa�~��{�������1���@p��������R5���I#KC
887
+ �z���a�)Ta�����vh�@��[���c7<�& �LAHQu���Z��n�S�/�M��G�I(�b(!-�>�};����� P0V���*�b~(�:_����J
888
+ ��V����.��p ��k
889
+ +z�LaTAi����;�]�Q؍xb�N�V2�#���^�Y+o�(���R�`��x㤚ƻ a�O��DZ��X��T^�]���Q�i�W��͠�]@-����p�� ��h��5 3�4���� ��bze�c�]���� ��щ������\|��(�� C���h��O�??�4E�'�1��~��+2!��)P �%�ƂQ��';��݂��̤X
890
+ l�w��kϟt���=0xx]ڡ�
891
+ <YbIC��Z;�@u�#�"�S�2�Bo�'�x���T�w��h�v�3�(�b �Ы�b��x��֤jp,6#���Ua����I��.�����C׭8��a!$)b��^�Vι�TW&:s¡۵Or;�]@�
892
+ �� bBU�U��)���>�8�"O`�KSwJo8 v(�V XH9����/^�#��'D� �֑���6fN�<e��Y�6���i
893
+ �c4�S�!�Q.���� 6����Q�6�T�;f^���S,+������"�,Ic�Y^�.��k[ (�)糋��̙x��|��1��<�
894
+ ����iEɈ����`�O�J(0
895
+ _�_<ڄ�Ԋ�Z��9a�!6��ql-�Q�j�, �e&%?�~}�0nO�Y��b��|�����RY��(�&<EfN�NJ��R�_|��~�Dg�
896
+ w��J��w��+��y�iׁ/!��D�S����r'C#׮�d�NCD�Y(5l���d�PnZ�byy��Kq=�k~�׋�;��k�
897
+ ߎC^dXZ+�ɈX(��/?�8Q�<�����2R���do���g�V�:J�K!{��rb٭�����
898
+ %��a�-��+��)H��
899
+ Y8;!Ґ�+m�3$�y����_Ÿ���k6���9�1����ߩ��j#㕐@��o|��㺮��_7�y������ (��n�Т�ٯ`��:�� �8=~�`M+o���n�]����I���Y���~����z3�e ]I�N7��?#`V8؃t����*�����/���T*5==������_~yjj
900
+ ^˷6^��ՖG ��L��Z� �DU��ެ�����!7�P+�V�(R%)XY�™a��a�p���>L�n�ǧ�O�V98 �Ē��Jq�W3ާ��|�$�ȑ#�A(�����ܶ+$�
901
+ T�M-
902
+ 7��[xy���d�t�m?��,Ex" ����p0^�.�0�*=���6p����i{5 �d@���S�"�*��pB,�X1��sc)xб �dI�0�Z��raNFn��>���k���yC����x>�@ni��e�E� ���vU��I& �K�����/LJ���vn`6�3ʢw�:pa�q�h2?�-�{/7��n��*ĀO�����O�m����س<Xw�g��6����Ti�C�.�"��Ye��U}#��V�m��,�Y3u��9#����Prԝz|������b�Df�>'���-����!�����gB�Mv�1]�&�6fN)2�d3�ޚs'��T?�h��������.=�N����9�g�I��:�6+����?�6��۶�����\ 7�UNá~E-V2��]����O�]�����\G�#�N݊d�n�y[)W�s�P��j+% �����xb/��$��wx5 _��"�mՌ��e�܁�˾�ݥ$�(�v�w�[P$��)a% ���݇���ȕ�6V��t�`YT�x����C g'D��1O��#�O��|#ɶ��U��(�V�2@��^?H "щ�&�%gc�H<!$��얎(cʌv���Y[*=�ry �>�LG2Ċ���\�=�δ~%��ؒ��]Q! �c� "
903
+ p�#s9ݦ
904
+ ͂�n��Xw�b�g뛰���y��Z�lq���De�ݰ<s̏��rjS���9�'�3:���4�!�@3�2v�
905
+ �}+" ��^�H��ԗ2(%Z���)���\�U�F�w|g�=����ώ#��d) ��F���#�����Ǖ(�p��F7J���ox���P�POJ���3[(��e�\W,�!:r�@�����) c���s�"w�}���b� Ͽ���D3$�!�i*�j�@Ǩӥ�z�� �c}QۻߞIȣS]{���r_�u ��-�!RR�p�X<��ʡ�\�������$��˟}
906
+ �#[�͒8�c&B���ʱ2|yN^ӣ�b�S5�nbYIS0T�YjU�b|O#�jC���
907
+ ���g�JA���h�!�u�]M)W�m,�#������:NtLRq$;�S:b�5�*������~�c�B�n�*�B"����R,x�{����H��m���*�^�i
908
+ �ڠ��F��B���i�K&[viH��Ql=�/�)��,,V��=?� ��ת�������1����MM��D�<n�Li���Gs��WU{=M�� #W��k?�}�R<پn��)v'��֦��<[�y�+ ��=^��8H�j �0_T �H�*�1�lf�/=wp���S���^+o� FY��$ ��=�(r��ܱ��z�A<��
909
+ ��D�B���+V�5�X+C��"!ڑ���O�v��7���ꙣi�M�H�9�Sȋ�dC%�r��SZ�zxa���}�b��h�Hč����"��.�A��ez3k�Ob݉l�Iu���.َLsy>�,��x�4w3�y�_VJ��̽(i�B��,���'� B�z�\�+��F��\��nE�P���bi4����r��T[)2�h�����V�\�=F�9Y�>��d�$e�d�S��(���+s�" �0�%V� ��"�\ynL�s7��ST6�Ha��vB�׬ by8�b-�'柟��ڇ����gv��=8�+��p�*vkQ��b�Ve�k��v�w���RL�(v$��ݚ���oY�Ql��lX���Y<Ky�f���;e�V���淫m�KY\@��RF��a"��I��D��.o_�r��Q$#���n��9�^��iB��ڢ��r��f��ljϠ��J���z*E�4��Z0�5�X�@S�UK�p ��,��glW��P`�Dy*^��w��K�܍[�Z%١�y��4���ݰ0+aOV��=J0U�g}HP |�p2�y$��
910
+ �Z,C��sk�����Jx}+=���>OQ�\�V@�$�|�&g�����^py����@�ό��"�ƣ���QZ��Y.�x8�ѡ��R��2I�f)�ʨ�a8C
911
+ ��n�����ɘ�V��������]+�D��=��p,�a }ߛ(Y�9KW��k���P���zYp�z,���qhh�sk���88�Wʤ+E,��B��r:F@�1��3X ��HW/r��c_�ە/'�e֬6���yo�hY�iup����Ł��m3�����'��v���>�r
912
+ ��ޜ�3C�.�*�"�h
913
+ vn��\�&I,�.큄˵��sq�M��7���m9� �+��[]:0'��Q�P��"����4�y���ى��Z� y�;�l�-���1ˮ�H�(�@�n5�r7���o��E��za��i�"ؑ�r+Vsҝj6/��'�� ��ZW�ן���4��& :�׋{��l� � ���-xZK� ���[�W4,�?�g��Y�2��6V�i¼�X�]Ĭ�d�`���WڲpssݤY�|m�ӧ����-c!����$S`h��\���x���S�v��&A�'y�k}0?=Ve�����n��~�h���h=e܈d~���u �f��zi���ṵ��_��_���s
914
+ O�b�N�>���s0��|���t�� X �R�g-�� �рޝ�-9��x>lMY> XMf" ��c�:�z�`��=FŬE]�Mue�@w��.����9�t��Ze�^|Mue񙦆��9\�R��k�O��z�V4cTp��y���y{<��fδ�y�5���ǫ�pqj���!|$�?����u����.�˫g�DQ r��D�̨H�������r�zv� vhO���h>\M�)��t`2O����l3
915
+ Ud�,*R;Ԋ����f��)�"�le�yg�Qp�D�=H�� !��d�ק!���)и�~��V��v8
916
+ ���X�ߎf6��g��Di�5���N�]I��/�����<�kI�!����Ҳ�r�"l�;r������������HƲX| ޺�|��\�d��
917
+ �\8�����X&U�
918
+ �^��)���N��Ӈ�����A��}^+8_Qv�X��$b��^������^h��~��H�� r��F�u]lm0���\O�r ��<`�^}�ΐ��K^�JA�G��E���E�ڿ͈
919
+ �7�)���tUybG������7��Ԩ_� oe�p��R��DDE����P����~q�t~ֶl�!_��A���u����\���d(W�xm��H�Cws�j�����X[�4�M��L��$����
- 0SC"�]��6�� O`���/�v��T( D���܃��k��:�|%���>���<>6��3]�rFM��c>���}%CH�-�����O���p
920
+ q�g��?�Z��Q1MdP88ūx*�'_ï�0�6�$a�P���O=%���Zr_Opl|��/��%��#�P���̙X��t�ָ�����f&�E�TzeP��������g= �2��4 �(�.�U81L]�=����`.�N>
921
+ �����s!8����K$�|>C
922
+ �KJK��V�<�#b�������� -VM�3O��{%�ͪ���֛Vb�""�����s����#��S��$3�(!f��?��7��Mr0�scڸ�$��#��ŧ�F��4, l������8���d�j��4DfNE�O2����{���.�؅S,D`�;�J� �Ϝ���8��j�u��)�I��Yd,Б��$ r�&��L�*4���.O�U��M�6fNi�`V�-���i�-�ȋ'1��y�;lr��9b,�
923
+ ������Y��xN��+�A�I\u���2:sJ�=� � �wGpX2��%�D ���67
924
+ �\CJǮqQ�
925
+ <YU*�%g��lV�{���ąD����q�|&h7{��m&��“�k����p���Mg�(V��d�uF����3�|��a�f0R)�g%H�_��Ch7[u�O��O���j�@����ȕG�<������E��v<A��S,��V���XΘ)&�He|���a��3e����)�
926
+ endstream
927
+ endobj
928
+ 11 0 obj
929
+ << /Type /XObject
930
+ /Subtype /Image
931
+ /Height 142
932
+ /Width 141
933
+ /BitsPerComponent 8
934
+ /ColorSpace /DeviceGray
935
+ /Decode [0 1]
936
+ /Length 4264
937
+ /Filter [/FlateDecode]
938
+ /DecodeParms [<< /Predictor 15
939
+ /Colors 1
940
+ /BitsPerComponent 8
941
+ /Columns 141
942
+ >>]
943
+ >>
944
+ stream
945
+ x���y@���?sT�;)*Ra+G�
946
+ �,��@T"��)g�P���*viK%
947
+ �h�-�9��ҵ��ѡC���~g:f��5�}�1�<��}���}����<ߡ���nd8����2���˧ʒ����T��&�u26&��5���i�. � ��Y�߯>5�շ����k�o`��澽w�ϒ����q���쬬��Y:�U�7�YY��檭�O ���W��`��z�d��@"� N5��n ����+&4�;����H3��zA�]JEU\�&1�c���Ec��rλ�r�~��,�s�߅��#�ӳ�D����*�Ǥ�J�&qn��j��4�6��H�f��:�7�� �O
948
+ �"�
949
+ e�*>��7��*G[�G�m��i�~���7w�X��lTi����M~HRB��V�k��y���J��J�堠O��")q���b'�r��w�E��@B��1$�����1�x�_ �������Df[H
950
+ �k��_n�<4�z���F��c�uP%q�d/�a����{����Ǝ��]����9��'yw����Pm�=�%�E���m?2x4ΐF\U�hʫ2�X�����z�qitM*0"MB*�J�Ǚ$�
951
+ L��8�EJ�5�,wk�#�IC��o]$6
952
+ ���LՉUB�3%������#��X$����]��k����U�?��&_ߢL16(3��M�j��zP޻H���3������âY�޳�T�hO���t��M�
953
+ #��zh���u2�@��2��{H��4�e���u<y
954
+ .N
955
+ y�N����N)^�[�M���8^�4u�B�6�o� 0�.����t�qƌ5f�=�p@k�ٵwӔD�q]����M? 2������C�D�i�)ޚ)�bp��O� o�r�娹4���89h�0�x� �NA^�m����g����P�[d��V��X���h�P-2���xkt;И*�t�Y 3�\po�n�'����Q�Rּڂ(���k�6���s�)"/Y�+ ���5]���z|I�B�i��/�x`@�}^࣎���h� d�;ꅥ�ME�%v�>�D=��A� ��7���㬈�<���%eѲ�!�}���>ѨWq�&7ر���w8l���e�
956
+ 10arʪ���\߸c��EA�
957
+ B?��?�K]�0in�Ñ[��@��_`��u%�ξc��QOu�x9�PK��+A��A�,A'g����쪵�
958
+ ����(ݻ��-u�����W� �4Bi>Ao�+�o�����E���#h��,y����oxܾ��3�#���h���\O��
959
+ �A3�I%8s���e��h�O*�Tԇ0�P��O��;9���ᣁ�����S<���N};������q򧃦0U}9aE�D#��.b��SM� @;8��`�NY�M�ɲ!�ST'
960
+ `��S��*�% ��\���vw���e�vv� �'�8%9����U�n�/L��_
961
+ س��3�8���S�&��Z��%~zu�#�5��������x>T,);�:�`�_ �^#��xg�Н6We�錦������N�Ǟe/۽�칋�� ��� �p�z�Zv��*�!i�?H���/XGpt���H���#���?!?�B;���F�k�9�m��:�w�q������^bO��ַxe|?�D�&7����#w��!�~�������L_!���p��bI���f�7Ώ��5���OT�� �+����ܾ"�����gS>
962
+ (�
963
+ endstream
964
+ endobj
965
+ xref
966
+ 0 12
967
+ 0000000000 65535 f
968
+ 0000000015 00000 n
969
+ 0000000109 00000 n
970
+ 0000000158 00000 n
971
+ 0000000215 00000 n
972
+ 0000009377 00000 n
973
+ 0000009603 00000 n
974
+ 0000009700 00000 n
975
+ 0000009802 00000 n
976
+ 0000015489 00000 n
977
+ 0000016435 00000 n
978
+ 0000026250 00000 n
979
+ trailer
980
+ << /Size 12
981
+ /Root 2 0 R
982
+ /Info 1 0 R
983
+ >>
984
+ startxref
985
+ 30780
986
+ %%EOF
Binary file
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env ruby
2
+ # This is an example of a very simple invoice.
3
+
4
+ lib = File.expand_path('../../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'invoice_printer'
7
+
8
+ labels = {
9
+ tax: '10% VAT'
10
+ }
11
+
12
+ item = InvoicePrinter::Document::Item.new(
13
+ name: 'Programming',
14
+ quantity: '10',
15
+ unit: 'hr',
16
+ price: '$ 60',
17
+ tax: '$ 60',
18
+ amount: '$ 600'
19
+ )
20
+
21
+ item2 = InvoicePrinter::Document::Item.new(
22
+ name: 'Consolting',
23
+ quantity: '10',
24
+ unit: 'hr',
25
+ price: '$ 30',
26
+ tax: '$ 30',
27
+ amount: '$ 300'
28
+ )
29
+
30
+ item3 = InvoicePrinter::Document::Item.new(
31
+ name: 'Support',
32
+ quantity: '20',
33
+ unit: 'hr',
34
+ price: '$ 15',
35
+ tax: '$ 30',
36
+ amount: '$ 330'
37
+ )
38
+
39
+ invoice = InvoicePrinter::Document.new(
40
+ number: 'NO. 198900000001',
41
+ provider_name: 'John White',
42
+ provider_street: '5th Avenue',
43
+ provider_street_number: '1',
44
+ provider_postcode: '747 05',
45
+ provider_city: 'NYC',
46
+ purchaser_name: 'Will Black',
47
+ purchaser_street: '7th Avenue',
48
+ purchaser_street_number: '1',
49
+ purchaser_postcode: '747 70',
50
+ purchaser_city: 'NYC',
51
+ issue_date: '05/03/2016',
52
+ due_date: '19/03/2016',
53
+ subtotal: '$ 1,000',
54
+ tax: '$ 100',
55
+ total: '$ 1,100',
56
+ bank_account_number: '156546546465',
57
+ items: [item, item2, item3],
58
+ note: 'This is a note at the end.'
59
+ )
60
+
61
+ InvoicePrinter.print(
62
+ document: invoice,
63
+ labels: labels,
64
+ stamp: 'stamp.png',
65
+ logo: 'prawn.png',
66
+ file_name: 'complex_invoice.pdf'
67
+ )
Binary file
Binary file
Binary file
@@ -569,8 +569,10 @@ module InvoicePrinter
569
569
  #
570
570
  # If a note is present, position it on top of it.
571
571
  def build_logo
572
- bottom = @document.note.empty? ? 50 : 60
573
- @pdf.image(@logo, at: [0, bottom]) if @logo && !@logo.empty?
572
+ if @logo && !@logo.empty?
573
+ bottom = @document.note.empty? ? 75 : 85
574
+ @pdf.image(@logo, at: [0, bottom], fit: [200, 50])
575
+ end
574
576
  end
575
577
 
576
578
  # Insert a stamp (with signature) after the total table
@@ -597,11 +599,10 @@ module InvoicePrinter
597
599
  @pdf.number_pages(
598
600
  '<page> / <total>',
599
601
  start_count_at: 1,
600
- page_filter: ->(page) { page != 1 },
601
602
  at: [@pdf.bounds.right - 50, 0],
602
603
  align: :right,
603
604
  size: 12
604
- )
605
+ ) unless @pdf.page_count == 1
605
606
  end
606
607
  end
607
608
  end
@@ -1,3 +1,3 @@
1
1
  module InvoicePrinter
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -0,0 +1,33 @@
1
+ require 'test_helper'
2
+
3
+ class PageNumbersTest < Minitest::Test
4
+ include InvoicePrinterHelpers
5
+
6
+ # If there is only one page, we skip numbering
7
+ def test_do_not_number_1_page
8
+ item = InvoicePrinter::Document::Item.new(default_document_item_params)
9
+ params = default_document_params.merge(
10
+ items: [item]
11
+ )
12
+ invoice = InvoicePrinter::Document.new(params)
13
+ rendered_pdf = InvoicePrinter.render(document: invoice)
14
+ pdf_analysis = PDF::Inspector::Text.analyze(rendered_pdf)
15
+
16
+ assert_equal false, pdf_analysis.strings.include?('1/1')
17
+ end
18
+
19
+ def test_number_2_and_more_pages
20
+ item = InvoicePrinter::Document::Item.new(default_document_item_params)
21
+ items = [item] * 50
22
+ params = default_document_params.merge(
23
+ items: items
24
+ )
25
+ invoice = InvoicePrinter::Document.new(params)
26
+ rendered_pdf = InvoicePrinter.render(document: invoice)
27
+ pdf_analysis = PDF::Inspector::Text.analyze(rendered_pdf)
28
+
29
+ assert_equal true, pdf_analysis.strings.include?('1 / 3')
30
+ assert_equal true, pdf_analysis.strings.include?('2 / 3')
31
+ assert_equal true, pdf_analysis.strings.include?('3 / 3')
32
+ end
33
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoice_printer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Strzibny
@@ -92,12 +92,17 @@ files:
92
92
  - LICENSE.txt
93
93
  - README.md
94
94
  - Rakefile
95
+ - examples/complex_invoice.pdf
96
+ - examples/complex_invoice.png
97
+ - examples/complex_invoice.rb
95
98
  - examples/czech_invoice.jpg
96
99
  - examples/czech_invoice.pdf
97
100
  - examples/czech_invoice.rb
98
101
  - examples/example.jpg
102
+ - examples/prawn.png
99
103
  - examples/simple_invoice.pdf
100
104
  - examples/simple_invoice.rb
105
+ - examples/stamp.png
101
106
  - invoice_printer.gemspec
102
107
  - lib/invoice_printer.rb
103
108
  - lib/invoice_printer/document.rb
@@ -110,6 +115,7 @@ files:
110
115
  - test/items_table_test.rb
111
116
  - test/labels_test.rb
112
117
  - test/notes_test.rb
118
+ - test/page_numbers_test.rb
113
119
  - test/payment_box_test.rb
114
120
  - test/test_ext.rb
115
121
  - test/test_helper.rb
@@ -144,6 +150,7 @@ test_files:
144
150
  - test/items_table_test.rb
145
151
  - test/labels_test.rb
146
152
  - test/notes_test.rb
153
+ - test/page_numbers_test.rb
147
154
  - test/payment_box_test.rb
148
155
  - test/test_ext.rb
149
156
  - test/test_helper.rb