GlisWeb framework
_usr
_examples
_tcpdf
_test02a.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, 23, 0,
'PNG'
, NULL,
'T'
);
53
54
// scrittura del barcode
55
$pdf
->write2DBarcode(
'http://www.istricesrl.it/1234567890'
,
'QRCODE,H'
, 63, 2, 25, 25,
$style
,
'T'
);
56
57
// Istrice srl
58
$pdf
->SetFont(
'helvetica'
,
'B'
, 11 );
59
$pdf
->Text( 28, 2,
'Istrice srl'
);
60
61
// www.istricesrl.it
62
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
63
$pdf
->Text( 28, 6,
'www.istricesrl.it'
);
64
65
// info@istricesrl.it
66
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
67
$pdf
->Text( 28, 9,
'info@istricesrl.it'
);
68
69
// 051 014 1878
70
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
71
$pdf
->Text( 28, 12.5,
'051 014 1878'
);
72
73
// servizi
74
$pdf
->SetFont(
'helvetica'
,
''
, 7 );
75
$pdf
->Text( 3, 18.1,
'assistenza computer, portatili, reti, recupero dati'
);
76
$pdf
->Text( 3, 21.1,
'vendita hardware e software, consumabili, ricambi'
);
77
$pdf
->Text( 3, 24.1,
'realizzazione siti web, SEO, web e social marketing'
);
78
79
// output
80
$pdf
->Output();
81
82
?>
$style
$style
Definition:
_test02a.php:41
$pdf
$pdf
Definition:
_test02a.php:17
Generato Sab 25 Lug 2020 23:06:28 per GlisWeb framework da
1.8.13