28 require_once(
'tcpdf_include.php');
35 $pdf->SetAuthor(
'Nicola Asuni');
36 $pdf->SetTitle(
'TCPDF Example 013');
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',
'B', 20);
75 $pdf->Write(0,
'Graphic Transformations',
'', 0,
'C', 1, 0,
false,
false, 0);
78 $pdf->SetFont(
'helvetica',
'', 10);
81 $pdf->SetDrawColor(200);
82 $pdf->SetTextColor(200);
83 $pdf->Rect(50, 70, 40, 10,
'D');
84 $pdf->Text(50, 66,
'Scale');
85 $pdf->SetDrawColor(0);
86 $pdf->SetTextColor(0);
88 $pdf->StartTransform();
90 $pdf->ScaleXY(150, 50, 80);
91 $pdf->Rect(50, 70, 40, 10,
'D');
92 $pdf->Text(50, 66,
'Scale');
94 $pdf->StopTransform();
97 $pdf->SetDrawColor(200);
98 $pdf->SetTextColor(200);
99 $pdf->Rect(125, 70, 40, 10,
'D');
100 $pdf->Text(125, 66,
'Translate');
101 $pdf->SetDrawColor(0);
102 $pdf->SetTextColor(0);
104 $pdf->StartTransform();
106 $pdf->Translate(7, 5);
107 $pdf->Rect(125, 70, 40, 10,
'D');
108 $pdf->Text(125, 66,
'Translate');
110 $pdf->StopTransform();
113 $pdf->SetDrawColor(200);
114 $pdf->SetTextColor(200);
115 $pdf->Rect(70, 100, 40, 10,
'D');
116 $pdf->Text(70, 96,
'Rotate');
117 $pdf->SetDrawColor(0);
118 $pdf->SetTextColor(0);
120 $pdf->StartTransform();
122 $pdf->Rotate(20, 70, 110);
123 $pdf->Rect(70, 100, 40, 10,
'D');
124 $pdf->Text(70, 96,
'Rotate');
126 $pdf->StopTransform();
129 $pdf->SetDrawColor(200);
130 $pdf->SetTextColor(200);
131 $pdf->Rect(125, 100, 40, 10,
'D');
132 $pdf->Text(125, 96,
'Skew');
133 $pdf->SetDrawColor(0);
134 $pdf->SetTextColor(0);
136 $pdf->StartTransform();
138 $pdf->SkewX(30, 125, 110);
139 $pdf->Rect(125, 100, 40, 10,
'D');
140 $pdf->Text(125, 96,
'Skew');
142 $pdf->StopTransform();
145 $pdf->SetDrawColor(200);
146 $pdf->SetTextColor(200);
147 $pdf->Rect(70, 130, 40, 10,
'D');
148 $pdf->Text(70, 126,
'MirrorH');
149 $pdf->SetDrawColor(0);
150 $pdf->SetTextColor(0);
152 $pdf->StartTransform();
155 $pdf->Rect(70, 130, 40, 10,
'D');
156 $pdf->Text(70, 126,
'MirrorH');
158 $pdf->StopTransform();
161 $pdf->SetDrawColor(200);
162 $pdf->SetTextColor(200);
163 $pdf->Rect(125, 130, 40, 10,
'D');
164 $pdf->Text(125, 126,
'MirrorV');
165 $pdf->SetDrawColor(0);
166 $pdf->SetTextColor(0);
168 $pdf->StartTransform();
171 $pdf->Rect(125, 130, 40, 10,
'D');
172 $pdf->Text(125, 126,
'MirrorV');
174 $pdf->StopTransform();
177 $pdf->SetDrawColor(200);
178 $pdf->SetTextColor(200);
179 $pdf->Rect(70, 160, 40, 10,
'D');
180 $pdf->Text(70, 156,
'MirrorP');
181 $pdf->SetDrawColor(0);
182 $pdf->SetTextColor(0);
184 $pdf->StartTransform();
186 $pdf->MirrorP(70,170);
187 $pdf->Rect(70, 160, 40, 10,
'D');
188 $pdf->Text(70, 156,
'MirrorP');
190 $pdf->StopTransform();
199 $pdf->SetDrawColor(200);
202 $pdf->StartTransform();
205 $pdf->StopTransform();
207 $pdf->SetDrawColor(200);
208 $pdf->SetTextColor(200);
209 $pdf->Rect(125, 160, 40, 10,
'D');
210 $pdf->Text(125, 156,
'MirrorL');
211 $pdf->SetDrawColor(0);
212 $pdf->SetTextColor(0);
214 $pdf->StartTransform();
217 $pdf->Rect(125, 160, 40, 10,
'D');
218 $pdf->Text(125, 156,
'MirrorL');
220 $pdf->StopTransform();
225 $pdf->Output(
'example_013.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.