GlisWeb framework
_usr
_examples
_tcpdf
_test02b.php
Vai alla documentazione di questo file.
1
<?php
2
13
// inclusione del framework
14
require
'../../../_src/_config.php'
;
15
16
// creazione del PDF
17
$pdf
=
new
TCPDF(
'L'
,
'mm'
, array( 30, 90 ),
true
,
'UTF-8'
,
false
);
18
19
// rimozione di header e footer
20
$pdf
->SetPrintHeader(
false
);
21
$pdf
->SetPrintFooter(
false
);
22
23
// imposto i margini
24
$pdf
->SetMargins( 2, 2, 2 );
25
$pdf
->SetHeaderMargin( 0 );
26
$pdf
->SetFooterMargin( 0 );
27
28
// set default monospaced font
29
$pdf
->SetDefaultMonospacedFont( PDF_FONT_MONOSPACED );
30
31
// set auto page breaks
32
$pdf
->SetAutoPageBreak(
false
);
33
34
// set image scale factor
35
$pdf
->setImageScale( PDF_IMAGE_SCALE_RATIO );
36
37
// aggiunta di una pagina
38
$pdf
->AddPage();
39
40
// stile per il barcode
41
$style
= array(
42
'border'
=>
false
,
43
'vpadding'
=> 0,
44
'hpadding'
=> 0,
45
'fgcolor'
=> array( 0, 0, 0 ),
46
'bgcolor'
=>
false
,
47
'module_width'
=> 1,
48
'module_height'
=> 1
49
);
50
51
// inserimento dell'immagine
52
$pdf
->image(
'logoIstriceForniture.png'
, 3, 3, 24, 0,
'PNG'
, NULL,
'T'
);
53
54
// scrittura del barcode
55
$pdf
->write2DBarcode(
'http://todo.istricesrl.it/1234567890'
,
'QRCODE,H'
, 67, 6, 21, 21,
$style
,
'T'
);
56
57
// codice
58
$pdf
->SetFont(
'courier'
,
'B'
, 11 );
59
$pdf
->Text( 66, 1.5,
'#00056789'
);
60
61
// Istrice srl
62
$pdf
->SetFont(
'helvetica'
,
'B'
, 10 );
63
$pdf
->Text( 28, 2,
'Istrice srl'
);
64
65
// www.istricesrl.it
66
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
67
$pdf
->Text( 28, 5.5,
'www.istricesrl.it'
);
68
69
// info@istricesrl.it
70
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
71
$pdf
->Text( 28, 8.75,
'info@istricesrl.it'
);
72
73
// 051 014 1878
74
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
75
$pdf
->Text( 28, 12.5,
'051 014 1878'
);
76
77
// servizi
78
$pdf
->SetFont(
'helvetica'
,
''
, 7 );
79
$pdf
->Text( 3, 18.1,
'assistenza computer, portatili, reti, recupero dati'
);
80
$pdf
->Text( 3, 21.1,
'vendita hardware e software, consumabili, ricambi'
);
81
$pdf
->Text( 3, 24.1,
'siti web, ecommerce, SEO, web e social marketing'
);
82
83
// output
84
$pdf
->Output();
85
86
?>
$pdf
$pdf
Definition:
_test02b.php:17
$style
$style
Definition:
_test02b.php:41
Generato Sab 25 Lug 2020 23:06:28 per GlisWeb framework da
1.8.13