-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
79 lines (63 loc) · 5.21 KB
/
example.php
File metadata and controls
79 lines (63 loc) · 5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
require_once('PdfHelper.php');
$pdf = new PdfHelper();
// $pdf = new PdfHelper(array('template' => 'page_syabas.pdf'));
$pdf->setOptions(array(
'generatedCaption' => 'This is computer generated',
'pageNum' => true,
'pageNumFormat' => '#P of #T',
));
$pdf->setMargins(10.5, 10.5, 10.5, 10.5); // left, top, right, bottom, set to null if wanted to use default value
$pdf->add();
for($i=0;$i<14;$i++)
$pdf->nl();
$pdf->write('regular string', array('span'=>12));
$pdf->write('Bold string', array('style'=>'B', 'span'=>12));
$pdf->nl();
$pdf->write('straight line', array('span'=>12));
$pdf->line();
$pdf->nl();
$pdf->write('dash line', array('span'=>12));
$pdf->lineDash();
$pdf->nl();
$pdf->write('double line', array('span'=>12));
$pdf->lineDouble();
$pdf->setOptions(array(
'columns' => 16,
));
$pdf->nl();
$pdf->write('font style(size & font family) :', array('family'=>'helvetica', 'span'=>12, 'size'=>13));
$pdf->write('font style(size & font ) :', array('family'=>'helvetica', 'span'=>12, 'size'=>13));
$pdf->setOptions(array(
'columns' => 12,
));
$pdf->nl();
$pdf->write('column 1', array('span'=>6, 'border'=>1));
$pdf->write('column 2', array('span'=>6, 'border'=>1));
$pdf->nl();
$pdf->write('multicell', array('span'=>12, 'style'=>'BIU', 'size'=>15));
$pdf->write('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', array('span'=>12, 'multi'=>true, 'ishtml'=>true));
$pdf->write('multicell with html element', array('span'=>12, 'style'=>'BIU', 'size'=>15));
$pdf->write('Lorem Ipsum is simply dummy text of the <span style="color:red;">printing and typesetting industry</span>. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, <strong>when an unknown printer took a galley of type and scrambled it to make a type specimen book.</strong> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more <strike>recently with desktop publishing software like Aldus PageMaker</strike> including versions of Lorem Ipsum.', array('span'=>12, 'multi'=>true, 'ishtml'=>true));
$pdf->write('', array('span'=>12));
$pdf->write('multicell with 3 column justify', array('style'=>'B', 'span'=>12));
$pdf->line(1,3);
$pdf->write('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', array('span'=>4, 'multi'=>true));
$pdf->write('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', array('span'=>4, 'multi'=>true, 'align'=>'J'));
$pdf->write('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker.', array('span'=>4, 'multi'=>true, 'align'=>'R'));
$pdf->write('', array('span'=>12));
$pdf->write('1D barcode', array('span'=>12));
$pdf->barcode('123456789', array('span'=>12));
$pdf->write('', array('span'=>12));
$pdf->write('2 1D barcode in 1 line', array('span'=>12));
$pdf->barcode('123456789', array('span'=>5));
$pdf->barcode('123456789', array('span'=>7));
$pdf->add();
for($i=0;$i<14;$i++)
$pdf->nl();
$pdf->write('New PAGE', array('style'=>'B', 'span'=>12, 'size'=>22, 'align'=>'C'));
$pdf->add();
for($i=0;$i<14;$i++)
$pdf->nl();
$pdf->write('New PAGE2', array('style'=>'B', 'span'=>12, 'size'=>22, 'align'=>'C'));
$pdf->out();