GlisWeb framework
_usr
_examples
_tcpdf
_test02.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( 29, 62 ),
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
// scrittura del barcode
52
$pdf
->write2DBarcode(
'http://www.istricesrl.it/1234567890'
,
'QRCODE,H'
, 2, 2, 25, 25,
$style
,
'T'
);
53
54
// Istrice srl
55
$pdf
->SetFont(
'helvetica'
,
'B'
, 11 );
56
$pdf
->Text( 28, 1.5,
'Istrice srl'
);
57
58
// www.istricesrl.it
59
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
60
$pdf
->Text( 28, 6,
'www.istricesrl.it'
);
61
62
// 051 014 1878
63
$pdf
->SetFont(
'helvetica'
,
''
, 9 );
64
$pdf
->Text( 28, 10,
'051 014 1878'
);
65
66
// servizi
67
$pdf
->SetFont(
'helvetica'
,
''
, 7 );
68
$pdf
->Text( 28, 15.1,
'assistenza computer'
);
69
$pdf
->Text( 28, 18.1,
'vendita hardware/software'
);
70
$pdf
->Text( 28, 21.1,
'realizzazione siti web'
);
71
$pdf
->Text( 28, 24.1,
'SEO, web/social marketing'
);
72
73
// output
74
$pdf
->Output();
75
76
?>
$pdf
$pdf
Definition:
_test02.php:17
$style
$style
Definition:
_test02.php:41
Generato Sab 25 Lug 2020 23:06:28 per GlisWeb framework da
1.8.13