From cd1d5a11f8cbeb2553e57e1f5f3b3834642a455d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 25 Jun 2011 18:28:20 +0000 Subject: [PATCH] Fix: upgrade tcpdf with some fix --- .../includes/tcpdf/examples/example_001.php | 102 ----- .../includes/tcpdf/examples/example_002.php | 87 ---- .../includes/tcpdf/examples/example_003.php | 118 ----- .../includes/tcpdf/examples/example_004.php | 121 ------ .../includes/tcpdf/examples/example_005.php | 158 ------- .../includes/tcpdf/examples/example_006.php | 332 -------------- .../includes/tcpdf/examples/example_007.php | 113 ----- .../includes/tcpdf/examples/example_008.php | 94 ---- .../includes/tcpdf/examples/example_009.php | 146 ------- .../includes/tcpdf/examples/example_010.php | 150 ------- .../includes/tcpdf/examples/example_011.php | 138 ------ .../includes/tcpdf/examples/example_012.php | 205 --------- .../includes/tcpdf/examples/example_013.php | 229 ---------- .../includes/tcpdf/examples/example_014.php | 190 -------- .../includes/tcpdf/examples/example_015.php | 135 ------ .../includes/tcpdf/examples/example_016.php | 134 ------ .../includes/tcpdf/examples/example_017.php | 117 ----- .../includes/tcpdf/examples/example_018.php | 132 ------ .../includes/tcpdf/examples/example_019.php | 106 ----- .../includes/tcpdf/examples/example_020.php | 146 ------- .../includes/tcpdf/examples/example_021.php | 91 ---- .../includes/tcpdf/examples/example_022.php | 146 ------- .../includes/tcpdf/examples/example_023.php | 113 ----- .../includes/tcpdf/examples/example_024.php | 118 ----- .../includes/tcpdf/examples/example_025.php | 118 ----- .../includes/tcpdf/examples/example_026.php | 145 ------- .../includes/tcpdf/examples/example_027.php | 409 ------------------ .../includes/tcpdf/examples/example_028.php | 138 ------ .../includes/tcpdf/examples/example_029.php | 124 ------ .../includes/tcpdf/examples/example_030.php | 188 -------- .../includes/tcpdf/examples/example_031.php | 103 ----- .../includes/tcpdf/examples/example_032.php | 93 ---- .../includes/tcpdf/examples/example_033.php | 105 ----- .../includes/tcpdf/examples/example_034.php | 96 ---- .../includes/tcpdf/examples/example_035.php | 111 ----- .../includes/tcpdf/examples/example_036.php | 89 ---- .../includes/tcpdf/examples/example_037.php | 202 --------- .../includes/tcpdf/examples/example_038.php | 87 ---- .../includes/tcpdf/examples/example_039.php | 104 ----- .../includes/tcpdf/examples/example_040.php | 116 ----- .../includes/tcpdf/examples/example_041.php | 90 ---- .../includes/tcpdf/examples/example_042.php | 102 ----- .../includes/tcpdf/examples/example_043.php | 85 ---- .../includes/tcpdf/examples/example_044.php | 128 ------ .../includes/tcpdf/examples/example_045.php | 130 ------ .../includes/tcpdf/examples/example_046.php | 123 ------ .../includes/tcpdf/examples/example_047.php | 117 ----- .../includes/tcpdf/examples/example_048.php | 313 -------------- .../includes/tcpdf/examples/example_049.php | 126 ------ .../includes/tcpdf/examples/example_050.php | 205 --------- .../includes/tcpdf/examples/example_051.php | 145 ------- .../includes/tcpdf/examples/example_052.php | 115 ----- .../includes/tcpdf/examples/example_053.php | 108 ----- .../includes/tcpdf/examples/example_054.php | 128 ------ .../includes/tcpdf/examples/example_055.php | 115 ----- .../includes/tcpdf/examples/example_056.php | 117 ----- .../includes/tcpdf/examples/example_057.php | 268 ------------ .../includes/tcpdf/examples/example_058.php | 94 ---- .../includes/tcpdf/examples/example_059.php | 190 -------- .../includes/tcpdf/examples/example_060.php | 108 ----- .../includes/tcpdf/examples/example_061.php | 273 ------------ .../includes/tcpdf/examples/example_062.php | 136 ------ .../includes/tcpdf/examples/example_063.php | 131 ------ .../includes/tcpdf/examples/example_064.php | 176 -------- htdocs/includes/tcpdf/examples/index.php | 88 ---- 65 files changed, 9260 deletions(-) delete mode 100644 htdocs/includes/tcpdf/examples/example_001.php delete mode 100644 htdocs/includes/tcpdf/examples/example_002.php delete mode 100644 htdocs/includes/tcpdf/examples/example_003.php delete mode 100644 htdocs/includes/tcpdf/examples/example_004.php delete mode 100644 htdocs/includes/tcpdf/examples/example_005.php delete mode 100644 htdocs/includes/tcpdf/examples/example_006.php delete mode 100644 htdocs/includes/tcpdf/examples/example_007.php delete mode 100644 htdocs/includes/tcpdf/examples/example_008.php delete mode 100644 htdocs/includes/tcpdf/examples/example_009.php delete mode 100644 htdocs/includes/tcpdf/examples/example_010.php delete mode 100644 htdocs/includes/tcpdf/examples/example_011.php delete mode 100644 htdocs/includes/tcpdf/examples/example_012.php delete mode 100644 htdocs/includes/tcpdf/examples/example_013.php delete mode 100644 htdocs/includes/tcpdf/examples/example_014.php delete mode 100644 htdocs/includes/tcpdf/examples/example_015.php delete mode 100644 htdocs/includes/tcpdf/examples/example_016.php delete mode 100644 htdocs/includes/tcpdf/examples/example_017.php delete mode 100644 htdocs/includes/tcpdf/examples/example_018.php delete mode 100644 htdocs/includes/tcpdf/examples/example_019.php delete mode 100644 htdocs/includes/tcpdf/examples/example_020.php delete mode 100644 htdocs/includes/tcpdf/examples/example_021.php delete mode 100644 htdocs/includes/tcpdf/examples/example_022.php delete mode 100644 htdocs/includes/tcpdf/examples/example_023.php delete mode 100644 htdocs/includes/tcpdf/examples/example_024.php delete mode 100644 htdocs/includes/tcpdf/examples/example_025.php delete mode 100644 htdocs/includes/tcpdf/examples/example_026.php delete mode 100644 htdocs/includes/tcpdf/examples/example_027.php delete mode 100644 htdocs/includes/tcpdf/examples/example_028.php delete mode 100644 htdocs/includes/tcpdf/examples/example_029.php delete mode 100644 htdocs/includes/tcpdf/examples/example_030.php delete mode 100644 htdocs/includes/tcpdf/examples/example_031.php delete mode 100644 htdocs/includes/tcpdf/examples/example_032.php delete mode 100644 htdocs/includes/tcpdf/examples/example_033.php delete mode 100644 htdocs/includes/tcpdf/examples/example_034.php delete mode 100644 htdocs/includes/tcpdf/examples/example_035.php delete mode 100644 htdocs/includes/tcpdf/examples/example_036.php delete mode 100644 htdocs/includes/tcpdf/examples/example_037.php delete mode 100644 htdocs/includes/tcpdf/examples/example_038.php delete mode 100644 htdocs/includes/tcpdf/examples/example_039.php delete mode 100644 htdocs/includes/tcpdf/examples/example_040.php delete mode 100644 htdocs/includes/tcpdf/examples/example_041.php delete mode 100644 htdocs/includes/tcpdf/examples/example_042.php delete mode 100644 htdocs/includes/tcpdf/examples/example_043.php delete mode 100644 htdocs/includes/tcpdf/examples/example_044.php delete mode 100644 htdocs/includes/tcpdf/examples/example_045.php delete mode 100644 htdocs/includes/tcpdf/examples/example_046.php delete mode 100644 htdocs/includes/tcpdf/examples/example_047.php delete mode 100644 htdocs/includes/tcpdf/examples/example_048.php delete mode 100644 htdocs/includes/tcpdf/examples/example_049.php delete mode 100644 htdocs/includes/tcpdf/examples/example_050.php delete mode 100644 htdocs/includes/tcpdf/examples/example_051.php delete mode 100644 htdocs/includes/tcpdf/examples/example_052.php delete mode 100644 htdocs/includes/tcpdf/examples/example_053.php delete mode 100644 htdocs/includes/tcpdf/examples/example_054.php delete mode 100644 htdocs/includes/tcpdf/examples/example_055.php delete mode 100644 htdocs/includes/tcpdf/examples/example_056.php delete mode 100644 htdocs/includes/tcpdf/examples/example_057.php delete mode 100644 htdocs/includes/tcpdf/examples/example_058.php delete mode 100644 htdocs/includes/tcpdf/examples/example_059.php delete mode 100644 htdocs/includes/tcpdf/examples/example_060.php delete mode 100644 htdocs/includes/tcpdf/examples/example_061.php delete mode 100644 htdocs/includes/tcpdf/examples/example_062.php delete mode 100644 htdocs/includes/tcpdf/examples/example_063.php delete mode 100644 htdocs/includes/tcpdf/examples/example_064.php delete mode 100644 htdocs/includes/tcpdf/examples/index.php diff --git a/htdocs/includes/tcpdf/examples/example_001.php b/htdocs/includes/tcpdf/examples/example_001.php deleted file mode 100644 index cde421682e3..00000000000 --- a/htdocs/includes/tcpdf/examples/example_001.php +++ /dev/null @@ -1,102 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 001'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set default font subsetting mode -$pdf->setFontSubsetting(true); - -// Set font -// dejavusans is a UTF-8 Unicode font, if you only need to -// print standard ASCII chars, you can use core fonts like -// helvetica or times to reduce file size. -$pdf->SetFont('dejavusans', '', 14, '', true); - -// Add a page -// This method has several options, check the source code documentation for more information. -$pdf->AddPage(); - -// Set some content to print -$html = <<Welcome to  TCPDF ! -This is the first example of TCPDF library. -

This text is printed using the writeHTMLCell() method but you can also use: Multicell(), writeHTML(), Write(), Cell() and Text().

-

Please check the source code documentation and other examples for further information.

-

TO IMPROVE AND EXPAND TCPDF I NEED YOUR SUPPORT, PLEASE MAKE A DONATION!

-EOD; - -// Print text using writeHTMLCell() -$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true); - -// --------------------------------------------------------- - -// Close and output PDF document -// This method has several options, check the source code documentation for more information. -$pdf->Output('example_001.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_002.php b/htdocs/includes/tcpdf/examples/example_002.php deleted file mode 100644 index d8dd7412259..00000000000 --- a/htdocs/includes/tcpdf/examples/example_002.php +++ /dev/null @@ -1,87 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 002'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// remove default header/footer -$pdf->setPrintHeader(false); -$pdf->setPrintFooter(false); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', 'BI', 20); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_002.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_003.php b/htdocs/includes/tcpdf/examples/example_003.php deleted file mode 100644 index bc98a34371c..00000000000 --- a/htdocs/includes/tcpdf/examples/example_003.php +++ /dev/null @@ -1,118 +0,0 @@ -Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false); - // Set font - $this->SetFont('helvetica', 'B', 20); - // Title - $this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M'); - } - - // Page footer - public function Footer() { - // Position at 15 mm from bottom - $this->SetY(-15); - // Set font - $this->SetFont('helvetica', 'I', 8); - // Page number - $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M'); - } -} - -// create new PDF document -$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 003'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', 'BI', 12); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_003.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_004.php b/htdocs/includes/tcpdf/examples/example_004.php deleted file mode 100644 index 75d7e429fe2..00000000000 --- a/htdocs/includes/tcpdf/examples/example_004.php +++ /dev/null @@ -1,121 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 004'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 004', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 11); - -// add a page -$pdf->AddPage(); - -//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') - -// test Cell stretching -$pdf->Cell(0, 0, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0); -$pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1); -$pdf->Cell(0, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2); -$pdf->Cell(0, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3); -$pdf->Cell(0, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4); - -$pdf->Ln(5); - -$pdf->Cell(45, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1); -$pdf->Cell(45, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2); -$pdf->Cell(45, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3); -$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4); - -$pdf->AddPage(); - -// example using general stretching and spacing - -for ($stretching = 90; $stretching <= 110; $stretching += 10) { - for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) { - - // set general stretching (scaling) value - $pdf->setFontStretching($stretching); - - // set general spacing value - $pdf->setFontSpacing($spacing); - - $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, no stretch', 1, 1, 'C', 0, '', 0); - $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1); - $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2); - $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3); - $pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4); - - $pdf->Ln(2); - } -} - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_004.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_005.php b/htdocs/includes/tcpdf/examples/example_005.php deleted file mode 100644 index cc5cbc32cdb..00000000000 --- a/htdocs/includes/tcpdf/examples/example_005.php +++ /dev/null @@ -1,158 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 005'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 005', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 10); - -// add a page -$pdf->AddPage(); - -// set cell padding -$pdf->setCellPaddings(1, 1, 1, 1); - -// set cell margins -$pdf->setCellMargins(1, 1, 1, 1); - -// set color for background -$pdf->SetFillColor(255, 255, 127); - -// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) - -// set some text for example -$txt = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'; - -// Multicell test -$pdf->MultiCell(55, 5, '[LEFT] '.$txt, 1, 'L', 1, 0, '', '', true); -$pdf->MultiCell(55, 5, '[RIGHT] '.$txt, 1, 'R', 0, 1, '', '', true); -$pdf->MultiCell(55, 5, '[CENTER] '.$txt, 1, 'C', 0, 0, '', '', true); -$pdf->MultiCell(55, 5, '[JUSTIFY] '.$txt."\n", 1, 'J', 1, 2, '' ,'', true); -$pdf->MultiCell(55, 5, '[DEFAULT] '.$txt, 1, '', 0, 1, '', '', true); - -$pdf->Ln(4); - -// set color for background -$pdf->SetFillColor(220, 255, 220); - -// Vertical alignment -$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - TOP] '.$txt, 1, 'J', 1, 0, '', '', true, 0, false, true, 40, 'T'); -$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - MIDDLE] '.$txt, 1, 'J', 1, 0, '', '', true, 0, false, true, 40, 'M'); -$pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - BOTTOM] '.$txt, 1, 'J', 1, 1, '', '', true, 0, false, true, 40, 'B'); - -$pdf->Ln(4); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// set color for background -$pdf->SetFillColor(215, 235, 255); - -// set some text for example -$txt = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc. - -Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.'; - -// print a blox of text using multicell() -$pdf->MultiCell(80, 5, $txt."\n", 1, 'J', 1, 1, '' ,'', true); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// AUTO-FITTING - -// set color for background -$pdf->SetFillColor(255, 235, 235); - -// Fit text on cell by reducing font size -$pdf->MultiCell(55, 60, '[FIT CELL] '.$txt."\n", 1, 'J', 1, 1, 125, 145, true, 0, false, true, 60, 'M', true); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// CUSTOM PADDING - -// set color for background -$pdf->SetFillColor(255, 255, 215); - -// set font -$pdf->SetFont('helvetica', '', 8); - -// set cell padding -$pdf->setCellPaddings(2, 4, 6, 8); - -$txt = "CUSTOM PADDING:\nLeft=2, Top=4, Right=6, Bottom=8\nLorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue.\n"; - -$pdf->MultiCell(55, 5, $txt, 1, 'J', 1, 2, 125, 210, true); - -// move pointer to last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_005.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_006.php b/htdocs/includes/tcpdf/examples/example_006.php deleted file mode 100644 index 9d1ffee6d9e..00000000000 --- a/htdocs/includes/tcpdf/examples/example_006.php +++ /dev/null @@ -1,332 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 006'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 006', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('dejavusans', '', 10); - -// add a page -$pdf->AddPage(); - -// writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') -// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true) - -// create some HTML content -$html = '

HTML Example

-Some special characters: < € € € & è è © > \\slash \\\\double-slash \\\\\\triple-slash -

List

-List example: -
    -
  1. test alt attribute test image
  2. -
  3. bold text
  4. -
  5. italic text
  6. -
  7. underlined text
  8. -
  9. bbibiubib
  10. -
  11. link to http://www.tecnick.com
  12. -
  13. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
    Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
  14. -
  15. SUBLIST -
      -
    1. row one -
        -
      • sublist
      • -
      -
    2. -
    3. row two
    4. -
    -
  16. -
  17. TEST line through
  18. -
  19. font + 3
  20. -
  21. small text normal small text normal subscript normal superscript normal
  22. -
-
-
Coffee
-
Black hot drink
-
Milk
-
White cold drink
-
-
IMAGES
-test alt attributetest alt attributetest alt attribute -
'; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - - -// output some RTL HTML content -$html = '
The words “מזל [mazel] טוב [tov]” mean “Congratulations!”
'; -$pdf->writeHTML($html, true, false, true, false, ''); - -// test some inline CSS -$html = '

This is just an example of html code to demonstrate some supported CSS inline styles. -bold text -line-trough -underline and line-trough -color -background color -bold -xx-small -x-small -small -medium -large -x-large -xx-large -

'; - -$pdf->writeHTML($html, true, false, true, false, ''); - -// reset pointer to the last page -$pdf->lastPage(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Print a table - -// add a page -$pdf->AddPage(); - -// create some HTML content -$subtable = '
ab
cd
'; - -$html = '

HTML TABLE:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#RIGHT alignLEFT align4A
1A1 example link column span. One two tree four five six seven eight nine ten.
line after br
small text normal subscript normal superscript normal bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  1. first
    1. sublist
    2. sublist
  2. second
small small small small small small small small small small small small small small small small small small small small
4B
'.$subtable.'A2 € € € & è è
A2 € € € & è è
Red Yellow BG4C
1A2AA
2AB
2AC
4D
1B4E
1C2C3C4F
'; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// Print some HTML Cells - -$html = 'red green blue
red green blue'; - -$pdf->SetFillColor(255,255,0); - -$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 0, true, 'L', true); -$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 1, true, 'C', true); -$pdf->writeHTMLCell(0, 0, '', '', $html, 'LRTB', 1, 0, true, 'R', true); - -// reset pointer to the last page -$pdf->lastPage(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Print a table - -// add a page -$pdf->AddPage(); - -// create some HTML content -$html = '

Image alignments on HTML table

- - - - - - - - -
'; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// reset pointer to the last page -$pdf->lastPage(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Print all HTML colors - -// add a page -$pdf->AddPage(); - -require('../htmlcolors.php'); - -$textcolors = '

HTML Text Colors

'; -$bgcolors = '

HTML Background Colors

'; - -foreach($webcolor as $k => $v) { - $textcolors .= ''.$v.' '; - $bgcolors .= ''.$v.' '; -} - -// output the HTML content -$pdf->writeHTML($textcolors, true, false, true, false, ''); -$pdf->writeHTML($bgcolors, true, false, true, false, ''); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Test word-wrap - -// create some HTML content -$html = '
-

Various tests

-link to page 2
-thisisaverylongword thisisanotherverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword thisisanotherverylongword thisisaverylongword'; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// Test fonts nesting -$html1 = 'Default Courier Helvetica Times dejavusans Times Helvetica Courier Default'; -$html2 = 'small text normal small text normal subscript normal superscript normal'; -$html3 = 'The quick brown fox jumps over the lazy dog.'; - -$html = $html1.'
'.$html2.'
'.$html3.'
'.$html3.'
'.$html2; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// test pre tag - -// add a page -$pdf->AddPage(); - -$html = << -Hello World!
-Hello - -
-int main() {
-    printf("HelloWorld");
-    return 0;
-}
-
-Monospace font, normal font, monospace font, normal font. -
-
DIV LEVEL 1
DIV LEVEL 2
DIV LEVEL 1
-
-SPAN LEVEL 1 SPAN LEVEL 2 SPAN LEVEL 1 -EOF; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// test custom bullet points for list - -// add a page -$pdf->AddPage(); - -$html = <<Test custom bullet image for list items -
    -
  • test custom bullet image
  • -
  • test custom bullet image
  • -
  • test custom bullet image
  • -
  • test custom bullet image
  • -
      -EOF; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_006.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_007.php b/htdocs/includes/tcpdf/examples/example_007.php deleted file mode 100644 index eb93ae5d70d..00000000000 --- a/htdocs/includes/tcpdf/examples/example_007.php +++ /dev/null @@ -1,113 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 007'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 007', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 12); - -// add a page -$pdf->AddPage(); - -// create columns content -$left_column = 'LEFT COLUMN left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column'; - -$right_column = 'RIGHT COLUMN right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column'; - -// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true) - -// get current vertical position -$y = $pdf->getY(); - -// set color for background -$pdf->SetFillColor(255, 255, 200); - -// set color for text -$pdf->SetTextColor(0, 63, 127); - -// write the first column -$pdf->writeHTMLCell(80, '', '', $y, $left_column, 1, 0, 1, true, 'J', true); - -// set color for background -$pdf->SetFillColor(215, 235, 255); - -// set color for text -$pdf->SetTextColor(127, 31, 0); - -// write the second column -$pdf->writeHTMLCell(80, '', '', '', $right_column, 1, 1, 1, true, 'J', true); - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_007.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_008.php b/htdocs/includes/tcpdf/examples/example_008.php deleted file mode 100644 index 9fb78c35cef..00000000000 --- a/htdocs/includes/tcpdf/examples/example_008.php +++ /dev/null @@ -1,94 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 008'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 008', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('freeserif', '', 12); - -// add a page -$pdf->AddPage(); - -// get esternal file content -$utf8text = file_get_contents('../cache/utf8test.txt', false); - -// set color for text -$pdf->SetTextColor(0, 63, 127); - -//Write($h, $txt, $link='', $fill=0, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0) - -// write the text -$pdf->Write(5, $utf8text, '', 0, '', false, 0, false, false, 0); - - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_008.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_009.php b/htdocs/includes/tcpdf/examples/example_009.php deleted file mode 100644 index dd67598b391..00000000000 --- a/htdocs/includes/tcpdf/examples/example_009.php +++ /dev/null @@ -1,146 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 009'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 009', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// ------------------------------------------------------------------- - -// add a page -$pdf->AddPage(); - -// set JPEG quality -$pdf->setJPEGQuality(75); - -// Image method signature: -// Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false) - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Example of Image from data stream ('PHP rules') -$imgdata = base64_decode('iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABlBMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDrEX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='); - -// The '@' character is used to indicate that follows an image data stream and not an image file name -$pdf->Image('@'.$imgdata); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Image example with resizing -$pdf->Image('../images/image_demo.jpg', 15, 140, 75, 113, 'JPG', 'http://www.tcpdf.org', '', true, 150, '', false, false, 1, false, false, false); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// test fitbox with all alignment combinations - -$horizontal_alignments = array('L', 'C', 'R'); -$vertical_alignments = array('T', 'M', 'B'); - -$x = 15; -$y = 35; -$w = 30; -$h = 30; -// test all combinations of alignments -for ($i = 0; $i < 3; ++$i) { - $fitbox = $horizontal_alignments[$i].' '; - $x = 15; - for ($j = 0; $j < 3; ++$j) { - $fitbox{1} = $vertical_alignments[$j]; - $pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,128)); - $pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false); - $x += 32; // new column - } - $y += 32; // new row -} - -$x = 115; -$y = 35; -$w = 25; -$h = 50; -for ($i = 0; $i < 3; ++$i) { - $fitbox = $horizontal_alignments[$i].' '; - $x = 115; - for ($j = 0; $j < 3; ++$j) { - $fitbox{1} = $vertical_alignments[$j]; - $pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,255)); - $pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false); - $x += 27; // new column - } - $y += 52; // new row -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Stretching, position and alignment example - -$pdf->SetXY(110, 200); -$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', 'T', false, 300, '', false, false, 1, false, false, false); -$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', '', false, 300, '', false, false, 1, false, false, false); - -// ------------------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_009.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_010.php b/htdocs/includes/tcpdf/examples/example_010.php deleted file mode 100644 index 4ee11ef6c47..00000000000 --- a/htdocs/includes/tcpdf/examples/example_010.php +++ /dev/null @@ -1,150 +0,0 @@ -AddPage(); - // disable existing columns - $this->resetColumns(); - // print chapter title - $this->ChapterTitle($num, $title); - // set columns - $this->setEqualColumns(3, 57); - // print chapter body - $this->ChapterBody($file, $mode); - } - - /** - * Set chapter title - * @param $num (int) chapter number - * @param $title (string) chapter title - * @public - */ - public function ChapterTitle($num, $title) { - $this->SetFont('helvetica', '', 14); - $this->SetFillColor(200, 220, 255); - $this->Cell(180, 6, 'Chapter '.$num.' : '.$title, 0, 1, '', 1); - $this->Ln(4); - } - - /** - * Print chapter body - * @param $file (string) name of the file containing the chapter body - * @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text. - * @public - */ - public function ChapterBody($file, $mode=false) { - $this->selectColumn(); - // get esternal file content - $content = file_get_contents($file, false); - // set font - $this->SetFont('times', '', 9); - $this->SetTextColor(50, 50, 50); - // print content - if ($mode) { - // ------ HTML MODE ------ - $this->writeHTML($content, true, false, true, false, 'J'); - } else { - // ------ TEXT MODE ------ - $this->Write(0, $content, '', 0, 'J', true, 0, false, true, 0); - } - $this->Ln(); - } -} // end of extended class - -// --------------------------------------------------------- -// EXAMPLE -// --------------------------------------------------------- -// create new PDF document -$pdf = new MC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 010'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 010', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// print TEXT -$pdf->PrintChapter(1, 'LOREM IPSUM [TEXT]', '../cache/chapter_demo_1.txt', false); - -// print HTML -$pdf->PrintChapter(2, 'LOREM IPSUM [HTML]', '../cache/chapter_demo_2.txt', true); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_010.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_011.php b/htdocs/includes/tcpdf/examples/example_011.php deleted file mode 100644 index 4b35c3622d2..00000000000 --- a/htdocs/includes/tcpdf/examples/example_011.php +++ /dev/null @@ -1,138 +0,0 @@ -SetFillColor(255, 0, 0); - $this->SetTextColor(255); - $this->SetDrawColor(128, 0, 0); - $this->SetLineWidth(0.3); - $this->SetFont('', 'B'); - // Header - $w = array(40, 35, 40, 45); - $num_headers = count($header); - for($i = 0; $i < $num_headers; ++$i) { - $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1); - } - $this->Ln(); - // Color and font restoration - $this->SetFillColor(224, 235, 255); - $this->SetTextColor(0); - $this->SetFont(''); - // Data - $fill = 0; - foreach($data as $row) { - $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill); - $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill); - $this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill); - $this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill); - $this->Ln(); - $fill=!$fill; - } - $this->Cell(array_sum($w), 0, '', 'T'); - } -} - -// create new PDF document -$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 011'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 011', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 12); - -// add a page -$pdf->AddPage(); - -//Column titles -$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)'); - -//Data loading -$data = $pdf->LoadData('../cache/table_data_demo.txt'); - -// print colored table -$pdf->ColoredTable($header, $data); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_011.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_012.php b/htdocs/includes/tcpdf/examples/example_012.php deleted file mode 100644 index b2429649080..00000000000 --- a/htdocs/includes/tcpdf/examples/example_012.php +++ /dev/null @@ -1,205 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 012'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// disable header and footer -$pdf->setPrintHeader(false); -$pdf->setPrintFooter(false); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - -$style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0)); -$style2 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)); -$style3 = array('width' => 1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(255, 0, 0)); -$style4 = array('L' => 0, - 'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)), - 'R' => array('width' => 0.50, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)), - 'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10')); -$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128)); -$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0)); -$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0)); - -// Line -$pdf->Text(5, 4, 'Line examples'); -$pdf->Line(5, 10, 80, 30, $style); -$pdf->Line(5, 10, 5, 30, $style2); -$pdf->Line(5, 10, 80, 10, $style3); - -// Rect -$pdf->Text(100, 4, 'Rectangle examples'); -$pdf->Rect(100, 10, 40, 20, 'DF', $style4, array(220, 220, 200)); -$pdf->Rect(145, 10, 40, 20, 'D', array('all' => $style3)); - -// Curve -$pdf->Text(5, 34, 'Curve examples'); -$pdf->Curve(5, 40, 30, 55, 70, 45, 60, 75, null, $style6); -$pdf->Curve(80, 40, 70, 75, 150, 45, 100, 75, 'F', $style6); -$pdf->Curve(140, 40, 150, 55, 180, 45, 200, 75, 'DF', $style6, array(200, 220, 200)); - -// Circle and ellipse -$pdf->Text(5, 79, 'Circle and ellipse examples'); -$pdf->SetLineStyle($style5); -$pdf->Circle(25,105,20); -$pdf->Circle(25,105,10, 90, 180, null, $style6); -$pdf->Circle(25,105,10, 270, 360, 'F'); -$pdf->Circle(25,105,10, 270, 360, 'C', $style6); - -$pdf->SetLineStyle($style5); -$pdf->Ellipse(100,103,40,20); -$pdf->Ellipse(100,105,20,10, 0, 90, 180, null, $style6); -$pdf->Ellipse(100,105,20,10, 0, 270, 360, 'DF', $style6); - -$pdf->SetLineStyle($style5); -$pdf->Ellipse(175,103,30,15,45); -$pdf->Ellipse(175,105,15,7.50, 45, 90, 180, null, $style6); -$pdf->Ellipse(175,105,15,7.50, 45, 270, 360, 'F', $style6, array(220, 200, 200)); - -// Polygon -$pdf->Text(5, 129, 'Polygon examples'); -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); -$pdf->Polygon(array(5,135,45,135,15,165)); -$pdf->Polygon(array(60,135,80,135,80,155,70,165,50,155), 'DF', array($style6, $style7, $style7, 0, $style6), array(220, 200, 200)); -$pdf->Polygon(array(120,135,140,135,150,155,110,155), 'D', array($style6, 0, $style7, $style6)); -$pdf->Polygon(array(160,135,190,155,170,155,200,160,160,165), 'DF', array('all' => $style6), array(220, 220, 220)); - -// Polygonal Line -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 164))); -$pdf->PolyLine(array(80,165,90,160,100,165,110,160,120,165,130,160,140,165), 'D', array(), array()); - -// Regular polygon -$pdf->Text(5, 169, 'Regular polygon examples'); -$pdf->SetLineStyle($style5); -$pdf->RegularPolygon(20, 190, 15, 6, 0, 1, 'F'); -$pdf->RegularPolygon(55, 190, 15, 6); -$pdf->RegularPolygon(55, 190, 10, 6, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7)); -$pdf->RegularPolygon(90, 190, 15, 3, 0, 1, 'DF', array('all' => $style5), array(200, 220, 200), 'F', array(255, 200, 200)); -$pdf->RegularPolygon(125, 190, 15, 4, 30, 1, null, array('all' => $style5), null, null, $style6); -$pdf->RegularPolygon(160, 190, 15, 10); - -// Star polygon -$pdf->Text(5, 209, 'Star polygon examples'); -$pdf->SetLineStyle($style5); -$pdf->StarPolygon(20, 230, 15, 20, 3, 0, 1, 'F'); -$pdf->StarPolygon(55, 230, 15, 12, 5); -$pdf->StarPolygon(55, 230, 7, 12, 5, 45, 0, 'DF', array('all' => $style7), array(220, 220, 200), 'F', array(255, 200, 200)); -$pdf->StarPolygon(90, 230, 15, 20, 6, 0, 1, 'DF', array('all' => $style5), array(220, 220, 200), 'F', array(255, 200, 200)); -$pdf->StarPolygon(125, 230, 15, 5, 2, 30, 1, null, array('all' => $style5), null, null, $style6); -$pdf->StarPolygon(160, 230, 15, 10, 3); -$pdf->StarPolygon(160, 230, 7, 50, 26); - -// Rounded rectangle -$pdf->Text(5, 249, 'Rounded rectangle examples'); -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); -$pdf->RoundedRect(5, 255, 40, 30, 3.50, '1111', 'DF'); -$pdf->RoundedRect(50, 255, 40, 30, 6.50, '1000'); -$pdf->RoundedRect(95, 255, 40, 30, 10.0, '1111', null, $style6); -$pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, 200)); - -// Arrows -$pdf->Text(185, 249, 'Arrows'); -$pdf->SetLineStyle($style5); -$pdf->SetFillColor(255, 0, 0); -$pdf->Arrow($x0=200, $y0=280, $x1=185, $y1=266, $head_style=0, $arm_size=5, $arm_angle=15); -$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=263, $head_style=1, $arm_size=5, $arm_angle=15); -$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=261, $head_style=2, $arm_size=5, $arm_angle=15); -$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=3, $arm_size=5, $arm_angle=15); - -// - . - . - . - . - . - . - . - . - . - . - . - . - . - . - - -// ellipse - -// add a page -$pdf->AddPage(); - -$pdf->Cell(0, 0, 'Arc of Ellipse'); - -// center of ellipse -$xc=100; -$yc=100; - -// X Y axis -$pdf->SetDrawColor(200, 200, 200); -$pdf->Line($xc-50, $yc, $xc+50, $yc); -$pdf->Line($xc, $yc-50, $xc, $yc+50); - -// ellipse axis -$pdf->SetDrawColor(200, 220, 255); -$pdf->Line($xc-50, $yc-50, $xc+50, $yc+50); -$pdf->Line($xc-50, $yc+50, $xc+50, $yc-50); - -// ellipse -$pdf->SetDrawColor(200, 255, 200); -$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=0, $afinish=360, $style='D', $line_style=array(), $fill_color=array(), $nc=2); - -// ellipse arc -$pdf->SetDrawColor(255, 0, 0); -$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=45, $afinish=90, $style='D', $line_style=array(), $fill_color=array(), $nc=2); - - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_012.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_013.php b/htdocs/includes/tcpdf/examples/example_013.php deleted file mode 100644 index 2b2a3c4d4e9..00000000000 --- a/htdocs/includes/tcpdf/examples/example_013.php +++ /dev/null @@ -1,229 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 013'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 013', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Graphic Transformations', '', 0, 'C', 1, 0, false, false, 0); - -// set font -$pdf->SetFont('helvetica', '', 10); - -// --- Scaling --------------------------------------------- -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(50, 70, 40, 10, 'D'); -$pdf->Text(50, 66, 'Scale'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// Scale by 150% centered by (50,80) which is the lower left corner of the rectangle -$pdf->ScaleXY(150, 50, 80); -$pdf->Rect(50, 70, 40, 10, 'D'); -$pdf->Text(50, 66, 'Scale'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Translation ----------------------------------------- -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(125, 70, 40, 10, 'D'); -$pdf->Text(125, 66, 'Translate'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// Translate 7 to the right, 5 to the bottom -$pdf->Translate(7, 5); -$pdf->Rect(125, 70, 40, 10, 'D'); -$pdf->Text(125, 66, 'Translate'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Rotation -------------------------------------------- -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(70, 100, 40, 10, 'D'); -$pdf->Text(70, 96, 'Rotate'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// Rotate 20 degrees counter-clockwise centered by (70,110) which is the lower left corner of the rectangle -$pdf->Rotate(20, 70, 110); -$pdf->Rect(70, 100, 40, 10, 'D'); -$pdf->Text(70, 96, 'Rotate'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Skewing --------------------------------------------- -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(125, 100, 40, 10, 'D'); -$pdf->Text(125, 96, 'Skew'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// skew 30 degrees along the x-axis centered by (125,110) which is the lower left corner of the rectangle -$pdf->SkewX(30, 125, 110); -$pdf->Rect(125, 100, 40, 10, 'D'); -$pdf->Text(125, 96, 'Skew'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Mirroring horizontally ------------------------------ -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(70, 130, 40, 10, 'D'); -$pdf->Text(70, 126, 'MirrorH'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// mirror horizontally with axis of reflection at x-position 70 (left side of the rectangle) -$pdf->MirrorH(70); -$pdf->Rect(70, 130, 40, 10, 'D'); -$pdf->Text(70, 126, 'MirrorH'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Mirroring vertically -------------------------------- -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(125, 130, 40, 10, 'D'); -$pdf->Text(125, 126, 'MirrorV'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// mirror vertically with axis of reflection at y-position 140 (bottom side of the rectangle) -$pdf->MirrorV(140); -$pdf->Rect(125, 130, 40, 10, 'D'); -$pdf->Text(125, 126, 'MirrorV'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Point reflection ------------------------------------ -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(70, 160, 40, 10, 'D'); -$pdf->Text(70, 156, 'MirrorP'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -// Start Transformation -$pdf->StartTransform(); -// point reflection at the lower left point of rectangle -$pdf->MirrorP(70,170); -$pdf->Rect(70, 160, 40, 10, 'D'); -$pdf->Text(70, 156, 'MirrorP'); -// Stop Transformation -$pdf->StopTransform(); - -// --- Mirroring against a straigth line described by a point (120, 120) and an angle -20° -$angle=-20; -$px=120; -$py=170; - -// just for visualisation: the straight line to mirror against - -$pdf->SetDrawColor(200); -$pdf->Line($px-1,$py-1,$px+1,$py+1); -$pdf->Line($px-1,$py+1,$px+1,$py-1); -$pdf->StartTransform(); -$pdf->Rotate($angle, $px, $py); -$pdf->Line($px-5, $py, $px+60, $py); -$pdf->StopTransform(); - -$pdf->SetDrawColor(200); -$pdf->SetTextColor(200); -$pdf->Rect(125, 160, 40, 10, 'D'); -$pdf->Text(125, 156, 'MirrorL'); -$pdf->SetDrawColor(0); -$pdf->SetTextColor(0); -//Start Transformation -$pdf->StartTransform(); -//mirror against the straight line -$pdf->MirrorL($angle, $px, $py); -$pdf->Rect(125, 160, 40, 10, 'D'); -$pdf->Text(125, 156, 'MirrorL'); -//Stop Transformation -$pdf->StopTransform(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_013.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_014.php b/htdocs/includes/tcpdf/examples/example_014.php deleted file mode 100644 index 511aae5666b..00000000000 --- a/htdocs/includes/tcpdf/examples/example_014.php +++ /dev/null @@ -1,190 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 014'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 014', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// IMPORTANT: disable font subsetting to allow users editing the document -$pdf->setFontSubsetting(false); - -// set font -$pdf->SetFont('helvetica', '', 10, '', false); - -// add a page -$pdf->AddPage(); - -/* -It is possible to create text fields, combo boxes, check boxes and buttons. -Fields are created at the current position and are given a name. -This name allows to manipulate them via JavaScript in order to perform some validation for instance. -*/ - -// set default form properties -$pdf->setFormDefaultProp(array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 200), 'strokeColor'=>array(255, 128, 128))); - -$pdf->SetFont('helvetica', 'BI', 18); -$pdf->Cell(0, 5, 'Example of Form', 0, 1, 'C'); -$pdf->Ln(10); - -$pdf->SetFont('helvetica', '', 12); - -// First name -$pdf->Cell(35, 5, 'First name:'); -$pdf->TextField('firstname', 50, 5); -$pdf->Ln(6); - -// Last name -$pdf->Cell(35, 5, 'Last name:'); -$pdf->TextField('lastname', 50, 5); -$pdf->Ln(6); - -// Gender -$pdf->Cell(35, 5, 'Gender:'); -//$pdf->ComboBox('gender', 10, 5, array('', 'M', 'F')); -$pdf->ComboBox('gender', 30, 5, array(array('', '-'), array('M', 'Male'), array('F', 'Female'))); -$pdf->Ln(6); - -// Drink -$pdf->Cell(35, 5, 'Drink:'); -$pdf->RadioButton('drink', 5, array(), array(), 'Water'); -$pdf->Cell(35, 5, 'Water'); -$pdf->Ln(6); -$pdf->Cell(35, 5, ''); -$pdf->RadioButton('drink', 5, array(), array(), 'Beer', true); -$pdf->Cell(35, 5, 'Beer'); -$pdf->Ln(6); -$pdf->Cell(35, 5, ''); -$pdf->RadioButton('drink', 5, array(), array(), 'Wine'); -$pdf->Cell(35, 5, 'Wine'); -$pdf->Ln(10); - -// Listbox -$pdf->Cell(35, 5, 'List:'); -$pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true')); -$pdf->Ln(20); - -// Adress -$pdf->Cell(35, 5, 'Address:'); -$pdf->TextField('address', 60, 18, array('multiline'=>true)); -$pdf->Ln(19); - -// E-mail -$pdf->Cell(35, 5, 'E-mail:'); -$pdf->TextField('email', 50, 5); -$pdf->Ln(6); - -// Newsletter -$pdf->Cell(35, 5, 'Newsletter:'); -$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK'); -$pdf->Ln(10); - -// Date of the day -$pdf->Cell(35, 5, 'Date:'); -$pdf->TextField('date', 30, 5, array(), array('v'=>date('Y-m-d'), 'dv'=>date('Y-m-d'))); -$pdf->Ln(10); - -$pdf->SetX(50); - -// Button to validate and print -$pdf->Button('print', 30, 10, 'Print', 'Print()', array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64))); - -// Reset Button -$pdf->Button('reset', 30, 10, 'Reset', array('S'=>'ResetForm'), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64))); - -// Submit Button -$pdf->Button('submit', 30, 10, 'Submit', array('S'=>'SubmitForm', 'F'=>'http://localhost/printvars.php', 'Flags'=>array('ExportFormat')), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64))); - - -// Form validation functions -$js = <<IncludeJS($js); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_014.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_015.php b/htdocs/includes/tcpdf/examples/example_015.php deleted file mode 100644 index 3a79301d6a3..00000000000 --- a/htdocs/includes/tcpdf/examples/example_015.php +++ /dev/null @@ -1,135 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 015'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 015', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// Bookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0)) - -// set font -$pdf->SetFont('times', 'B', 20); - -// add a page -$pdf->AddPage(); - -// set a bookmark for the current position -$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128)); - -// print a line using Cell() -$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L'); - -$pdf->SetFont('times', 'I', 14); -$pdf->Write(0, 'You can set PDF Bookmarks using the Bookmark() method. -You can set PDF Named Destinations using the setDestination() method.'); - -$pdf->SetFont('times', 'B', 20); - -// add other pages and bookmarks - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(0,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(0,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,0,0)); -$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(0,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L'); - -$pdf->AddPage(); -// add a named destination so you can open this document at this page using the link: "example_015.pdf#chapter2" -$pdf->setDestination('chapter2', 0, ''); -$pdf->Bookmark('Chapter 2', 0, 0, '', 'BI', array(128,0,0)); -$pdf->Cell(0, 10, 'Chapter 2', 0, 1, 'L'); -$pdf->SetFont('times', 'I', 14); -$pdf->Write(0, 'Once saved, you can open this document at this page using the link: "example_015.pdf#chapter2".'); - -$pdf->AddPage(); -$pdf->setDestination('chapter3', 0, ''); -$pdf->SetFont('times', 'B', 20); -$pdf->Bookmark('Chapter 3', 0, 0, '', 'B', array(0,64,128)); -$pdf->Cell(0, 10, 'Chapter 3', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->setDestination('chapter4', 0, ''); -$pdf->SetFont('times', 'B', 20); -$pdf->Bookmark('Chapter 4', 0, 0, '', 'B', array(0,64,128)); -$pdf->Cell(0, 10, 'Chapter 4', 0, 1, 'L'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_015.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_016.php b/htdocs/includes/tcpdf/examples/example_016.php deleted file mode 100644 index 3034be48d18..00000000000 --- a/htdocs/includes/tcpdf/examples/example_016.php +++ /dev/null @@ -1,134 +0,0 @@ -SetProtection($permissions=array('print', 'copy'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null); - -// Example with public-key -// To open the document you need to install the private key (tcpdf.p12) on the Acrobat Reader. The password is: 1234 -//$pdf->SetProtection($permissions=array('print', 'copy'), $user_pass='', $owner_pass=null, $mode=1, $pubkeys=array(array('c' => 'file://../tcpdf.crt', 'p' => array('print')))); - -// ********************************************************* - - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 016'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 016', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array('helvetica', '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array('helvetica', '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 16); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_016.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_017.php b/htdocs/includes/tcpdf/examples/example_017.php deleted file mode 100644 index d688fcfbdda..00000000000 --- a/htdocs/includes/tcpdf/examples/example_017.php +++ /dev/null @@ -1,117 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 017'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 017', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of independent Multicell() columns', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(5); - -$pdf->SetFont('times', '', 12); - -// create columns content -// create columns content -$left_column = '[LEFT COLUMN] left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column'."\n"; - -$right_column = '[RIGHT COLUMN] right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column'."\n"; - -// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) - -// set color for background -$pdf->SetFillColor(255, 255, 200); - -// set color for text -$pdf->SetTextColor(0, 63, 127); - -// write the first column -$pdf->MultiCell(80, 0, $left_column, 1, 'J', 1, 0, '', '', true, 0, false, true, 0); - -// set color for background -$pdf->SetFillColor(215, 235, 255); - -// set color for text -$pdf->SetTextColor(127, 31, 0); - -// write the second column -$pdf->MultiCell(80, 0, $right_column, 1, 'J', 1, 1, '', '', true, 0, false, true, 0); - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_017.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_018.php b/htdocs/includes/tcpdf/examples/example_018.php deleted file mode 100644 index 2e067cac263..00000000000 --- a/htdocs/includes/tcpdf/examples/example_018.php +++ /dev/null @@ -1,132 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 018'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 018', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -// set some language dependent data: -$lg = Array(); -$lg['a_meta_charset'] = 'UTF-8'; -$lg['a_meta_dir'] = 'rtl'; -$lg['a_meta_language'] = 'fa'; -$lg['w_page'] = 'page'; - -//set some language-dependent strings -$pdf->setLanguageArray($lg); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('dejavusans', '', 12); - -// add a page -$pdf->AddPage(); - -// Persian and English content -$htmlpersian = 'Persian example:
      سلام بالاخره مشکل PDF فارسی به طور کامل حل شد. اینم یک نمونش.
      مشکل حرف \"ژ\" در بعضی کلمات مانند کلمه ویژه نیز بر طرف شد.
      نگارش حروف لام و الف پشت سر هم نیز تصحیح شد.
      با تشکر از "Asuni Nicola" و محمد علی گل کار برای پشتیبانی زبان فارسی.'; -$pdf->WriteHTML($htmlpersian, true, 0, true, 0); - -// set LTR direction for english translation -$pdf->setRTL(false); - -$pdf->SetFontSize(10); - -// print newline -$pdf->Ln(); - -// Persian and English content -$htmlpersiantranslation = 'Hi, At last Problem of Persian PDF Solved completely. This is a example for it.
      Problem of "jeh" letter in some word like "ویژه" (=special) fix too.
      The joining of laa and alf letter fix now.
      Special thanks to "Nicola Asuni" and "Mohamad Ali Golkar" for Persian support.
      '; -$pdf->WriteHTML($htmlpersiantranslation, true, 0, true, 0); - -// Restore RTL direction -$pdf->setRTL(true); - -// set font size -$pdf->SetFont('almohanad', '', 18); - -// print newline -$pdf->Ln(); - -// Arabic and English content -$pdf->Cell(0, 12, 'بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ',0,1,'C'); -$htmlcontent = 'تمَّ بِحمد الله حلّ مشكلة الكتابة باللغة العربية في ملفات الـPDF مع دعم الكتابة من اليمين إلى اليسار والحركَات .
      تم الحل بواسطة صالح المطرفي و Asuni Nicola . '; -$pdf->WriteHTML($htmlcontent, true, 0, true, 0); - -// set LTR direction for english translation -$pdf->setRTL(false); - -// set font size -$pdf->SetFontSize(18); - -// print newline -$pdf->Ln(); - -// Arabic and English content -$htmlcontent2 = 'This is Arabic "العربية" Example With TCPDF.'; -$pdf->WriteHTML($htmlcontent2, true, 0, true, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_018.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_019.php b/htdocs/includes/tcpdf/examples/example_019.php deleted file mode 100644 index 0fd41b8692b..00000000000 --- a/htdocs/includes/tcpdf/examples/example_019.php +++ /dev/null @@ -1,106 +0,0 @@ -SetDocInfoUnicode(true); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni [€]'); -$pdf->SetTitle('TCPDF Example 019'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 019', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -// set some language dependent data: -$lg = Array(); -$lg['a_meta_charset'] = 'ISO-8859-1'; -$lg['a_meta_dir'] = 'ltr'; -$lg['a_meta_language'] = 'en'; -$lg['w_page'] = 'page'; - -//set some language-dependent strings -$pdf->setLanguageArray($lg); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 12); - -// add a page -$pdf->AddPage(); - -// set color for background -$pdf->SetFillColor(200, 255, 200); - -$txt = 'An alternative configuration file is used on this example. -Check the definition of the K_TCPDF_EXTERNAL_CONFIG constant on the source code.'; - -// print some text -$pdf->MultiCell(0, 0, $txt."\n", 1, 'J', 1, 1, '', '', true, 0, false, true, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_019.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_020.php b/htdocs/includes/tcpdf/examples/example_020.php deleted file mode 100644 index 191867b9def..00000000000 --- a/htdocs/includes/tcpdf/examples/example_020.php +++ /dev/null @@ -1,146 +0,0 @@ -getPage(); - $y_start = $this->GetY(); - - // write the left cell - $this->MultiCell(40, 0, $left, 1, 'R', 1, 2, '', '', true, 0); - - $page_end_1 = $this->getPage(); - $y_end_1 = $this->GetY(); - - $this->setPage($page_start); - - // write the right cell - $this->MultiCell(0, 0, $right, 1, 'J', 0, 1, $this->GetX() ,$y_start, true, 0); - - $page_end_2 = $this->getPage(); - $y_end_2 = $this->GetY(); - - // set the new row position by case - if (max($page_end_1,$page_end_2) == $page_start) { - $ynew = max($y_end_1, $y_end_2); - } elseif ($page_end_1 == $page_end_2) { - $ynew = max($y_end_1, $y_end_2); - } elseif ($page_end_1 > $page_end_2) { - $ynew = $y_end_1; - } else { - $ynew = $y_end_2; - } - - $this->setPage(max($page_end_1,$page_end_2)); - $this->SetXY($this->GetX(),$ynew); - } - -} - -// create new PDF document -$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 020'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 020', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 20); -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of text layout using Multicell()', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(5); - -$pdf->SetFont('times', '', 9); - -//$pdf->SetCellPadding(0); -//$pdf->SetLineWidth(2); - -// set color for background -$pdf->SetFillColor(255, 255, 200); - -$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc. - -Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.'; - -// print some rows just as example -for ($i = 0; $i < 10; ++$i) { - $pdf->MultiRow('Row '.($i+1), $text."\n"); -} - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_020.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_021.php b/htdocs/includes/tcpdf/examples/example_021.php deleted file mode 100644 index 7255ef9994b..00000000000 --- a/htdocs/includes/tcpdf/examples/example_021.php +++ /dev/null @@ -1,91 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 021'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 021', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 9); - -// add a page -$pdf->AddPage(); - -// create some HTML content -$html = '

      Example of HTML text flow

      Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

      A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B    ->    A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B ->    A + B = C    ->    C - B = A    ->    C - A = B

      BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined BoldItalicUnderlined'; - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, 0); - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_021.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_022.php b/htdocs/includes/tcpdf/examples/example_022.php deleted file mode 100644 index 2bbf917211e..00000000000 --- a/htdocs/includes/tcpdf/examples/example_022.php +++ /dev/null @@ -1,146 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 022'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 022', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// check also the following methods: -// SetDrawColorArray() -// SetFillColorArray() -// SetTextColorArray() - -// set font -$pdf->SetFont('helvetica', 'B', 18); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of CMYK, RGB and Grayscale colours', '', 0, 'L', true, 0, false, false, 0); - -// define style for border -$border_style = array('all' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'phase' => 0)); - -// --- CMYK ------------------------------------------------ - -$pdf->SetDrawColor(50, 0, 0, 0); -$pdf->SetFillColor(100, 0, 0, 0); -$pdf->SetTextColor(100, 0, 0, 0); -$pdf->Rect(30, 60, 30, 30, 'DF', $border_style); -$pdf->Text(30, 92, 'Cyan'); - -$pdf->SetDrawColor(0, 50, 0, 0); -$pdf->SetFillColor(0, 100, 0, 0); -$pdf->SetTextColor(0, 100, 0, 0); -$pdf->Rect(70, 60, 30, 30, 'DF', $border_style); -$pdf->Text(70, 92, 'Magenta'); - -$pdf->SetDrawColor(0, 0, 50, 0); -$pdf->SetFillColor(0, 0, 100, 0); -$pdf->SetTextColor(0, 0, 100, 0); -$pdf->Rect(110, 60, 30, 30, 'DF', $border_style); -$pdf->Text(110, 92, 'Yellow'); - -$pdf->SetDrawColor(0, 0, 0, 50); -$pdf->SetFillColor(0, 0, 0, 100); -$pdf->SetTextColor(0, 0, 0, 100); -$pdf->Rect(150, 60, 30, 30, 'DF', $border_style); -$pdf->Text(150, 92, 'Black'); - -// --- RGB ------------------------------------------------- - -$pdf->SetDrawColor(255, 127, 127); -$pdf->SetFillColor(255, 0, 0); -$pdf->SetTextColor(255, 0, 0); -$pdf->Rect(30, 110, 30, 30, 'DF', $border_style); -$pdf->Text(30, 142, 'Red'); - -$pdf->SetDrawColor(127, 255, 127); -$pdf->SetFillColor(0, 255, 0); -$pdf->SetTextColor(0, 255, 0); -$pdf->Rect(70, 110, 30, 30, 'DF', $border_style); -$pdf->Text(70, 142, 'Green'); - -$pdf->SetDrawColor(127, 127, 255); -$pdf->SetFillColor(0, 0, 255); -$pdf->SetTextColor(0, 0, 255); -$pdf->Rect(110, 110, 30, 30, 'DF', $border_style); -$pdf->Text(110, 142, 'Blue'); - -// --- GRAY ------------------------------------------------ - -$pdf->SetDrawColor(191); -$pdf->SetFillColor(127); -$pdf->SetTextColor(127); -$pdf->Rect(30, 160, 30, 30, 'DF', $border_style); -$pdf->Text(30, 192, 'Gray'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_022.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_023.php b/htdocs/includes/tcpdf/examples/example_023.php deleted file mode 100644 index 268007da41d..00000000000 --- a/htdocs/includes/tcpdf/examples/example_023.php +++ /dev/null @@ -1,113 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 023'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 023', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', 'BI', 14); - -// Start First Page Group -$pdf->startPageGroup(); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -// add second page -$pdf->AddPage(); -$pdf->Cell(0, 10, 'This is the second page of group 1', 0, 1, 'L'); - -// Start Second Page Group -$pdf->startPageGroup(); - -// add some pages -$pdf->AddPage(); -$pdf->Cell(0, 10, 'This is the first page of group 2', 0, 1, 'L'); -$pdf->AddPage(); -$pdf->Cell(0, 10, 'This is the second page of group 2', 0, 1, 'L'); -$pdf->AddPage(); -$pdf->Cell(0, 10, 'This is the third page of group 2', 0, 1, 'L'); -$pdf->AddPage(); -$pdf->Cell(0, 10, 'This is the fourth page of group 2', 0, 1, 'L'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_023.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_024.php b/htdocs/includes/tcpdf/examples/example_024.php deleted file mode 100644 index 2d53a5e7726..00000000000 --- a/htdocs/includes/tcpdf/examples/example_024.php +++ /dev/null @@ -1,118 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 024'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 024', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 18); - -// add a page -$pdf->AddPage(); - -/* - * setVisibility() allows to restrict the rendering of some - * elements to screen or printout. This can be useful, for - * instance, to put a background image or color that will - * show on screen but won't print. - */ - -$txt = 'You can limit the visibility of PDF objects to screen or printer by using the setVisibility() method. -Check the print preview of this document to display the alternative text.'; - -$pdf->Write(0, $txt, '', 0, '', true, 0, false, false, 0); - -// change font size -$pdf->SetFontSize(40); - -// change text color -$pdf->SetTextColor(0,63,127); - -// set visibility only for screen -$pdf->setVisibility('screen'); - -// write something only for screen -$pdf->Write(0, '[This line is for display]', '', 0, 'C', true, 0, false, false, 0); - -// set visibility only for print -$pdf->setVisibility('print'); - -// change text color -$pdf->SetTextColor(127,0,0); - -// write something only for print -$pdf->Write(0, '[This line is for printout]', '', 0, 'C', true, 0, false, false, 0); - -// restore visibility -$pdf->setVisibility('all'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_024.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_025.php b/htdocs/includes/tcpdf/examples/example_025.php deleted file mode 100644 index 8907cf47bf8..00000000000 --- a/htdocs/includes/tcpdf/examples/example_025.php +++ /dev/null @@ -1,118 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 025'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 025', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 12); - -// add a page -$pdf->AddPage(); - -$txt = 'You can set the transparency of PDF objects using the setAlpha() method.'; -$pdf->Write(0, $txt, '', 0, '', true, 0, false, false, 0); - -/* - * setAlpha() gives transparency support. You can set the - * alpha channel from 0 (fully transparent) to 1 (fully - * opaque). It applies to all elements (text, drawings, - * images). - */ - -$pdf->SetLineWidth(2); - -// draw opaque red square -$pdf->SetFillColor(255, 0, 0); -$pdf->SetDrawColor(127, 0, 0); -$pdf->Rect(30, 40, 60, 60, 'DF'); - -// set alpha to semi-transparency -$pdf->SetAlpha(0.5); - -// draw green square -$pdf->SetFillColor(0, 255, 0); -$pdf->SetDrawColor(0, 127, 0); -$pdf->Rect(50, 60, 60, 60, 'DF'); - -// draw blue square -$pdf->SetFillColor(0, 0, 255); -$pdf->SetDrawColor(0, 0, 127); -$pdf->Rect(70, 80, 60, 60, 'DF'); - -// draw jpeg image -$pdf->Image('../images/image_demo.jpg', 90, 100, 60, 60, '', 'http://www.tcpdf.org', '', true, 72); - -// restore full opacity -$pdf->SetAlpha(1); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_025.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_026.php b/htdocs/includes/tcpdf/examples/example_026.php deleted file mode 100644 index 2ee9ec6eada..00000000000 --- a/htdocs/includes/tcpdf/examples/example_026.php +++ /dev/null @@ -1,145 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 026'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 026', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 22); - -// add a page -$pdf->AddPage(); - -// set color for text stroke -$pdf->SetDrawColor(255,0,0); - - -$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=false); -$pdf->Write(0, 'Fill text', '', 0, '', true, 0, false, false, 0); - -$pdf->setTextRenderingMode($stroke=0.2, $fill=false, $clip=false); -$pdf->Write(0, 'Stroke text', '', 0, '', true, 0, false, false, 0); - -$pdf->setTextRenderingMode($stroke=0.2, $fill=true, $clip=false); -$pdf->Write(0, 'Fill, then stroke text', '', 0, '', true, 0, false, false, 0); - -$pdf->setTextRenderingMode($stroke=0, $fill=false, $clip=false); -$pdf->Write(0, 'Neither fill nor stroke text (invisible)', '', 0, '', true, 0, false, false, 0); - - -// * * * CLIPPING MODES * * * * * * * * * * * * * * * * * * - -$pdf->StartTransform(); -$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=true); -$pdf->Write(0, 'Fill text and add to path for clipping', '', 0, '', true, 0, false, false, 0); -$pdf->Image('../images/image_demo.jpg', 15, 65, 170, 10, '', '', '', true, 72); -$pdf->StopTransform(); - -$pdf->StartTransform(); -$pdf->setTextRenderingMode($stroke=0.3, $fill=false, $clip=true); -$pdf->Write(0, 'Stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0); -$pdf->Image('../images/image_demo.jpg', 15, 75, 170, 10, '', '', '', true, 72); -$pdf->StopTransform(); - -$pdf->StartTransform(); -$pdf->setTextRenderingMode($stroke=0.3, $fill=true, $clip=true); -$pdf->Write(0, 'Fill, then stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0); -$pdf->Image('../images/image_demo.jpg', 15, 85, 170, 10, '', '', '', true, 72); -$pdf->StopTransform(); - -$pdf->StartTransform(); -$pdf->setTextRenderingMode($stroke=0, $fill=false, $clip=true); -$pdf->Write(0, 'Add text to path for clipping', '', 0, '', true, 0, false, false, 0); -$pdf->Image('../images/image_demo.jpg', 15, 95, 170, 10, '', '', '', true, 72); -$pdf->StopTransform(); - -// reset text rendering mode -$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=false); - -// * * * HTML MODE * * * * * * * * * * * * * * * * * * * * * - -// The following attributes were added to HTML: -// stroke : stroke width -// strokecolor : stroke color -// fill : true (default) to fill the font, false otherwise - - -// create some HTML content with text rendering modes -$html = 'HTML Fill text
      '; -$html .= 'HTML Stroke text
      '; -$html .= 'HTML Fill, then stroke text
      '; -$html .= 'HTML Neither fill nor stroke text (invisible)
      '; - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_026.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_027.php b/htdocs/includes/tcpdf/examples/example_027.php deleted file mode 100644 index 28132e50dd0..00000000000 --- a/htdocs/includes/tcpdf/examples/example_027.php +++ /dev/null @@ -1,409 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 027'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 027', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set a barcode on the page footer -$pdf->setBarcode(date('Y-m-d H:i:s')); - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - -// define barcode style -$style = array( - 'position' => '', - 'align' => 'C', - 'stretch' => false, - 'fitwidth' => true, - 'cellfitalign' => '', - 'border' => true, - 'hpadding' => 'auto', - 'vpadding' => 'auto', - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, //array(255,255,255), - 'text' => true, - 'font' => 'helvetica', - 'fontsize' => 8, - 'stretchtext' => 4 -); - -// PRINT VARIOUS 1D BARCODES - -// CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. -$pdf->Cell(0, 0, 'CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9', 0, 1); -$pdf->write1DBarcode('CODE 39', 'C39', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 39 + CHECKSUM -$pdf->Cell(0, 0, 'CODE 39 + CHECKSUM', 0, 1); -$pdf->write1DBarcode('CODE 39 +', 'C39+', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 39 EXTENDED -$pdf->Cell(0, 0, 'CODE 39 EXTENDED', 0, 1); -$pdf->write1DBarcode('CODE 39 E', 'C39E', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 39 EXTENDED + CHECKSUM -$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1); -$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 93 - USS-93 -$pdf->Cell(0, 0, 'CODE 93 - USS-93', 0, 1); -$pdf->write1DBarcode('TEST93', 'C93', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// Standard 2 of 5 -$pdf->Cell(0, 0, 'Standard 2 of 5', 0, 1); -$pdf->write1DBarcode('1234567', 'S25', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// Standard 2 of 5 + CHECKSUM -$pdf->Cell(0, 0, 'Standard 2 of 5 + CHECKSUM', 0, 1); -$pdf->write1DBarcode('1234567', 'S25+', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// Interleaved 2 of 5 -$pdf->Cell(0, 0, 'Interleaved 2 of 5', 0, 1); -$pdf->write1DBarcode('1234567', 'I25', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// Interleaved 2 of 5 + CHECKSUM -$pdf->Cell(0, 0, 'Interleaved 2 of 5 + CHECKSUM', 0, 1); -$pdf->write1DBarcode('1234567', 'I25+', '', '', '', 18, 0.4, $style, 'N'); - - -// add a page ---------- -$pdf->AddPage(); - -// CODE 128 AUTO -$pdf->Cell(0, 0, 'CODE 128 AUTO', 0, 1); -$pdf->write1DBarcode('CODE 128 AUTO', 'C128', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 128 A -$pdf->Cell(0, 0, 'CODE 128 A', 0, 1); -$pdf->write1DBarcode('CODE 128 A', 'C128A', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 128 B -$pdf->Cell(0, 0, 'CODE 128 B', 0, 1); -$pdf->write1DBarcode('CODE 128 B', 'C128B', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 128 C -$pdf->Cell(0, 0, 'CODE 128 C', 0, 1); -$pdf->write1DBarcode('0123456789', 'C128C', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// EAN 8 -$pdf->Cell(0, 0, 'EAN 8', 0, 1); -$pdf->write1DBarcode('1234567', 'EAN8', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// EAN 13 -$pdf->Cell(0, 0, 'EAN 13', 0, 1); -$pdf->write1DBarcode('1234567890128', 'EAN13', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// UPC-A -$pdf->Cell(0, 0, 'UPC-A', 0, 1); -$pdf->write1DBarcode('12345678901', 'UPCA', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// UPC-E -$pdf->Cell(0, 0, 'UPC-E', 0, 1); -$pdf->write1DBarcode('04210000526', 'UPCE', '', '', '', 18, 0.4, $style, 'N'); - -// add a page ---------- -$pdf->AddPage(); - -// 5-Digits UPC-Based Extention -$pdf->Cell(0, 0, '5-Digits UPC-Based Extention', 0, 1); -$pdf->write1DBarcode('51234', 'EAN5', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// 2-Digits UPC-Based Extention -$pdf->Cell(0, 0, '2-Digits UPC-Based Extention', 0, 1); -$pdf->write1DBarcode('34', 'EAN2', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// MSI -$pdf->Cell(0, 0, 'MSI', 0, 1); -$pdf->write1DBarcode('80523', 'MSI', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// MSI + CHECKSUM (module 11) -$pdf->Cell(0, 0, 'MSI + CHECKSUM (module 11)', 0, 1); -$pdf->write1DBarcode('80523', 'MSI+', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODABAR -$pdf->Cell(0, 0, 'CODABAR', 0, 1); -$pdf->write1DBarcode('123456789', 'CODABAR', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// CODE 11 -$pdf->Cell(0, 0, 'CODE 11', 0, 1); -$pdf->write1DBarcode('123-456-789', 'CODE11', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// PHARMACODE -$pdf->Cell(0, 0, 'PHARMACODE', 0, 1); -$pdf->write1DBarcode('789', 'PHARMA', '', '', '', 18, 0.4, $style, 'N'); - -$pdf->Ln(); - -// PHARMACODE TWO-TRACKS -$pdf->Cell(0, 0, 'PHARMACODE TWO-TRACKS', 0, 1); -$pdf->write1DBarcode('105', 'PHARMA2T', '', '', '', 18, 2, $style, 'N'); - -// add a page ---------- -$pdf->AddPage(); - -// IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 -$pdf->Cell(0, 0, 'IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200', 0, 1); -$pdf->write1DBarcode('01234567094987654321-01234567891', 'IMB', '', '', '', 15, 0.6, $style, 'N'); - -$pdf->Ln(); - -// POSTNET -$pdf->Cell(0, 0, 'POSTNET', 0, 1); -$pdf->write1DBarcode('98000', 'POSTNET', '', '', '', 15, 0.6, $style, 'N'); - -$pdf->Ln(); - -// PLANET -$pdf->Cell(0, 0, 'PLANET', 0, 1); -$pdf->write1DBarcode('98000', 'PLANET', '', '', '', 15, 0.6, $style, 'N'); - -$pdf->Ln(); - -// RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) -$pdf->Cell(0, 0, 'RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)', 0, 1); -$pdf->write1DBarcode('SN34RD1A', 'RMS4CC', '', '', '', 15, 0.6, $style, 'N'); - -$pdf->Ln(); - -// KIX (Klant index - Customer index) -$pdf->Cell(0, 0, 'KIX (Klant index - Customer index)', 0, 1); -$pdf->write1DBarcode('SN34RDX1A', 'KIX', '', '', '', 15, 0.6, $style, 'N'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// TEST BARCODE ALIGNMENTS - -// add a page -$pdf->AddPage(); - -// set a background color -$style['bgcolor'] = array(255,255,240); -$style['fgcolor'] = array(127,0,0); - -// Left position -$style['position'] = 'L'; -$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Center position -$style['position'] = 'C'; -$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Right position -$style['position'] = 'R'; -$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -$style['fgcolor'] = array(0,127,0); -$style['position'] = ''; -$style['stretch'] = false; // disable stretch -$style['fitwidth'] = false; // disable fitwidth - -// Left alignment -$style['align'] = 'L'; -$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Center alignment -$style['align'] = 'C'; -$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Right alignment -$style['align'] = 'R'; -$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -$style['fgcolor'] = array(0,64,127); -$style['position'] = ''; -$style['stretch'] = false; // disable stretch -$style['fitwidth'] = true; // disable fitwidth - -// Left alignment -$style['cellfitalign'] = 'L'; -$pdf->write1DBarcode('LEFT', 'C128A', 105, '', 90, 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Center alignment -$style['cellfitalign'] = 'C'; -$pdf->write1DBarcode('CENTER', 'C128A', 105, '', 90, 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Right alignment -$style['cellfitalign'] = 'R'; -$pdf->write1DBarcode('RIGHT', 'C128A', 105, '', 90, 15, 0.4, $style, 'N'); - -$pdf->Ln(2); -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -$style['fgcolor'] = array(127,0,127); - -// Left alignment -$style['position'] = 'L'; -$pdf->write1DBarcode('LEFT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Center alignment -$style['position'] = 'C'; -$pdf->write1DBarcode('CENTER', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -$pdf->Ln(2); - -// Right alignment -$style['position'] = 'R'; -$pdf->write1DBarcode('RIGHT', 'C128A', '', '', '', 15, 0.4, $style, 'N'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// TEST BARCODE STYLE - -// define barcode style -$style = array( - 'position' => '', - 'align' => '', - 'stretch' => true, - 'fitwidth' => false, - 'cellfitalign' => '', - 'border' => true, - 'hpadding' => 'auto', - 'vpadding' => 'auto', - 'fgcolor' => array(0,0,128), - 'bgcolor' => array(255,255,128), - 'text' => true, - 'label' => 'CUSTOM LABEL', - 'font' => 'helvetica', - 'fontsize' => 8, - 'stretchtext' => 4 -); - -// CODE 39 EXTENDED + CHECKSUM -$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1); -$pdf->SetLineStyle(array('width' => 1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0))); -$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', 120, 25, 0.4, $style, 'N'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_027.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_028.php b/htdocs/includes/tcpdf/examples/example_028.php deleted file mode 100644 index c67d12646dd..00000000000 --- a/htdocs/includes/tcpdf/examples/example_028.php +++ /dev/null @@ -1,138 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 028'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// remove default header/footer -$pdf->setPrintHeader(false); -$pdf->setPrintFooter(false); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(10, PDF_MARGIN_TOP, 10); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -$pdf->SetDisplayMode('fullpage', 'SinglePage', 'UseNone'); - -// set font -$pdf->SetFont('times', 'B', 20); - -$pdf->AddPage('P', 'A4'); -$pdf->Cell(0, 0, 'A4 PORTRAIT', 1, 1, 'C'); - -$pdf->AddPage('L', 'A4'); -$pdf->Cell(0, 0, 'A4 LANDSCAPE', 1, 1, 'C'); - -$pdf->AddPage('P', 'A5'); -$pdf->Cell(0, 0, 'A5 PORTRAIT', 1, 1, 'C'); - -$pdf->AddPage('L', 'A5'); -$pdf->Cell(0, 0, 'A5 LANDSCAPE', 1, 1, 'C'); - -$pdf->AddPage('P', 'A6'); -$pdf->Cell(0, 0, 'A6 PORTRAIT', 1, 1, 'C'); - -$pdf->AddPage('L', 'A6'); -$pdf->Cell(0, 0, 'A6 LANDSCAPE', 1, 1, 'C'); - -$pdf->AddPage('P', 'A7'); -$pdf->Cell(0, 0, 'A7 PORTRAIT', 1, 1, 'C'); - -$pdf->AddPage('L', 'A7'); -$pdf->Cell(0, 0, 'A7 LANDSCAPE', 1, 1, 'C'); - - -// --- test backward editing --- - - -$pdf->setPage(1, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C'); - -$pdf->setPage(2, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C'); - -$pdf->setPage(3, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C'); - -$pdf->setPage(4, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C'); - -$pdf->setPage(5, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C'); - -$pdf->setPage(6, true); -$pdf->SetY(50); -$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C'); - -$pdf->setPage(7, true); -$pdf->SetY(40); -$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C'); - -$pdf->setPage(8, true); -$pdf->SetY(40); -$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C'); - -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_028.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_029.php b/htdocs/includes/tcpdf/examples/example_029.php deleted file mode 100644 index 74ea5b80e68..00000000000 --- a/htdocs/includes/tcpdf/examples/example_029.php +++ /dev/null @@ -1,124 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 029'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 029', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set array for viewer preferences -$preferences = array( - 'HideToolbar' => true, - 'HideMenubar' => true, - 'HideWindowUI' => true, - 'FitWindow' => true, - 'CenterWindow' => true, - 'DisplayDocTitle' => true, - 'NonFullScreenPageMode' => 'UseNone', // UseNone, UseOutlines, UseThumbs, UseOC - 'ViewArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox - 'ViewClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox - 'PrintArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox - 'PrintClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox - 'PrintScaling' => 'AppDefault', // None, AppDefault - 'Duplex' => 'DuplexFlipLongEdge', // Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge - 'PickTrayByPDFSize' => true, - 'PrintPageRange' => array(1,1,2,3), - 'NumCopies' => 2 -); - -// Check the example n. 60 for advanced page settings - -// set pdf viewer preferences -$pdf->setViewerPreferences($preferences); - -// set font -$pdf->SetFont('times', '', 14); - -// add a page -$pdf->AddPage(); - -// print a line -$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 1', 1, 1, 'C'); - -$pdf->Ln(5); - -$pdf->Write(0, 'You can use the setViewerPreferences() method to change viewer preferences.', '', 0, 'L', true, 0, false, false, 0); - -// add a page -$pdf->AddPage(); -// print a line -$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 2', 0, 0, 'C'); - -// add a page -$pdf->AddPage(); -// print a line -$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 3', 0, 0, 'C'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_029.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_030.php b/htdocs/includes/tcpdf/examples/example_030.php deleted file mode 100644 index 57272593c5c..00000000000 --- a/htdocs/includes/tcpdf/examples/example_030.php +++ /dev/null @@ -1,188 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 030'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 030', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// --- first page ------------------------------------------ - -// add a page -$pdf->AddPage(); - -$pdf->Cell(0, 0, 'TCPDF Gradients', 0, 1, 'C', 0, '', 0, false, 'T', 'M'); - -// set colors for gradients (r,g,b) or (grey 0-255) -$red = array(255, 0, 0); -$blue = array(0, 0, 200); -$yellow = array(255, 255, 0); -$green = array(0, 255, 0); -$white = array(255); -$black = array(0); - -// set the coordinates x1,y1,x2,y2 of the gradient (see linear_gradient_coords.jpg) -$coords = array(0, 0, 1, 0); - -// paint a linear gradient -$pdf->LinearGradient(20, 45, 80, 80, $red, $blue, $coords); - -// write label -$pdf->Text(20, 130, 'LinearGradient()'); - -// set the coordinates fx,fy,cx,cy,r of the gradient (see radial_gradient_coords.jpg) -$coords = array(0.5, 0.5, 1, 1, 1.2); - -// paint a radial gradient -$pdf->RadialGradient(110, 45, 80, 80, $white, $black, $coords); - -// write label -$pdf->Text(110, 130, 'RadialGradient()'); - -// paint a coons patch mesh with default coordinates -$pdf->CoonsPatchMesh(20, 155, 80, 80, $yellow, $blue, $green, $red); - -// write label -$pdf->Text(20, 240, 'CoonsPatchMesh()'); - -// set the coordinates for the cubic Bzier points x1,y1 ... x12, y12 of the patch (see coons_patch_mesh_coords.jpg) -$coords = array( - 0.00,0.00, 0.33,0.20, //lower left - 0.67,0.00, 1.00,0.00, 0.80,0.33, //lower right - 0.80,0.67, 1.00,1.00, 0.67,0.80, //upper right - 0.33,1.00, 0.00,1.00, 0.20,0.67, //upper left - 0.00,0.33); //lower left -$coords_min = 0; //minimum value of the coordinates -$coords_max = 1; //maximum value of the coordinates - -// paint a coons patch gradient with the above coordinates -$pdf->CoonsPatchMesh(110, 155, 80, 80, $yellow, $blue, $green, $red, $coords, $coords_min, $coords_max); - -// write label -$pdf->Text(110, 240, 'CoonsPatchMesh()'); - -// --- second page ----------------------------------------- -$pdf->AddPage(); - -// first patch: f = 0 -$patch_array[0]['f'] = 0; -$patch_array[0]['points'] = array( - 0.00,0.00, 0.33,0.00, - 0.67,0.00, 1.00,0.00, 1.00,0.33, - 0.8,0.67, 1.00,1.00, 0.67,0.8, - 0.33,1.80, 0.00,1.00, 0.00,0.67, - 0.00,0.33); -$patch_array[0]['colors'][0] = array('r' => 255, 'g' => 255, 'b' => 0); -$patch_array[0]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255); -$patch_array[0]['colors'][2] = array('r' => 0, 'g' => 255,'b' => 0); -$patch_array[0]['colors'][3] = array('r' => 255, 'g' => 0,'b' => 0); - -// second patch - above the other: f = 2 -$patch_array[1]['f'] = 2; -$patch_array[1]['points'] = array( - 0.00,1.33, - 0.00,1.67, 0.00,2.00, 0.33,2.00, - 0.67,2.00, 1.00,2.00, 1.00,1.67, - 1.5,1.33); -$patch_array[1]['colors'][0]=array('r' => 0, 'g' => 0, 'b' => 0); -$patch_array[1]['colors'][1]=array('r' => 255, 'g' => 0, 'b' => 255); - -// third patch - right of the above: f = 3 -$patch_array[2]['f'] = 3; -$patch_array[2]['points'] = array( - 1.33,0.80, - 1.67,1.50, 2.00,1.00, 2.00,1.33, - 2.00,1.67, 2.00,2.00, 1.67,2.00, - 1.33,2.00); -$patch_array[2]['colors'][0] = array('r' => 0, 'g' => 255, 'b' => 255); -$patch_array[2]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 0); - -// fourth patch - below the above, which means left(?) of the above: f = 1 -$patch_array[3]['f'] = 1; -$patch_array[3]['points'] = array( - 2.00,0.67, - 2.00,0.33, 2.00,0.00, 1.67,0.00, - 1.33,0.00, 1.00,0.00, 1.00,0.33, - 0.8,0.67); -$patch_array[3]['colors'][0] = array('r' => 0, 'g' => 0, 'b' => 0); -$patch_array[3]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255); - -$coords_min = 0; -$coords_max = 2; - -$pdf->CoonsPatchMesh(10, 45, 190, 200, '', '', '', '', $patch_array, $coords_min, $coords_max); - -// write label -$pdf->Text(10, 250, 'CoonsPatchMesh()'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_030.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_031.php b/htdocs/includes/tcpdf/examples/example_031.php deleted file mode 100644 index d7cbebf6e2b..00000000000 --- a/htdocs/includes/tcpdf/examples/example_031.php +++ /dev/null @@ -1,103 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 031'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 031', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of PieSector() method.'); - -$xc = 105; -$yc = 100; -$r = 50; - -$pdf->SetFillColor(0, 0, 255); -$pdf->PieSector($xc, $yc, $r, 20, 120, 'FD', false, 0, 2); - -$pdf->SetFillColor(0, 255, 0); -$pdf->PieSector($xc, $yc, $r, 120, 250, 'FD', false, 0, 2); - -$pdf->SetFillColor(255, 0, 0); -$pdf->PieSector($xc, $yc, $r, 250, 20, 'FD', false, 0, 2); - -// write labels -$pdf->SetTextColor(255,255,255); -$pdf->Text(105, 65, 'BLUE'); -$pdf->Text(60, 95, 'GREEN'); -$pdf->Text(120, 115, 'RED'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_031.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_032.php b/htdocs/includes/tcpdf/examples/example_032.php deleted file mode 100644 index c9a2835beb3..00000000000 --- a/htdocs/includes/tcpdf/examples/example_032.php +++ /dev/null @@ -1,93 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 032'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 032', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 12); - -$pdf->AddPage(); - -$pdf->Write(0, 'Example of ImageEPS() method for AI and EPS images'); - -$pdf->ImageEps($file='../images/tiger.ai', $x=10, $y=50, $w=190, $h=190, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false); - -$pdf->AddPage(); - -$pdf->ImageEps('../images/bug.eps', 0, 25, 0, 240, "http://www.tcpdf.org", true, 'T', 'C'); - -$pdf->AddPage(); - -$pdf->ImageEps('../images/pelican.ai', 15, 70, 180); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_032.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_033.php b/htdocs/includes/tcpdf/examples/example_033.php deleted file mode 100644 index d9de0cde806..00000000000 --- a/htdocs/includes/tcpdf/examples/example_033.php +++ /dev/null @@ -1,105 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 033'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 033', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// add a page -$pdf->AddPage(); - -// set default font subsetting mode -$pdf->setFontSubsetting(false); - -$pdf->SetFont('helvetica', 'B', 20); - -$pdf->Write(0, 'Font Types', '', 0, 'C', 1, 0, false, false, 0); - -$pdf->Ln(10); - -$pdf->SetFont('times', '', 10); - -$pdf->MultiCell(80, 0, "[Core font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0); - -$pdf->Ln(2); - -$pdf->SetFont('dejavusans', '', 10); - -$pdf->MultiCell(80, 0, "[True Type Unicode font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0); - -$pdf->Ln(2); - -$pdf->SetFont('arialunicid0', '', 9); - -$pdf->MultiCell(80, 0, "[CID-0 font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0); - - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_033.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_034.php b/htdocs/includes/tcpdf/examples/example_034.php deleted file mode 100644 index 689e3edb414..00000000000 --- a/htdocs/includes/tcpdf/examples/example_034.php +++ /dev/null @@ -1,96 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 034'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 034', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Image Clipping using geometric functions', '', 0, 'C', 1, 0, false, false, 0); - -//Start Graphic Transformation -$pdf->StartTransform(); - -// set clipping mask -$pdf->StarPolygon(105, 100, 30, 10, 3, 0, 1, 'CNZ'); - -// draw jpeg image to be clipped -$pdf->Image('../images/image_demo.jpg', 75, 70, 60, 60, '', 'http://www.tcpdf.org', '', true, 72); - -//Stop Graphic Transformation -$pdf->StopTransform(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_034.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_035.php b/htdocs/includes/tcpdf/examples/example_035.php deleted file mode 100644 index b347bd4d864..00000000000 --- a/htdocs/includes/tcpdf/examples/example_035.php +++ /dev/null @@ -1,111 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 035'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 035', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', 'BI', 16); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of SetLineStyle() method', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(); - -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => array(255, 0, 0))); -$pdf->SetFillColor(255,255,128); -$pdf->SetTextColor(0,0,128); - -$text="DUMMY"; - -$pdf->Cell(0, 0, $text, 1, 1, 'L', 1, 0); - -$pdf->Ln(); - -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 255))); -$pdf->SetFillColor(255,255,0); -$pdf->SetTextColor(0,0,255); -$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 0); - -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 255, 0))); -$pdf->SetFillColor(0,0,255); -$pdf->SetTextColor(255,255,0); -$pdf->MultiCell(60, 4, $text, 'TB', 'C', 1, 0); - -$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 255))); -$pdf->SetFillColor(0,255,0); -$pdf->SetTextColor(255,0,255); -$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 1); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_035.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_036.php b/htdocs/includes/tcpdf/examples/example_036.php deleted file mode 100644 index 62c0e71d904..00000000000 --- a/htdocs/includes/tcpdf/examples/example_036.php +++ /dev/null @@ -1,89 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 036'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 036', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 16); - -// add a page -$pdf->AddPage(); - -$txt = 'Example of Text Annotation. -Move your mouse over the yellow box or double click on it to display the annotation text.'; -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -// text annotation -$pdf->Annotation(83, 27, 10, 10, "Text annotation example\naccented letters test: àèéìòù", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'title example', 'Subj' => 'example', 'C' => array(255, 255, 0))); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_036.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_037.php b/htdocs/includes/tcpdf/examples/example_037.php deleted file mode 100644 index c8299332e0d..00000000000 --- a/htdocs/includes/tcpdf/examples/example_037.php +++ /dev/null @@ -1,202 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 037'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 037', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 20); - -// add a page -$pdf->AddPage(); - - -$pdf->Write(0, 'Example of Spot Colors', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(5); - -$pdf->SetFont('helvetica', '', 8); - -// Define some new spot colors -// $c, $m, $y and $k (2nd, 3rd, 4th and 5th parameter) are the CMYK color components. -// AddSpotColor($name, $c, $m, $y, $k) -$pdf->AddSpotColor('Pantone 116 C', 0, 20, 100, 0); -$pdf->AddSpotColor('HKS 16 K', 30, 100, 90, 10); -$pdf->AddSpotColor('Pantone 505 C', 57, 100, 85, 55); -$pdf->AddSpotColor('Pantone 440 C', 50, 60, 80, 70); -$pdf->AddSpotColor('Pantone 288 C', 100, 60, 10, 5); -$pdf->AddSpotColor('Pantone 289 C', 100, 78, 50, 0); -$pdf->AddSpotColor('Pantone 356 C', 100, 30, 100, 0); -$pdf->AddSpotColor('Pantone 567 C', 100, 50, 80, 45); -$pdf->AddSpotColor('Pantone 9060 C', 0, 0, 7, 0); -$pdf->AddSpotColor('Pantone 420 C', 22, 14, 22, 0); -$pdf->AddSpotColor('Pantone 422 C', 39, 24, 34, 0); -$pdf->AddSpotColor('Pantone 433 C', 34, 0, 0, 94); -$pdf->AddSpotColor('NovaSpace-Black', 50, 0, 0, 100); -$pdf->AddSpotColor('Pantone 601 C', 0, 0, 55, 0); -$pdf->AddSpotColor('Pantone 659 C', 50, 20, 0, 10); - -// Select the spot color -// $tint (the second parameter) is the intensity of the color (0-100). -// SetTextSpotColor($name, $tint=100) -// SetDrawSpotColor($name, $tint=100) -// SetFillSpotColor($name, $tint=100) - -$pdf->SetTextSpotColor('NovaSpace-Black', 100); -$pdf->SetDrawSpotColor('NovaSpace-Black', 100); - -$starty = 50; - -// print some spot colors -$pdf->SetFillSpotColor('Pantone 116 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 116 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('HKS 16 K', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'HKS 16 K'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 505 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 505 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 440 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 440 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 288 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 288 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 289 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 289 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 356 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 356 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 567 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 567 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 9060 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 9060 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 420 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 420 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 422 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 422 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 433 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 433 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 601 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 601 C'); - -$starty += 8; - -$pdf->SetFillSpotColor('Pantone 659 C', 100); -$pdf->Rect(30, $starty, 20, 6, 'DF'); -$pdf->Text(53, $starty + 1, 'Pantone 659 C'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_037.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_038.php b/htdocs/includes/tcpdf/examples/example_038.php deleted file mode 100644 index 8221d9384c0..00000000000 --- a/htdocs/includes/tcpdf/examples/example_038.php +++ /dev/null @@ -1,87 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 038'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 038', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('arialunicid0', '', 20); - -// add a page -$pdf->AddPage(); - -$txt = 'Example of CID-0 CJK unembedded font. -To display extended text you must have CJK fonts for your PDF reader: こんにちは世界'; - -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_038.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_039.php b/htdocs/includes/tcpdf/examples/example_039.php deleted file mode 100644 index d92ad73ac53..00000000000 --- a/htdocs/includes/tcpdf/examples/example_039.php +++ /dev/null @@ -1,104 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 039'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 039', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// add a page -$pdf->AddPage(); - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -$pdf->Write(0, 'Example of HTML Justification', '', 0, 'L', true, 0, false, false, 0); - -// create some HTML content -$html = 'a abc abcdefghijkl abcdef abcdefg abcdefghi a abc abcd test alt attribute abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg start a abc before yellow color after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi
      abcd abcdef abcdefg abcdefghi
      abcd abcde abcdef
      '; - -// set core font -$pdf->SetFont('helvetica', '', 10); - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, true); - -$pdf->Ln(); - -// set UTF-8 Unicode font -$pdf->SetFont('dejavusans', '', 10); - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, true); - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_039.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_040.php b/htdocs/includes/tcpdf/examples/example_040.php deleted file mode 100644 index de55e6f617e..00000000000 --- a/htdocs/includes/tcpdf/examples/example_040.php +++ /dev/null @@ -1,116 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 040'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 040', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set display mode -$pdf->SetDisplayMode($zoom='fullpage', $layout='TwoColumnRight', $mode='UseNone'); - -// set pdf viewer preferences -$pdf->setViewerPreferences(array('Duplex' => 'DuplexFlipLongEdge')); - -// set booklet mode -$pdf->SetBooklet(true, 10, 30); - -// set core font -$pdf->SetFont('helvetica', '', 18); - -// add a page (left page) -$pdf->AddPage(); - -$pdf->Write(0, 'Example of booklet mode', '', 0, 'L', true, 0, false, false, 0); - -// print a line using Cell() -$pdf->Cell(0, 0, 'PAGE 1', 1, 1, 'C'); - - -// add a page (right page) -$pdf->AddPage(); - -// print a line using Cell() -$pdf->Cell(0, 0, 'PAGE 2', 1, 1, 'C'); - - -// add a page (left page) -$pdf->AddPage(); - -// print a line using Cell() -$pdf->Cell(0, 0, 'PAGE 3', 1, 1, 'C'); - -// add a page (right page) -$pdf->AddPage(); - -// print a line using Cell() -$pdf->Cell(0, 0, 'PAGE 4', 1, 1, 'C'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_040.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_041.php b/htdocs/includes/tcpdf/examples/example_041.php deleted file mode 100644 index d7aa3ab3cae..00000000000 --- a/htdocs/includes/tcpdf/examples/example_041.php +++ /dev/null @@ -1,90 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 041'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 041', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 16); - -// add a page -$pdf->AddPage(); - - -$txt = 'Example of File Attachment. -Double click on the icon to open the attached file.'; -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -// attach an external file -$pdf->Annotation(85, 27, 5, 5, 'text file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => '../cache/utf8test.txt')); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_041.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_042.php b/htdocs/includes/tcpdf/examples/example_042.php deleted file mode 100644 index 6dc4593e8cb..00000000000 --- a/htdocs/includes/tcpdf/examples/example_042.php +++ /dev/null @@ -1,102 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 042'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 042', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set JPEG quality -//$pdf->setJPEGQuality(75); - -$pdf->SetFont('helvetica', '', 18); - -// add a page -$pdf->AddPage(); - -// create background text -$background_text = str_repeat('TCPDF test PNG Alpha Channel ', 50); -$pdf->MultiCell(0, 5, $background_text, 0, 'J', 0, 2, '', '', true, 0, false); - -// --- Method (A) ------------------------------------------ -// the Image() method recognizes the alpha channel embedded on the image: - -$pdf->Image('../images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300); - -// --- Method (B) ------------------------------------------ -// provide image + separate 8-bit mask - -// first embed mask image (w, h, x and y will be ignored, the image will be scaled to the target image's size) -$mask = $pdf->Image('../images/alpha.png', 50, 140, 100, '', '', '', '', false, 300, '', true); - -// embed image, masked with previously embedded mask -$pdf->Image('../images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '', false, 300, '', false, $mask); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_042.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_043.php b/htdocs/includes/tcpdf/examples/example_043.php deleted file mode 100644 index ebea93bf659..00000000000 --- a/htdocs/includes/tcpdf/examples/example_043.php +++ /dev/null @@ -1,85 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 043'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 043', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 16); - -// add a page -$pdf->AddPage(); - -// Multicell test -$pdf->MultiCell(0, 0, 'DISK CACHING TEST: check the parameters of the class constructor.', 1, 'L', 0, 0, '', '', true); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_043.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_044.php b/htdocs/includes/tcpdf/examples/example_044.php deleted file mode 100644 index 5db2f4adf0e..00000000000 --- a/htdocs/includes/tcpdf/examples/example_044.php +++ /dev/null @@ -1,128 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 044'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 044', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 40); - -// print a line using Cell() -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: A', 0, 1, 'L'); - -// add some vertical space -$pdf->Ln(10); - -// print some text -$pdf->SetFont('times', 'I', 16); -$txt = 'TCPDF allows you to Copy, Move and Delete pages.'; -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -$pdf->SetFont('helvetica', 'B', 40); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: B', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: D', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: E', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: E-2', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: F', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: C', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: G', 0, 1, 'L'); - -// Move page 7 to page 3 -$pdf->movePage(7, 3); - -// Delete page 6 -$pdf->deletePage(6); - -$pdf->AddPage(); -$pdf->Cell(0, 10, 'PAGE: H', 0, 1, 'L'); - -// copy the second page -$pdf->copyPage(2); - -// NOTE: to insert a page to a previous position, you can add a new page to the end of document and then move it using movePage(). - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_044.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_045.php b/htdocs/includes/tcpdf/examples/example_045.php deleted file mode 100644 index d2b260aaafc..00000000000 --- a/htdocs/includes/tcpdf/examples/example_045.php +++ /dev/null @@ -1,130 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 045'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 045', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', 'B', 20); - -// add a page -$pdf->AddPage(); - -// set a bookmark for the current position -$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128)); - -// print a line using Cell() -$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,128,0)); -$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L'); - -// add some pages and bookmarks -for ($i = 2; $i < 12; $i++) { - $pdf->AddPage(); - $pdf->Bookmark('Chapter '.$i, 0, 0, '', 'B', array(0,64,128)); - $pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L'); -} - -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -// add a new page for TOC -$pdf->addTOCPage(); - -// write the TOC title -$pdf->SetFont('times', 'B', 16); -$pdf->MultiCell(0, 0, 'Table Of Content', 0, 'C', 0, 1, '', '', true, 0); -$pdf->Ln(); - -$pdf->SetFont('dejavusans', '', 12); - -// add a simple Table Of Content at first page -// (check the example n. 59 for the HTML version) -$pdf->addTOC(1, 'courier', '.', 'INDEX', 'B', array(128,0,0)); - -// end of TOC page -$pdf->endTOCPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_045.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_046.php b/htdocs/includes/tcpdf/examples/example_046.php deleted file mode 100644 index f7a29df2313..00000000000 --- a/htdocs/includes/tcpdf/examples/example_046.php +++ /dev/null @@ -1,123 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 046'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 046', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of Text Hyphenation', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(10); - -/* -Unicode Data for SHY: - Name : SOFT HYPHEN, commonly abbreviated as SHY - HTML Entity (decimal): ­ - HTML Entity (hex): ­ - HTML Entity (named): ­ - How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173] - UTF-8 (hex): 0xC2 0xAD (c2ad) -*/ - -/* -// You can autmatically add SOFT HYPHENS to your text using -// the hyphenateText() method, but this requires either an -// hyphenation pattern array of a hyphenation pattern TEX file. -// You can download hyphenation TEX patterns from: -// http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - -// EXAMPLE: - -$html = 'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.'; - -$hyphen_patterns = $pdf->getHyphenPatternsFromTEX('../hyphens/hyph-en-gb.tex'); - -$html = $pdf->hyphenateText($html, $hyphen_patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8); -*/ - - -// HTML text with soft hyphens (­) -$html = 'On the other hand, we de­nounce with righ­teous in­dig­na­tion and dis­like men who are so be­guiled and de­mo­r­al­ized by the charms of plea­sure of the mo­ment, so blind­ed by de­sire, that they can­not fore­see the pain and trou­ble that are bound to en­sue; and equal blame be­longs to those who fail in their du­ty through weak­ness of will, which is the same as say­ing through shrink­ing from toil and pain. Th­ese cas­es are per­fect­ly sim­ple and easy to distin­guish. In a free hour, when our pow­er of choice is un­tram­melled and when noth­ing pre­vents our be­ing able to do what we like best, ev­ery plea­sure is to be wel­comed and ev­ery pain avoid­ed. But in cer­tain cir­cum­s­tances and ow­ing to the claims of du­ty or the obli­ga­tions of busi­ness it will fre­quent­ly oc­cur that plea­sures have to be re­pu­di­at­ed and an­noy­ances ac­cept­ed. The wise man there­fore al­ways holds in th­ese mat­ters to this prin­ci­ple of se­lec­tion: he re­jects plea­sures to se­cure other greater plea­sures, or else he en­dures pains to avoid worse pains.'; - -$pdf->SetFont('times', '', 10); -$pdf->SetDrawColor(255,0,0); -$pdf->SetTextColor(0,63,127); - -// print a cell -$pdf->writeHTMLCell(50, 0, '', '', $html, 1, 1, 0, true, 'J'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_046.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_047.php b/htdocs/includes/tcpdf/examples/example_047.php deleted file mode 100644 index 538d769ee9f..00000000000 --- a/htdocs/includes/tcpdf/examples/example_047.php +++ /dev/null @@ -1,117 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 047'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 047', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 16); - -// add a page -$pdf->AddPage(); - -$txt = 'Example of Transactions. -TCPDF allows you to undo some operations using the Transactions. -Check the source code for further information.'; -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(5); - -$pdf->SetFont('times', '', 12); - -// start transaction -$pdf->startTransaction(); - -$pdf->Write(0, "LINE 1\n"); -$pdf->Write(0, "LINE 2\n"); - -// restarts transaction -$pdf->startTransaction(); - -$pdf->Write(0, "LINE 3\n"); -$pdf->Write(0, "LINE 4\n"); - -// rolls back to the last (re)start -$pdf = $pdf->rollbackTransaction(); - -$pdf->Write(0, "LINE 5\n"); -$pdf->Write(0, "LINE 6\n"); - -// start transaction -$pdf->startTransaction(); - -$pdf->Write(0, "LINE 7\n"); - -// commit transaction (actually just frees memory) -$pdf->commitTransaction(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_047.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_048.php b/htdocs/includes/tcpdf/examples/example_048.php deleted file mode 100644 index cd7cebf38f0..00000000000 --- a/htdocs/includes/tcpdf/examples/example_048.php +++ /dev/null @@ -1,313 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 048'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 048', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of HTML tables', '', 0, 'L', true, 0, false, false, 0); - -$pdf->SetFont('helvetica', '', 8); - -// ----------------------------------------------------------------------------- - -$tbl = << - - COL 1 - ROW 1
      COLSPAN 3 - COL 2 - ROW 1 - COL 3 - ROW 1 - - - COL 2 - ROW 2 - COLSPAN 2
      text line
      text line
      text line
      text line - COL 3 - ROW 2 - - - COL 3 - ROW 3 - - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -$tbl = << - - COL 1 - ROW 1
      COLSPAN 3
      text line
      text line
      text line
      text line
      text line
      text line - COL 2 - ROW 1 - COL 3 - ROW 1 - - - COL 2 - ROW 2 - COLSPAN 2
      text line
      text line
      text line
      text line - COL 3 - ROW 2 - - - COL 3 - ROW 3 - - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -$tbl = << - - COL 1 - ROW 1
      COLSPAN 3
      text line
      text line
      text line
      text line
      text line
      text line - COL 2 - ROW 1 - COL 3 - ROW 1 - - - COL 2 - ROW 2 - COLSPAN 2
      text line
      text line
      text line
      text line - COL 3 - ROW 2
      text line
      text line - - - COL 3 - ROW 3 - - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -$tbl = << - -Left column -Heading Column Span 5 -Heading Column Span 9 - - -Rowspan 2
      This is some text that fills the table cell. -span 2 -span 2 -2 rows -Colspan 8 - - -1a -2a -1b -2b -1 -2 -3 -4 -5 -6 -7 -8 - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -// Table with rowspans and THEAD -$tbl = << - - - A - XXXX - XXXX - XXXX - XXXX - XXXX - - - B - XXXX - XXXX - XXXX - XXXX - XXXX - - - - 1. - XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - XXXX - XXXX
      XXXX - - - 2. - XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - - - XXXX
      XXXX
      XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - - - RRRRRR
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - - - 3. - XXXX1
      XXXX - XXXX
      XXXX - XXXX
      XXXX - - - 4. - XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - XXXX
      XXXX - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -// NON-BREAKING TABLE (nobr="true") - -$tbl = << - - NON-BREAKING TABLE - - - 1-1 - 1-2 - 1-3 - - - 2-1 - 3-2 - 3-3 - - - 3-1 - 3-2 - 3-3 - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -// NON-BREAKING ROWS (nobr="true") - -$tbl = << - - NON-BREAKING ROWS - - - ROW 1
      COLUMN 1 - ROW 1
      COLUMN 2 - ROW 1
      COLUMN 3 - - - ROW 2
      COLUMN 1 - ROW 2
      COLUMN 2 - ROW 2
      COLUMN 3 - - - ROW 3
      COLUMN 1 - ROW 3
      COLUMN 2 - ROW 3
      COLUMN 3 - - -EOD; - -$pdf->writeHTML($tbl, true, false, false, false, ''); - -// ----------------------------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_048.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_049.php b/htdocs/includes/tcpdf/examples/example_049.php deleted file mode 100644 index 4f88515525a..00000000000 --- a/htdocs/includes/tcpdf/examples/example_049.php +++ /dev/null @@ -1,126 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 049'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 049', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -IMPORTANT: -If you are printing user-generated content, tcpdf tag can be unsafe. -You can disable this tag by setting to false the K_TCPDF_CALLS_IN_HTML -constant on TCPDF configuration file. - -For security reasons, the parameters for the 'params' attribute of TCPDF -tag must be prepared as an array and encoded with the -serializeTCPDFtagParameters() method (see the example below). - - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - -$html = '

      Test TCPDF Methods in HTML

      -

      IMPORTANT:

      -If you are printing user-generated content, tcpdf tag can be unsafe.
      -You can disable this tag by setting to false the K_TCPDF_CALLS_IN_HTML constant on TCPDF configuration file.
      -

      write1DBarcode method in HTML

      '; - -$params = $pdf->serializeTCPDFtagParameters(array('CODE 39', 'C39', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N')); -$html .= ''; - -$params = $pdf->serializeTCPDFtagParameters(array('CODE 128', 'C128', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N')); -$html .= ''; - -$html .= '

      Graphic Functions

      '; - -$params = $pdf->serializeTCPDFtagParameters(array(0)); -$html .= ''; - -$params = $pdf->serializeTCPDFtagParameters(array(50, 50, 40, 10, 'DF', array(), array(0,128,255))); -$html .= ''; - - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, 0); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_049.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_050.php b/htdocs/includes/tcpdf/examples/example_050.php deleted file mode 100644 index d2334ccbc86..00000000000 --- a/htdocs/includes/tcpdf/examples/example_050.php +++ /dev/null @@ -1,205 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 050'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 050', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file. - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// set style for barcode -$style = array( - 'border' => true, - 'vpadding' => 'auto', - 'hpadding' => 'auto', - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, //array(255,255,255) - 'module_width' => 1, // width of a single module in points - 'module_height' => 1 // height of a single module in points -); - -// write RAW 2D Barcode -$pdf->SetXY(30, 30); -$code = '111011101110111,010010001000010,010011001110010,010010000010010,010011101110010'; -$pdf->write2DBarcode($code, 'RAW', '', '', 30, 20, $style, 'N'); - -$pdf->SetXY(100, 30); -// write RAW2 2D Barcode -$code = '[111011101110111][010010001000010][010011001110010][010010000010010][010011101110010]'; -$pdf->write2DBarcode($code, 'RAW2', '', '', 30, 20, $style, 'N'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// set style for barcode -$style = array( - 'border' => 2, - 'vpadding' => 'auto', - 'hpadding' => 'auto', - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, //array(255,255,255) - 'module_width' => 1, // width of a single module in points - 'module_height' => 1 // height of a single module in points -); - -// QRCODE,L : QR-CODE Low error correction -$pdf->SetXY(30, 60); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,L', '', '', 50, 50, $style, 'N'); -$pdf->Text(30, 55, 'QRCODE L'); - -// QRCODE,M : QR-CODE Medium error correction -$pdf->SetXY(100, 60); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,M', '', '', 50, 50, $style, 'N'); -$pdf->Text(100, 55, 'QRCODE M'); - -// QRCODE,Q : QR-CODE Better error correction -$pdf->SetXY(30, 120); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,Q', '', '', 50, 50, $style, 'N'); -$pdf->Text(30, 115, 'QRCODE Q'); - - -// QRCODE,H : QR-CODE Best error correction -$pdf->SetXY(100, 120); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N'); -$pdf->Text(100, 115, 'QRCODE H'); - -// ------------------------------------------------------------------- -// PDF417 (ISO/IEC 15438:2006) - -/* - - The $type parameter can be simple 'PDF417' or 'PDF417' followed by a - number of comma-separated options: - - 'PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6' - - Possible options are: - - a = aspect ratio (width/height); - e = error correction level (0-8); - - Macro Control Block options: - - t = total number of macro segments; - s = macro segment index (0-99998); - f = file ID; - o0 = File Name (text); - o1 = Segment Count (numeric); - o2 = Time Stamp (numeric); - o3 = Sender (text); - o4 = Addressee (text); - o5 = File Size (numeric); - o6 = Checksum (numeric). - - Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. - To use a comma character ',' on text options, replace it with the character 255: "\xff". - -*/ - -$pdf->SetXY(30, 180); -$pdf->write2DBarcode('www.tcpdf.org', 'PDF417', '', '', 0, 30, $style, 'N'); -$pdf->Text(30, 175, 'PDF417 (ISO/IEC 15438:2006)'); - -// ------------------------------------------------------------------- -// new style -$style = array( - 'border' => 2, - 'padding' => 'auto', - 'fgcolor' => array(0,0,255), - 'bgcolor' => array(255,255,64) -); - -// QRCODE,H : QR-CODE Best error correction -$pdf->SetXY(30, 220); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N'); -$pdf->Text(30, 215, 'QRCODE H - COLORED'); - -// new style -$style = array( - 'border' => false, - 'padding' => 0, - 'fgcolor' => array(128,0,0), - 'bgcolor' => false -); - -// QRCODE,H : QR-CODE Best error correction -$pdf->SetXY(100, 220); -$pdf->write2DBarcode('www.tcpdf.org', 'QRCODE,H', '', '', 50, 50, $style, 'N'); -$pdf->Text(100, 215, 'QRCODE H - NO PADDING'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_050.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_051.php b/htdocs/includes/tcpdf/examples/example_051.php deleted file mode 100644 index ed9f19da009..00000000000 --- a/htdocs/includes/tcpdf/examples/example_051.php +++ /dev/null @@ -1,145 +0,0 @@ -getBreakMargin(); - // get current auto-page-break mode - $auto_page_break = $this->AutoPageBreak; - // disable auto-page-break - $this->SetAutoPageBreak(false, 0); - // set bacground image - $img_file = K_PATH_IMAGES.'image_demo.jpg'; - $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0); - // restore auto-page-break status - $this->SetAutoPageBreak($auto_page_break, $bMargin); - // set the starting point for the page content - $this->setPageMark(); - } -} - -// create new PDF document -$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 051'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(0); -$pdf->SetFooterMargin(0); - -// remove default footer -$pdf->setPrintFooter(false); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 48); - -// add a page -$pdf->AddPage(); - -// Print a text -$html = ' PAGE 1  -

      You can set a full page background.

      '; -$pdf->writeHTML($html, true, false, true, false, ''); - - -// add a page -$pdf->AddPage(); - -// Print a text -$html = ' PAGE 2 '; -$pdf->writeHTML($html, true, false, true, false, ''); - -// --- example with background set on page --- - -// remove default header -$pdf->setPrintHeader(false); - -// add a page -$pdf->AddPage(); - - -// -- set new background --- - -// get the current page break margin -$bMargin = $pdf->getBreakMargin(); -// get current auto-page-break mode -$auto_page_break = $pdf->getAutoPageBreak(); -// disable auto-page-break -$pdf->SetAutoPageBreak(false, 0); -// set bacground image -$img_file = K_PATH_IMAGES.'image_demo.jpg'; -$pdf->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0); -// restore auto-page-break status -$pdf->SetAutoPageBreak($auto_page_break, $bMargin); -// set the starting point for the page content -$pdf->setPageMark(); - - -// Print a text -$html = 'PAGE 3'; -$pdf->writeHTML($html, true, false, true, false, ''); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_051.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_052.php b/htdocs/includes/tcpdf/examples/example_052.php deleted file mode 100644 index 0e2d80551fa..00000000000 --- a/htdocs/includes/tcpdf/examples/example_052.php +++ /dev/null @@ -1,115 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 052'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 052', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -/* -NOTES: - - To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt - - To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 - - To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes -*/ - -// set certificate file -$certificate = 'file://../tcpdf.crt'; - -// set additional information -$info = array( - 'Name' => 'TCPDF', - 'Location' => 'Office', - 'Reason' => 'Testing TCPDF', - 'ContactInfo' => 'http://www.tcpdf.org', - ); - -// set document signature -$pdf->setSignature($certificate, $certificate, 'tcpdfdemo', '', 2, $info); - -// set font -$pdf->SetFont('helvetica', '', 12); - -// add a page -$pdf->AddPage(); - -// print a line of text -$text = 'This is a digitally signed document using the default (example) tcpdf.crt certificate.
      To validate this signature you have to load the tcpdf.fdf on the Arobat Reader to add the certificate to List of Trusted Identities.

      For more information check the source code of this example and the source code documentation for the setSignature() method.

      www.tcpdf.org'; -$pdf->writeHTML($text, true, 0, true, 0); - - -// *** set signature appearance *** - -// create content for signature (image and/or text) -$pdf->Image($file='../images/tcpdf_signature.png', $x=180, $y=60, $w=15, $h=15, $type='PNG'); -// define active area for signature appearance -$pdf->setSignatureAppearance($x=180, $y=60, $w=15, $h=15); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_052.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_053.php b/htdocs/includes/tcpdf/examples/example_053.php deleted file mode 100644 index 4d79855db89..00000000000 --- a/htdocs/includes/tcpdf/examples/example_053.php +++ /dev/null @@ -1,108 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 053'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 053', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('times', '', 14); - -// add a page -$pdf->AddPage(); - -// print a some of text -$text = 'This is an example of JavaScript usage on PDF documents.

      For more information check the source code of this example, the source code documentation for the IncludeJS() method and the JavaScript for Acrobat API Reference guide.

      www.tcpdf.org'; -$pdf->writeHTML($text, true, 0, true, 0); - -// write some JavaScript code -$js = <<IncludeJS($js); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_053.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_054.php b/htdocs/includes/tcpdf/examples/example_054.php deleted file mode 100644 index 8851f5fb818..00000000000 --- a/htdocs/includes/tcpdf/examples/example_054.php +++ /dev/null @@ -1,128 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 054'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 054', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// IMPORTANT: disable font subsetting to allow users editing the document -$pdf->setFontSubsetting(false); - -// set font -$pdf->SetFont('helvetica', '', 10, '', false); - -// add a page -$pdf->AddPage(); - -// create some HTML content -$html = <<XHTML Form Example -
      -
      -

      -

      -

      -
      -
      -

      - -

      - -


      -
      -
      -


      - - - - -
      -
      -EOD; - -// output the HTML content -$pdf->writeHTML($html, true, 0, true, 0); - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_054.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_055.php b/htdocs/includes/tcpdf/examples/example_055.php deleted file mode 100644 index e18462a1d32..00000000000 --- a/htdocs/includes/tcpdf/examples/example_055.php +++ /dev/null @@ -1,115 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 055'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 055', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 14); - -// array of font names -$core_fonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats'); - -// set fill color -$pdf->SetFillColor(221,238,255); - -// create one HTML table for each core font -foreach($core_fonts as $font) { - // add a page - $pdf->AddPage(); - - // Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') - - // set font for title - $pdf->SetFont('helvetica', 'B', 16); - - // print font name - $pdf->Cell(0, 10, 'FONT: '.$font, 1, 1, 'C', true, '', 0, false, 'T', 'M'); - - // set font for chars - $pdf->SetFont($font, '', 16); - - // print each character - for ($i = 0; $i < 256; ++$i) { - if (($i > 0) AND (($i % 16) == 0)) { - $pdf->Ln(); - } - $pdf->Cell(11.25, 11.25, $pdf->unichr($i), 1, 0, 'C', false, '', 0, false, 'T', 'M'); - } - - $pdf->Ln(20); - - // print a pangram - $pdf->Cell(0, 0, 'The quick brown fox jumps over the lazy dog', 0, 1, 'C', false, '', 0, false, 'T', 'M'); -} - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_055.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_056.php b/htdocs/includes/tcpdf/examples/example_056.php deleted file mode 100644 index 0cbc9a923e7..00000000000 --- a/htdocs/includes/tcpdf/examples/example_056.php +++ /dev/null @@ -1,117 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 056'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 056', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of Crop Marks and Color Registration Bars', '', 0, 'L', true, 0, false, false, 0); - -$pdf->Ln(5); - -// color registration bars - -$pdf->colorRegistrationBar($x=50, $y=70, $w=40, $h=40, $transition=true, $vertical=false, $colors='A,R,G,B,C,M,Y,K'); -$pdf->colorRegistrationBar($x=90, $y=70, $w=40, $h=40, $transition=true, $vertical=true, $colors='A,R,G,B,C,M,Y,K'); -$pdf->colorRegistrationBar($x=50, $y=115, $w=80, $h=5, $transition=false, $vertical=true, $colors='A,W,R,G,B,C,M,Y,K'); -$pdf->colorRegistrationBar($x=135, $y=70, $w=5, $h=50, $transition=false, $vertical=false, $colors='A,W,R,G,B,C,M,Y,K'); - -// corner crop marks - -$pdf->cropMark($x=50, $y=70, $w=10, $h=10, $type='A', $color=array(0,0,0)); -$pdf->cropMark($x=140, $y=70, $w=10, $h=10, $type='B', $color=array(0,0,0)); -$pdf->cropMark($x=50, $y=120, $w=10, $h=10, $type='C', $color=array(0,0,0)); -$pdf->cropMark($x=140, $y=120, $w=10, $h=10, $type='D', $color=array(0,0,0)); - -// various crop marks - -$pdf->cropMark($x=95, $y=65, $w=5, $h=5, $type='A,B', $color=array(255,0,0)); -$pdf->cropMark($x=95, $y=125, $w=5, $h=5, $type='C,D', $color=array(255,0,0)); - -$pdf->cropMark($x=45, $y=95, $w=5, $h=5, $type='A,C', $color=array(0,255,0)); -$pdf->cropMark($x=145, $y=95, $w=5, $h=5, $type='B,D', $color=array(0,255,0)); - -$pdf->cropMark($x=95, $y=140, $w=5, $h=5, $type='A,D', $color=array(0,0,255)); - -// registration marks - -$pdf->registrationMark($x=40, $y=60, $r=5, $double=false, $cola=array(0,0,0), $colb=array(255,255,255)); -$pdf->registrationMark($x=150, $y=60, $r=5, $double=true, $cola=array(0,0,0), $colb=array(255,255,0)); -$pdf->registrationMark($x=40, $y=130, $r=5, $double=true, $cola=array(0,0,0), $colb=array(255,255,0)); -$pdf->registrationMark($x=150, $y=130, $r=5, $double=false, $cola=array(0,0,0), $colb=array(255,255,255)); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_056.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_057.php b/htdocs/includes/tcpdf/examples/example_057.php deleted file mode 100644 index 57016e71c97..00000000000 --- a/htdocs/includes/tcpdf/examples/example_057.php +++ /dev/null @@ -1,268 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 057'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 057', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of alignment options for Cell()', '', 0, 'L', true, 0, false, false, 0); - -$pdf->SetFont('helvetica', '', 11); - -// set border width -$pdf->SetLineWidth(0.7); - -// set color for cell border -$pdf->SetDrawColor(0,128,255); - -$pdf->setCellHeightRatio(3); - -$pdf->SetXY(15, 60); - -// text on center -$pdf->Cell(30, 0, 'Top-Center', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'C'); -$pdf->Cell(30, 0, 'Center-Center', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'C'); -$pdf->Cell(30, 0, 'Bottom-Center', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'C'); -$pdf->Cell(30, 0, 'Ascent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'C'); -$pdf->Cell(30, 0, 'Baseline-Center', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'C'); -$pdf->Cell(30, 0, 'Descent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'C'); - - -$pdf->SetXY(15, 90); - -// text on top -$pdf->Cell(30, 0, 'Top-Top', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'T'); -$pdf->Cell(30, 0, 'Center-Top', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'T'); -$pdf->Cell(30, 0, 'Bottom-Top', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'T'); -$pdf->Cell(30, 0, 'Ascent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'T'); -$pdf->Cell(30, 0, 'Baseline-Top', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'T'); -$pdf->Cell(30, 0, 'Descent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'T'); - - -$pdf->SetXY(15, 120); - -// text on bottom -$pdf->Cell(30, 0, 'Top-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'B'); -$pdf->Cell(30, 0, 'Center-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'B'); -$pdf->Cell(30, 0, 'Bottom-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'B'); -$pdf->Cell(30, 0, 'Ascent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'B'); -$pdf->Cell(30, 0, 'Baseline-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'B'); -$pdf->Cell(30, 0, 'Descent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'B'); - - -// draw some reference lines -$linestyle = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 0, 'color' => array(255, 0, 0)); -$pdf->Line(15, 60, 195, 60, $linestyle); -$pdf->Line(15, 90, 195, 90, $linestyle); -$pdf->Line(15, 120, 195, 120, $linestyle); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Print an image to explain cell measures - -$pdf->Image('../images/tcpdf_cell.png', 15, 160, 100, 100, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); -$legend = 'LEGEND: - -X: cell x top-left origin (top-right for RTL) -Y: cell y top-left origin (top-right for RTL) -CW: cell width -CH: cell height -LW: line width -NRL: normal line position -EXT: external line position -INT: internal line position -ML: margin left -MR: margin right -MT: margin top -MB: margin bottom -PL: padding left -PR: padding right -PT: padding top -PB: padding bottom -TW: text width -FA: font ascent -FB: font baseline -FD: font descent'; -$pdf->SetFont('helvetica', '', 10); -$pdf->setCellHeightRatio(1.25); -$pdf->MultiCell(0, 0, $legend, 0, 'L', false, 1, 125, 160, true, 0, false, true, 0, 'T', false); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// CELL BORDERS - -// add a page -$pdf->AddPage(); - -$pdf->SetFont('helvetica', 'B', 20); - -$pdf->Write(0, 'Example of borders for Cell()', '', 0, 'L', true, 0, false, false, 0); - -$pdf->SetFont('helvetica', '', 11); - -// set border width -$pdf->SetLineWidth(0.508); - -// set color for cell border -$pdf->SetDrawColor(0,128,255); - -// set filling color -$pdf->SetFillColor(255,255,128); - -// set cell height ratio -$pdf->setCellHeightRatio(3); - -$pdf->Cell(30, 0, '1', 1, 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LTRB', 'LTRB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LTR', 'LTR', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'TRB', 'TRB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LRB', 'LRB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LTB', 'LTB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LT', 'LT', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'TR', 'TR', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'RB', 'RB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LB', 'LB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'LR', 'LR', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'TB', 'TB', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'L', 'L', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'T', 'T', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'R', 'R', 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(2); -$pdf->Cell(30, 0, 'B', 'B', 1, 'C', 1, '', 0, false, 'T', 'C'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// ADVANCED SETTINGS FOR CELL BORDERS - -// add a page -$pdf->AddPage(); - -$pdf->SetFont('helvetica', 'B', 20); - -$pdf->Write(0, 'Example of advanced border settings for Cell()', '', 0, 'L', true, 0, false, false, 0); - -$pdf->SetFont('helvetica', '', 11); - -// set border width -$pdf->SetLineWidth(1); - -// set color for cell border -$pdf->SetDrawColor(0,128,255); - -// set filling color -$pdf->SetFillColor(255,255,128); - -$border = array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0))); -$pdf->Cell(30, 0, 'LTRB', $border, 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(5); - -$border = array( -'L' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)), -'R' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 255)), -'T' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 255, 0)), -'B' => array('width' => 2, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 255))); -$pdf->Cell(30, 0, 'LTRB', $border, 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(5); - -$border = array('mode' => 'ext', 'LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0))); -$pdf->Cell(30, 0, 'LTRB EXT', $border, 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(5); - -$border = array('mode' => 'int', 'LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0))); -$pdf->Cell(30, 0, 'LTRB INT', $border, 1, 'C', 1, '', 0, false, 'T', 'C'); -$pdf->Ln(5); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_057.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_058.php b/htdocs/includes/tcpdf/examples/example_058.php deleted file mode 100644 index 800c5be5312..00000000000 --- a/htdocs/includes/tcpdf/examples/example_058.php +++ /dev/null @@ -1,94 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 058'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 058', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - -// NOTE: Uncomment the following line to rasterize SVG image using the ImageMagick library. -//$pdf->setRasterizeVectorImages(true); - -$pdf->ImageSVG($file='../images/testsvg.svg', $x=15, $y=30, $w='', $h='', $link='http://www.tcpdf.org', $align='', $palign='', $border=1, $fitonpage=false); - -$pdf->ImageSVG($file='../images/tux.svg', $x=30, $y=100, $w='', $h=100, $link='', $align='', $palign='', $border=0, $fitonpage=false); - -$pdf->SetFont('helvetica', '', 8); -$pdf->SetY(195); -$txt = '© The copyright holder of the above Tux image is Larry Ewing, allows anyone to use it for any purpose, provided that the copyright holder is properly attributed. Redistribution, derivative work, commercial use, and all other use is permitted.'; -$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_058.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_059.php b/htdocs/includes/tcpdf/examples/example_059.php deleted file mode 100644 index 35535042306..00000000000 --- a/htdocs/includes/tcpdf/examples/example_059.php +++ /dev/null @@ -1,190 +0,0 @@ -tocpage) { - // *** replace the following parent::Header() with your code for TOC page - parent::Header(); - } else { - // *** replace the following parent::Header() with your code for normal pages - parent::Header(); - } - } - - /** - * Overwrite Footer() method. - * @public - */ - public function Footer() { - if ($this->tocpage) { - // *** replace the following parent::Footer() with your code for TOC page - parent::Footer(); - } else { - // *** replace the following parent::Footer() with your code for normal pages - parent::Footer(); - } - } - -} // end of class - -// create new PDF document -$pdf = new TOC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); - -// set document information -$pdf->SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 059'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 059', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// set font -$pdf->SetFont('helvetica', '', 10); - -// --------------------------------------------------------- - -// create some content ... - -// add a page -$pdf->AddPage(); - -// set a bookmark for the current position -$pdf->Bookmark('Chapter 1', 0, 0, '', 'B', array(0,64,128)); - -// print a line using Cell() -$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.1', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.2', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0, '', 'I', array(0,128,0)); -$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L'); - -$pdf->AddPage(); -$pdf->Bookmark('Paragraph 1.3', 1, 0, '', '', array(128,0,0)); -$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L'); - -// add some pages and bookmarks -for ($i = 2; $i < 12; $i++) { - $pdf->AddPage(); - $pdf->Bookmark('Chapter '.$i, 0, 0, '', 'B', array(0,64,128)); - $pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L'); -} - - -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - - -// add a new page for TOC -$pdf->addTOCPage(); - -// write the TOC title and/or other elements on the TOC page -$pdf->SetFont('times', 'B', 16); -$pdf->MultiCell(0, 0, 'Table Of Content', 0, 'C', 0, 1, '', '', true, 0); -$pdf->Ln(); -$pdf->SetFont('helvetica', '', 10); - -// define styles for various bookmark levels -$bookmark_templates = array(); - -/* - * The key of the $bookmark_templates array represent the bookmark level (from 0 to n). - * The following templates will be replaced with proper content: - * #TOC_DESCRIPTION# this will be replaced with the bookmark description; - * #TOC_PAGE_NUMBER# this will be replaced with page number. - * - * NOTES: - * If you want to align the page number on the right you have to use a monospaced font like courier, otherwise you can left align using any font type. - * The following is just an example, you can get various styles by combining various HTML elements. - */ - -// A monospaced font for the page number is mandatory to get the right alignment -$bookmark_templates[0] = '
      #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
      '; -$bookmark_templates[1] = '
       #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
      '; -$bookmark_templates[2] = '
       #TOC_DESCRIPTION##TOC_PAGE_NUMBER#
      '; -// add other bookmark level templates here ... - -// add table of content at page 1 -// (check the example n. 45 for a text-only TOC -$pdf->addHTMLTOC(1, 'INDEX', $bookmark_templates, true, 'B', array(128,0,0)); - -// end of TOC page -$pdf->endTOCPage(); - -// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_059.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_060.php b/htdocs/includes/tcpdf/examples/example_060.php deleted file mode 100644 index 90a637e7e24..00000000000 --- a/htdocs/includes/tcpdf/examples/example_060.php +++ /dev/null @@ -1,108 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 060'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 060', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// set font -$pdf->SetFont('helvetica', '', 20); - -// --------------------------------------------------------- - -// set page format (read source code documentation for further information) -$page_format = array( - 'MediaBox' => array ('llx' => 0, 'lly' => 0, 'urx' => 210, 'ury' => 297), - 'CropBox' => array ('llx' => 0, 'lly' => 0, 'urx' => 210, 'ury' => 297), - 'BleedBox' => array ('llx' => 5, 'lly' => 5, 'urx' => 205, 'ury' => 292), - 'TrimBox' => array ('llx' => 10, 'lly' => 10, 'urx' => 200, 'ury' => 287), - 'ArtBox' => array ('llx' => 15, 'lly' => 15, 'urx' => 195, 'ury' => 282), - 'Dur' => 3, - 'trans' => array( - 'D' => 1.5, - 'S' => 'Split', - 'Dm' => 'V', - 'M' => 'O' - ), - 'Rotate' => 90, - 'PZ' => 1, -); - -// Check the example n. 29 for viewer preferences - -// add first page --- -$pdf->AddPage('P', $page_format, false, false); -$pdf->Cell(0, 12, 'First Page', 1, 1, 'C'); - -// add second page --- -$page_format['Rotate'] = 270; -$pdf->AddPage('P', $page_format, false, false); -$pdf->Cell(0, 12, 'Second Page', 1, 1, 'C'); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_060.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_061.php b/htdocs/includes/tcpdf/examples/example_061.php deleted file mode 100644 index 04f7e9c1c8a..00000000000 --- a/htdocs/includes/tcpdf/examples/example_061.php +++ /dev/null @@ -1,273 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 061'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 061', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 10); - -// add a page -$pdf->AddPage(); - -/* NOTE: - * ********************************************************* - * You can load external XHTML using : - * - * $html = file_get_contents('/path/to/your/file.html'); - * - * External CSS files will be automatically loaded. - * Sometimes you need to fix the path of the external CSS. - * ********************************************************* - */ - -// define some HTML content with style -$html = << - - -

      Example of XHTML + CSS

      - -

      Example of paragraph with class selector. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.

      - -

      Example of paragraph with ID selector. Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.

      - -
      example of DIV with border and fill.
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus.
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      No.XXXXXXXX XXXXXXXXXXXX
      1.XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXXXXXX
      XXXX
      2.XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      3.XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      4.XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      XXXX
      -EOF; - -// output the HTML content -$pdf->writeHTML($html, true, false, true, false, ''); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// ******************************************************************* -// HTML TIPS & TRICKS -// ******************************************************************* - -// REMOVE CELL PADDING -// -// $pdf->SetCellPadding(0); -// -// This is used to remove any additional vertical space inside a -// single cell of text. - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// REMOVE TAG TOP AND BOTTOM MARGINS -// -// $tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n' => 0))); -// $pdf->setHtmlVSpace($tagvs); -// -// Since the CSS margin command is not yet implemented on TCPDF, you -// need to set the spacing of block tags using the following method. - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// SET LINE HEIGHT -// -// $pdf->setCellHeightRatio(1.25); -// -// You can use the following method to fine tune the line height -// (the number is a percentage relative to font height). - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// CHANGE THE PIXEL CONVERSION RATIO -// -// $pdf->setImageScale(0.47); -// -// This is used to adjust the conversion ratio between pixels and -// document units. Increase the value to get smaller objects. -// Since you are using pixel unit, this method is important to set the -// right zoom factor. -// -// Suppose that you want to print a web page larger 1024 pixels to -// fill all the available page width. -// An A4 page is larger 210mm equivalent to 8.268 inches, if you -// subtract 13mm (0.512") of margins for each side, the remaining -// space is 184mm (7.244 inches). -// The default resolution for a PDF document is 300 DPI (dots per -// inch), so you have 7.244 * 300 = 2173.2 dots (this is the maximum -// number of points you can print at 300 DPI for the given width). -// The conversion ratio is approximatively 1024 / 2173.2 = 0.47 px/dots -// If the web page is larger 1280 pixels, on the same A4 page the -// conversion ratio to use is 1280 / 2173.2 = 0.59 pixels/dots - -// ******************************************************************* - -// reset pointer to the last page -$pdf->lastPage(); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_061.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_062.php b/htdocs/includes/tcpdf/examples/example_062.php deleted file mode 100644 index f5112655eaf..00000000000 --- a/htdocs/includes/tcpdf/examples/example_062.php +++ /dev/null @@ -1,136 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 062'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 062', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 20); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'XObject Templates', '', 0, 'C', 1, 0, false, false, 0); - -/* - * An XObject Template is a PDF block that is a self-contained - * description of any sequence of graphics objects (including path - * objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on - * several pages or at several locations on the same page and produces - * the same results each time, subject only to the graphics state at - * the time it is invoked. - */ - -// start a new XObject Template -$template_id = $pdf->startTemplate(60, 60); - - -// create Template content -// ................................................................... -//Start Graphic Transformation -$pdf->StartTransform(); - -// set clipping mask -$pdf->StarPolygon(30, 30, 29, 10, 3, 0, 1, 'CNZ'); - -// draw jpeg image to be clipped -$pdf->Image('../images/image_demo.jpg', 0, 0, 60, 60, '', '', '', true, 72, '', false, false, 0, false, false, false); - -//Stop Graphic Transformation -$pdf->StopTransform(); - -$pdf->SetXY(0, 0); - -$pdf->SetFont('times', '', 40); - -$pdf->SetTextColor(255, 0, 0); - -// print a text -$pdf->Cell(60, 60, 'Template', 0, 0, 'C', false, '', 0, false, 'T', 'M'); -// ................................................................... - - -// end the current Template -$pdf->endTemplate(); - -// print the selected Template various times - -$pdf->printTemplate($template_id, 15, 50, 20, 20, '', '', false); - -$pdf->printTemplate($template_id, 27, 62, 40, 40, '', '', false); - -$pdf->printTemplate($template_id, 55, 85, 60, 60, '', '', false); - -$pdf->printTemplate($template_id, 95, 125, 80, 80, '', '', false); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_062.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_063.php b/htdocs/includes/tcpdf/examples/example_063.php deleted file mode 100644 index 74cfc11cbf1..00000000000 --- a/htdocs/includes/tcpdf/examples/example_063.php +++ /dev/null @@ -1,131 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 063'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 063', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', 'B', 16); - -// add a page -$pdf->AddPage(); - -$pdf->Write(0, 'Example of Text Stretching and Spacing (tracking/kerning)', '', 0, 'L', true, 0, false, false, 0); -$pdf->Ln(5); - -// create several cells to display all cases of stretching and kerning combinations. - -$fonts = array('times', 'dejavuserif'); -$alignments = array('L' => 'LEFT', 'C' => 'CENTER', 'R' => 'RIGHT', 'J' => 'JUSTIFY'); - - -// Test all cases using direct stretching/spacing methods -foreach ($fonts as $fkey => $font) { - $pdf->SetFont($font, '', 14); - foreach ($alignments as $align_mode => $align_name) { - for ($stretching = 90; $stretching <= 110; $stretching += 10) { - for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) { - $pdf->setFontStretching($stretching); - $pdf->setFontSpacing($spacing); - $txt = $align_name.' | Stretching = '.$stretching.'% | Spacing = '.sprintf('%+.3F', $spacing).'mm'; - $pdf->Cell(0, 0, $txt, 1, 1, $align_mode); - } - } - } - $pdf->AddPage(); -} - - -// Test all cases using CSS stretching/spacing properties -foreach ($fonts as $fkey => $font) { - $pdf->SetFont($font, '', 11); - foreach ($alignments as $align_mode => $align_name) { - for ($stretching = 90; $stretching <= 110; $stretching += 10) { - for ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) { - $html = ''.$align_name.' | Stretching = '.$stretching.'% | Spacing = '.sprintf('%+.3F', $spacing).'mm
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
      '; - $pdf->writeHTMLCell(0, 0, '', '', $html, 1, 1, false, true, $align_mode, false); - } - } - if (!(($fkey == 1) AND ($align_mode == 'J'))) { - $pdf->AddPage(); - } - } -} - - -// reset font stretching -$pdf->setFontStretching(100); - -// reset font spacing -$pdf->setFontSpacing(0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_063.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/example_064.php b/htdocs/includes/tcpdf/examples/example_064.php deleted file mode 100644 index 22887a5e9c2..00000000000 --- a/htdocs/includes/tcpdf/examples/example_064.php +++ /dev/null @@ -1,176 +0,0 @@ -SetCreator(PDF_CREATOR); -$pdf->SetAuthor('Nicola Asuni'); -$pdf->SetTitle('TCPDF Example 064'); -$pdf->SetSubject('TCPDF Tutorial'); -$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); - -// set default header data -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 064', PDF_HEADER_STRING); - -// set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - -// set default monospaced font -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); - -//set margins -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - -//set auto page breaks -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - -//set image scale factor -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - -//set some language-dependent strings -$pdf->setLanguageArray($l); - -// --------------------------------------------------------- - -// set font -$pdf->SetFont('helvetica', '', 8); - - -// define some html content for testing -$txt = '

      TEST PAGE REGIONS: A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment. You can set multiple regions for the same page. You can combine several adjacent regions to aproximate curved shapes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc. -Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa. -Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu. -Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra. -Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.

      '; - - -// add a page -$pdf->AddPage(); - -// print some graphic content -$pdf->Image('../images/image_demo.jpg', 155, 30, 40, 40, 'JPG', '', '', true); -$pdf->Image('../images/image_demo.jpg', 15, 230, 40, 40, 'JPG', '', '', true); - -// define some graphic styles -$styleA = array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0)); -$styleB = array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 3, 'color' => array(127, 127, 127)); -$pdf->SetFillColor(220, 255, 220); - -// write a trapezoid with some information about no-write page regions -$pdf->Polygon(array(15,90, 57,90, 67,140, 15,140), 'DF', array($styleB, $styleA, $styleB, $styleB)); -$pdf->SetXY(15, 90); -$pdf->Cell(42, 0, 'xt,yt', 0, 0, 'R', false, '', 0, false, 'T', 'T'); -$pdf->SetXY(15, 140); -$pdf->Cell(52, 0, 'xb,yb', 0, 0, 'R', false, '', 0, false, 'B', 'B'); -$pdf->SetXY(15, 115); -$pdf->Cell(40, 0, 'side', 0, 0, 'R', false, '', 0, false, 'B', 'B'); -$pdf->SetLineStyle(array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); -$pdf->Arrow(60, 115, 35, 115, 2, 5, 15); - -// write a trapezoid with some information about no-write page regions -$pdf->Polygon(array(145,130, 195,130, 195,180, 155,180), 'DF', array($styleB, $styleB, $styleB, $styleA)); -$pdf->SetXY(145, 130); -$pdf->Cell(42, 0, 'xt,yt', 0, 0, 'L', false, '', 0, false, 'T', 'T'); -$pdf->SetXY(155, 180); -$pdf->Cell(52, 0, 'xb,yb', 0, 0, 'L', false, '', 0, false, 'B', 'B'); -$pdf->SetXY(160, 155); -$pdf->Cell(30, 0, 'side', 0, 0, 'L', false, '', 0, false, 'B', 'B'); -$pdf->SetLineStyle(array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))); -$pdf->Arrow(155, 155, 180, 155, 2, 5, 15); - -// reset x,y position -$pdf->SetXY(15, 30); - - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// define no-write page regions to avoid text overlapping images -/* - 'page' => page number or empy for current page - 'xt' => X top - 'yt' => Y top - 'yb' => Y bottom - 'side' => page side ('L' = left or 'R' = right) -*/ -$regions = array( -array('page' => '', 'xt' => 153, 'yt' => 30, 'xb' => 153, 'yb' => 70, 'side' => 'R'), -array('page' => '', 'xt' => 60, 'yt' => 90, 'xb' => 70, 'yb' => 140, 'side' => 'L'), -array('page' => '', 'xt' => 143, 'yt' => 130, 'xb' => 153, 'yb' => 180, 'side' => 'R'), -array('page' => '', 'xt' => 58, 'yt' => 230, 'xb' => 58, 'yb' => 270, 'side' => 'L') -); - -// set page regions, check also getPageRegions(), addPageRegion() and removePageRegion() -$pdf->setPageRegions($regions); - -// write html text -$pdf->writeHTML($txt, true, false, true, false, ''); - - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// set a circular no-write region on the second page -$regions = array( -array('page' => 2, 'xt' => 195, 'yt' => 110, 'xb' => 179.693, 'yb' => 113.045, 'side' => 'R'), -array('page' => 2, 'xt' => 179.693, 'yt' => 113.045, 'xb' => 166.716, 'yb' => 121.716, 'side' => 'R'), -array('page' => 2, 'xt' => 166.716, 'yt' => 121.716, 'xb' => 158.045, 'yb' => 134.693, 'side' => 'R'), -array('page' => 2, 'xt' => 158.045, 'yt' => 134.693, 'xb' => 155, 'yb' => 150, 'side' => 'R'), -array('page' => 2, 'xt' => 155, 'yt' => 150, 'xb' => 158.045, 'yb' => 165.307, 'side' => 'R'), -array('page' => 2, 'xt' => 158.045, 'yt' => 165.307, 'xb' => 166.716, 'yb' => 178.284, 'side' => 'R'), -array('page' => 2, 'xt' => 166.716, 'yt' => 178.284, 'xb' => 179.693, 'yb' => 186.955, 'side' => 'R'), -array('page' => 2, 'xt' => 179.693, 'yt' => 186.955, 'xb' => 195, 'yb' => 190, 'side' => 'R') -); -$pdf->setPageRegions($regions); - -$pdf->Polygon(array(195,110, 179.693,113.045, 166.716,121.716, 158.045,134.693, 155,150, 158.045,165.307, 166.716,178.284, 179.693,186.955, 195,190), 'DF'); - -$pdf->Ln(15); - -// define some html content for testing -$txt = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc. Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa. Integer non sem eget neque mattis accumsan. Maecenas eu nisl mauris, sit amet interdum ipsum. In pharetra erat vel lectus venenatis elementum. Nulla non elit ligula, sit amet mollis urna. Morbi ut gravida est. Mauris tincidunt sem et turpis molestie malesuada. Curabitur vel nulla risus, sed mollis erat. Suspendisse vehicula accumsan purus nec varius. Donec fermentum lorem id felis sodales dictum. Quisque et dolor ipsum. Nam luctus consectetur dui vitae fermentum. Curabitur sodales consequat augue, id ultricies augue tempor ac. Aliquam ac magna id ipsum vehicula bibendum. Sed elementum congue tristique. Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu. Cras quam mi, ornare laoreet laoreet vel, vehicula at lacus. Maecenas a lacus accumsan augue convallis sagittis sed quis odio. Morbi sit amet turpis diam, dictum convallis urna. Cras eget interdum augue. Cras eu nisi sit amet dolor faucibus porttitor. Suspendisse potenti. Nunc vitae dolor risus, at cursus libero. Suspendisse bibendum tellus non nibh hendrerit tristique. Mauris eget orci elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta libero non ante laoreet semper. Proin volutpat sodales mi, ac fermentum erat sagittis in. Vivamus at viverra felis. Ut pretium facilisis ante et pharetra. Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque a nisl massa, quis pretium urna. Proin vel porttitor tortor. Cras rhoncus congue velit in bibendum. Donec pharetra semper augue id lacinia. Quisque magna quam, hendrerit eu aliquam et, pellentesque ut tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas nulla quam, rutrum eu feugiat at, elementum eu libero. Maecenas ullamcorper leo et turpis rutrum ac laoreet eros faucibus. Phasellus condimentum lorem quis neque imperdiet quis molestie enim iaculis. Phasellus risus est, vestibulum ut convallis ultrices, dignissim nec erat. Etiam congue lobortis laoreet. Nulla ut neque sed velit dapibus semper. Quisque nec dolor id nibh eleifend iaculis. Vivamus vitae fermentum odio. Etiam malesuada quam in nulla aliquam sed convallis dui feugiat.'."\n"; - -// write text -$pdf->MultiCell(0, 0, $txt, 0, 'J', false, 1, '', '', true, 0, false, true, 0, 'T', false); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_064.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/htdocs/includes/tcpdf/examples/index.php b/htdocs/includes/tcpdf/examples/index.php deleted file mode 100644 index 00a095d771c..00000000000 --- a/htdocs/includes/tcpdf/examples/index.php +++ /dev/null @@ -1,88 +0,0 @@ -'; -?> - - - - - -TCPDF Examples - - - - - - - - -

      TCPDF Examples

      - -
        -
      1. Simple PDF with default Header and Footer: [PDF]
      2. -
      3. Simple PDF without Header and Footer: [PDF]
      4. -
      5. Custom Header and Footer: [PDF]
      6. -
      7. Cell stretching: [PDF]
      8. -
      9. Multicell: [PDF]
      10. -
      11. WriteHTML and RTL support: [PDF]
      12. -
      13. Independent columns with WriteHTMLCell: [PDF]
      14. -
      15. External UTF-8 text file: [PDF]
      16. -
      17. Image: [PDF]
      18. -
      19. Multiple columns: [PDF]
      20. -
      21. Colored Tables: [PDF]
      22. -
      23. Graphic Functions: [PDF]
      24. -
      25. Graphic Transformations: [PDF]
      26. -
      27. Javascript and Forms: [PDF]
      28. -
      29. Bookmarks (Table of Content): [PDF]
      30. -
      31. Document Encryption: [PDF]
      32. -
      33. Independent columns with MultiCell: [PDF]
      34. -
      35. Persian and Arabic language on RTL document: [PDF]
      36. -
      37. Non unicode / Alternative config file: [PDF]
      38. -
      39. Multicell complex alignment: [PDF]
      40. -
      41. writeHTML alignment: [PDF]
      42. -
      43. CMYK colors: [PDF]
      44. -
      45. Page Groups: [PDF]
      46. -
      47. Object Visibility: [PDF]
      48. -
      49. Object Transparency: [PDF]
      50. -
      51. Text Rendering Modes and Text Clipping: [PDF]
      52. -
      53. Barcodes: [PDF]
      54. -
      55. Multiple page formats: [PDF]
      56. -
      57. Set PDF viewer display preferences: [PDF]
      58. -
      59. Colour gradients: [PDF]
      60. -
      61. Pie Chart Graphic: [PDF]
      62. -
      63. EPS/AI vectorial image: [PDF]
      64. -
      65. Mixed font types (TrueType Unicode, core, CID-0): [PDF]
      66. -
      67. Clipping masks: [PDF]
      68. -
      69. Line styles with cells and multicells: [PDF]
      70. -
      71. Text Annotations: [PDF]
      72. -
      73. Spot Colors: [PDF]
      74. -
      75. NON-embedded CID-0 CJK font: [PDF]
      76. -
      77. HTML Justification: [PDF]
      78. -
      79. Booklet (double-sided pages): [PDF]
      80. -
      81. File attachment: [PDF]
      82. -
      83. Image with Alpha Channel Transparency: [PDF]
      84. -
      85. Disk caching: [PDF]
      86. -
      87. Move, Copy and Delete page: [PDF]
      88. -
      89. Table Of Content with Bookmarks: [PDF]
      90. -
      91. Text hyphenation: [PDF]
      92. -
      93. Transactions and UNDO: [PDF]
      94. -
      95. Table header and rowspan: [PDF]
      96. -
      97. TCPDF methods in HTML: [PDF]
      98. -
      99. 2D Barcode (QR-Code AND PDF417): [PDF]
      100. -
      101. Full page background: [PDF]
      102. -
      103. Digital Signature Certification: [PDF]
      104. -
      105. Javascript functions: [PDF]
      106. -
      107. XHTML Form: [PDF]
      108. -
      109. Font Dump: [PDF]
      110. -
      111. Crop Marks and Registration Marks: [PDF]
      112. -
      113. Cell vertical alignments and borders: [PDF]
      114. -
      115. SVG Image: [PDF]
      116. -
      117. Table Of Content with HTML templates: [PDF]
      118. -
      119. Advanced page settings: [PDF]
      120. -
      121. XHTML + CSS: [PDF]
      122. -
      123. XObject Templates: [PDF]
      124. -
      125. Text stretching and spacing (tracking/kerning): [PDF]
      126. -
      127. No-write page regions: [PDF]
      128. -
      - - -