28 require_once(
'tcpdf_include.php');
35 $pdf->SetAuthor(
'Nicola Asuni');
36 $pdf->SetTitle(
'TCPDF Example 037');
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',
'', 11);
75 $html =
'<h1>Example of Spot Colors</h1>Spot colors are single ink colors, rather than colors produced by four (CMYK), six (CMYKOG) or more inks in the printing process (process colors). They can be obtained by special vendors, but often the printers have found their own way of mixing inks to match defined colors.<br /><br />As long as no open standard for spot colours exists, TCPDF users will have to buy a colour book by one of the colour manufacturers and insert the values and names of spot colours directly into the $spotcolor array in <b><em>include/tcpdf_colors.php</em></b> file, or define them using the <b><em>AddSpotColor()</em></b> method.<br /><br />Common industry standard spot colors are:<br /><span color="#008800">ANPA-COLOR, DIC, FOCOLTONE, GCMI, HKS, PANTONE, TOYO, TRUMATCH</span>.';
78 $pdf->writeHTMLCell(0, 0,
'',
'',
$html, 0, 1, 0,
true,
'J',
true);
81 $pdf->SetFont(
'helvetica',
'', 10);
87 $pdf->AddSpotColor(
'My TCPDF Dark Green', 100, 50, 80, 45);
88 $pdf->AddSpotColor(
'My TCPDF Light Yellow', 0, 0, 55, 0);
89 $pdf->AddSpotColor(
'My TCPDF Black', 0, 0, 0, 100);
90 $pdf->AddSpotColor(
'My TCPDF Red', 30, 100, 90, 10);
91 $pdf->AddSpotColor(
'My TCPDF Green', 100, 30, 100, 0);
92 $pdf->AddSpotColor(
'My TCPDF Blue', 100, 60, 10, 5);
93 $pdf->AddSpotColor(
'My TCPDF Yellow', 0, 20, 100, 0);
101 $pdf->SetTextSpotColor(
'My TCPDF Black', 100);
102 $pdf->SetDrawSpotColor(
'My TCPDF Black', 100);
108 $pdf->SetFillSpotColor(
'My TCPDF Dark Green', 100);
110 $pdf->Text(73,
$starty + 8,
'My TCPDF Dark Green');
113 $pdf->SetFillSpotColor(
'My TCPDF Light Yellow', 100);
115 $pdf->Text(73,
$starty + 8,
'My TCPDF Light Yellow');
121 $pdf->SetFillSpotColor(
'My TCPDF Red', 100);
126 $pdf->SetFillSpotColor(
'My TCPDF Green', 100);
131 $pdf->SetFillSpotColor(
'My TCPDF Blue', 100);
136 $pdf->SetFillSpotColor(
'My TCPDF Yellow', 100);
143 $pdf->Output(
'example_037.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.