28 require_once(
'tcpdf_include.php');
35 $pdf->SetAuthor(
'Nicola Asuni');
36 $pdf->SetTitle(
'TCPDF Example 056');
37 $pdf->SetSubject(
'TCPDF Tutorial');
38 $pdf->SetKeywords(
'TCPDF, PDF, example, test, guide');
62 if (@file_exists(dirname(__FILE__).
'/lang/eng.php')) {
63 require_once(dirname(__FILE__).
'/lang/eng.php');
64 $pdf->setLanguageArray(
$l);
70 $pdf->SetFont(
'helvetica',
'', 18);
75 $pdf->Write(0,
'Example of Registration Marks, Crop Marks and Color Bars',
'', 0,
'L',
true, 0,
false,
false, 0);
82 $pdf->colorRegistrationBar(50, 70, 40, 40,
true,
false,
'A,R,G,B,C,M,Y,K');
83 $pdf->colorRegistrationBar(90, 70, 40, 40,
true,
true,
'A,R,G,B,C,M,Y,K');
84 $pdf->colorRegistrationBar(50, 115, 80, 5,
false,
true,
'A,W,R,G,B,C,M,Y,K,ALL');
85 $pdf->colorRegistrationBar(135, 70, 5, 50,
false,
false,
'A,W,R,G,B,C,M,Y,K,ALL');
89 $pdf->cropMark(50, 70, 10, 10,
'TL');
90 $pdf->cropMark(140, 70, 10, 10,
'TR');
91 $pdf->cropMark(50, 120, 10, 10,
'BL');
92 $pdf->cropMark(140, 120, 10, 10,
'BR');
96 $pdf->cropMark(95, 65, 5, 5,
'LEFT,TOP,RIGHT', array(255,0,0));
97 $pdf->cropMark(95, 125, 5, 5,
'LEFT,BOTTOM,RIGHT', array(255,0,0));
99 $pdf->cropMark(45, 95, 5, 5,
'TL,BL', array(0,255,0));
100 $pdf->cropMark(145, 95, 5, 5,
'TR,BR', array(0,255,0));
102 $pdf->cropMark(95, 140, 5, 5,
'A,D', array(0,0,255));
106 $pdf->registrationMark(40, 60, 5,
false);
107 $pdf->registrationMark(150, 60, 5,
true, array(0,0,0), array(255,255,0));
108 $pdf->registrationMark(40, 130, 5,
true, array(0,0,0), array(255,255,0));
109 $pdf->registrationMark(150, 130, 5,
false, array(100,100,100,100,
'All'), array(0,0,0,0,
'None'));
113 $pdf->AddSpotColor(
'My TCPDF Dark Green', 100, 50, 80, 45);
114 $pdf->AddSpotColor(
'My TCPDF Light Yellow', 0, 0, 55, 0);
115 $pdf->AddSpotColor(
'My TCPDF Black', 0, 0, 0, 100);
116 $pdf->AddSpotColor(
'My TCPDF Red', 30, 100, 90, 10);
117 $pdf->AddSpotColor(
'My TCPDF Green', 100, 30, 100, 0);
118 $pdf->AddSpotColor(
'My TCPDF Blue', 100, 60, 10, 5);
119 $pdf->AddSpotColor(
'My TCPDF Yellow', 0, 20, 100, 0);
121 $pdf->colorRegistrationBar(50, 150, 80, 10,
false,
true,
'ALLSPOT');
124 $pdf->registrationMarkCMYK(150, 155, 8);
129 $pdf->Output(
'example_056.pdf',
'I');
const PDF_MARGIN_BOTTOM
Bottom margin.
const PDF_MARGIN_LEFT
Left margin.
const PDF_MARGIN_HEADER
Header margin.
const PDF_HEADER_STRING
Header description string.
const PDF_FONT_SIZE_MAIN
Default main font size.
const PDF_FONT_SIZE_DATA
Default data font size.
const PDF_FONT_NAME_MAIN
Default main font name.
PHP class for generating PDF documents without requiring external extensions.
const PDF_HEADER_LOGO_WIDTH
Header logo image width in user units.
const PDF_HEADER_LOGO
Deafult image logo used be the default Header() method.
const PDF_UNIT
Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
const PDF_IMAGE_SCALE_RATIO
Ratio used to adjust the conversion of pixels to user units.
const PDF_PAGE_ORIENTATION
Page orientation (P=portrait, L=landscape).
const PDF_MARGIN_RIGHT
Right margin.
const PDF_HEADER_TITLE
Header title.
const PDF_FONT_NAME_DATA
Default data font name.
const PDF_CREATOR
Document creator.
const PDF_PAGE_FORMAT
Page format.
const PDF_FONT_MONOSPACED
Default monospaced font name.
const PDF_MARGIN_TOP
Top margin.
const PDF_MARGIN_FOOTER
Footer margin.