From aa638429ca065c871e02985eddd19eb458f7cf44 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 22 Jun 2026 16:35:03 +0530 Subject: [PATCH 1/7] =?UTF-8?q?Fixed:=C2=A0apply=20additional=20Rector=20P?= =?UTF-8?q?HP=208.1=E2=80=938.5=20compatibility=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Name --- admin/filemanager/include/php_image_magician.php | 10 ---------- admin/filemanager/include/utils.php | 1 - classes/ImageManager.php | 3 --- classes/Tag.php | 2 +- classes/Tools.php | 11 +++++------ .../webservice/WebserviceSpecificManagementImages.php | 2 -- composer.json | 2 +- .../classes/QdpDuitkuServiceRequest.php | 1 - .../classes/WkPaypalCommerceHelper.php | 7 ------- modules/qlopaypalcommerce/libs/Helpers/HttpHelper.php | 6 +++--- 10 files changed, 10 insertions(+), 35 deletions(-) diff --git a/admin/filemanager/include/php_image_magician.php b/admin/filemanager/include/php_image_magician.php index 0922a72364..f77685090e 100644 --- a/admin/filemanager/include/php_image_magician.php +++ b/admin/filemanager/include/php_image_magician.php @@ -1148,8 +1148,6 @@ private function gd_apply_overlay($im, $type, $amount) imagecopy($comp, $im, 0, 0, 0, 0, $width, $height); imagecopy($comp, $filter, 0, 0, 0, 0, $width, $height); imagecopymerge($im, $comp, 0, 0, 0, 0, $width, $height, $amount); - - imagedestroy($comp); return $im; } @@ -1261,9 +1259,6 @@ public function addReflection($reflectionHeight = 50, $startingTransparency = 30 } $this->imageResized = $final; - - imagedestroy($li); - imagedestroy($im); } @@ -1571,10 +1566,6 @@ public function addShadow($shadowAngle=45, $blur=15, $bgColor='transparent') imagesavealpha($rgb, true); $this->imageResized = $rgb; - - imagedestroy($image); - imagedestroy($newImage); - imagedestroy($shadow); } @@ -3320,7 +3311,6 @@ private function imagecreatefrompsd($fileName) public function __destruct() { if (is_resource($this->imageResized)) { - imagedestroy($this->imageResized); } } diff --git a/admin/filemanager/include/utils.php b/admin/filemanager/include/utils.php index b8c3295de0..8bba348782 100644 --- a/admin/filemanager/include/utils.php +++ b/admin/filemanager/include/utils.php @@ -352,7 +352,6 @@ function get_file_by_url($url) curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); - curl_close($ch); return $data; } diff --git a/classes/ImageManager.php b/classes/ImageManager.php index c811fdbcfb..d187c02cd3 100644 --- a/classes/ImageManager.php +++ b/classes/ImageManager.php @@ -285,7 +285,6 @@ public static function imagecopyresampled(&$dst_image, $src_image, $dst_x, $dst_ $temp = imagecreatetruecolor($dst_w * $quality + 1, $dst_h * $quality + 1); imagecopyresized($temp, $src_image, 0, 0, $src_x, $src_y, $dst_w * $quality + 1, $dst_h * $quality + 1, $src_w, $src_h); imagecopyresampled($dst_image, $temp, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w * $quality, $dst_h * $quality); - imagedestroy($temp); } else { imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); } @@ -321,7 +320,6 @@ public static function isRealImage($filename, $file_mime_type = null, $mime_type $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; $finfo = finfo_open($const); $mime_type = finfo_file($finfo, $filename); - finfo_close($finfo); } elseif (function_exists('mime_content_type')) { $mime_type = mime_content_type($filename); } elseif (function_exists('exec')) { @@ -542,7 +540,6 @@ public static function write($type, $resource, $filename) $success = imagejpeg($resource, $filename, (int)$quality); break; } - imagedestroy($resource); @chmod($filename, 0664); return $success; } diff --git a/classes/Tag.php b/classes/Tag.php index 92b0434e52..e9f7f12804 100644 --- a/classes/Tag.php +++ b/classes/Tag.php @@ -97,7 +97,7 @@ public static function addTags($id_lang, $id_product, $tag_list, $separator = ', } if (!is_array($tag_list)) { - $tag_list = array_filter(array_unique(array_map('trim', preg_split('#\\'.$separator.'#', $tag_list, null, PREG_SPLIT_NO_EMPTY)))); + $tag_list = array_filter(array_unique(array_map('trim', preg_split('#\\'.$separator.'#', $tag_list, 0, PREG_SPLIT_NO_EMPTY)))); } $list = array(); diff --git a/classes/Tools.php b/classes/Tools.php index 2ffec44341..fe499c28d1 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -224,7 +224,7 @@ public static function redirectLink($url) * * @param string $url Desired URL */ - public static function redirectAdmin($url) + public static function redirectAdmin($url): never { header('Location: '.$url); exit; @@ -1891,13 +1891,13 @@ public static function math_round($value, $places, $mode = PS_ROUND_HALF_UP) } $precision_places = 14 - floor(log10(abs($value))); - $f1 = pow(10.0, (double)abs($places)); + $f1 = pow(10.0, (float) abs($places)); /* If the decimal precision guaranteed by FP arithmetic is higher than * the requested places BUT is small enough to make sure a non-zero value * is returned, pre-round the result to the precision */ if ($precision_places > $places && $precision_places - $places < 15) { - $f2 = pow(10.0, (double)abs($precision_places)); + $f2 = pow(10.0, (float) abs($precision_places)); if ($precision_places >= 0) { $tmp_value = $value * $f2; @@ -1909,7 +1909,7 @@ public static function math_round($value, $places, $mode = PS_ROUND_HALF_UP) * thus never larger than 1e15 here) */ $tmp_value = Tools::round_helper($tmp_value, $mode); /* now correctly move the decimal point */ - $f2 = pow(10.0, (double)abs($places - $precision_places)); + $f2 = pow(10.0, (float) abs($places - $precision_places)); /* because places < precision_places */ $tmp_value = $tmp_value / $f2; } else { @@ -2091,7 +2091,6 @@ public static function file_get_contents($url, $use_include_path = false, $strea } } $content = curl_exec($curl); - curl_close($curl); return $content; } else { return false; @@ -2965,7 +2964,7 @@ public static function convertBytes($value) /** * @deprecated as of 1.5 use Controller::getController('PageNotFoundController')->run(); */ - public static function display404Error() + public static function display404Error(): never { header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); diff --git a/classes/webservice/WebserviceSpecificManagementImages.php b/classes/webservice/WebserviceSpecificManagementImages.php index 2a1cff79ca..6dc92a3b58 100644 --- a/classes/webservice/WebserviceSpecificManagementImages.php +++ b/classes/webservice/WebserviceSpecificManagementImages.php @@ -1051,7 +1051,6 @@ protected function writeImageOnDisk($base_path, $new_path, $dest_width = null, $ } break; } - imagedestroy($dest_image); if (!$imaged) { throw new WebserviceException(sprintf('Unable to write the image "%s".', str_replace(_PS_ROOT_DIR_, '[SHOP_ROOT_DIR]', $new_path)), array(70, 500)); } @@ -1104,7 +1103,6 @@ protected function writePostedImageOnDisk($reception_path, $dest_width = null, $ $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; $finfo = finfo_open($const); $mime_type = finfo_file($finfo, $file['tmp_name']); - finfo_close($finfo); } elseif (Tools::isCallable('mime_content_type')) { $mime_type = mime_content_type($file['tmp_name']); } elseif (Tools::isCallable('exec')) { diff --git a/composer.json b/composer.json index db48f1054c..6b8376dd64 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "source": "https://github.com/Qloapps/QloApps" }, "require": { - "php": ">8.0 <8.5", + "php": ">8.0 <8.6", "ext-curl": "*", "ext-dom": "*", "ext-gd": "*", diff --git a/modules/qloduitkupayment/classes/QdpDuitkuServiceRequest.php b/modules/qloduitkupayment/classes/QdpDuitkuServiceRequest.php index 4e9c94161a..19273074b1 100644 --- a/modules/qloduitkupayment/classes/QdpDuitkuServiceRequest.php +++ b/modules/qloduitkupayment/classes/QdpDuitkuServiceRequest.php @@ -58,7 +58,6 @@ public static function makeRequest($endpoint, $method, $data = []) curl_setopt_array($curl, $options); $request = curl_exec($curl); $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); - curl_close($curl); self::logResponse($request); $response = array(); diff --git a/modules/qlopaypalcommerce/classes/WkPaypalCommerceHelper.php b/modules/qlopaypalcommerce/classes/WkPaypalCommerceHelper.php index cc0ee01299..3e31838728 100644 --- a/modules/qlopaypalcommerce/classes/WkPaypalCommerceHelper.php +++ b/modules/qlopaypalcommerce/classes/WkPaypalCommerceHelper.php @@ -60,8 +60,6 @@ public static function getAccessToken() $response = curl_exec($curl); $err = curl_error($curl); - curl_close($curl); - if ($err) { throw new PrestaShopException(sprintf('cURL Error #: %s', $err)); } else { @@ -156,7 +154,6 @@ public static function createWebhookUrl($token) $response = curl_exec($curl); $err = curl_error($curl); - curl_close($curl); if ($err) { throw new PrestaShopException(sprintf('cURL Error #: %s', $err)); @@ -215,8 +212,6 @@ public static function deleteWebhookUrl() curl_exec($curl); $err = curl_error($curl); - curl_close($curl); - if ($err) { throw new PrestaShopException(sprintf('cURL Error #: %s', $err)); } @@ -255,8 +250,6 @@ public static function validateWebhookSig($postData) $response = curl_exec($curl); $err = curl_error($curl); - curl_close($curl); - if ($err) { throw new PrestaShopException(sprintf('cURL Error #: %s', $err)); } else { diff --git a/modules/qlopaypalcommerce/libs/Helpers/HttpHelper.php b/modules/qlopaypalcommerce/libs/Helpers/HttpHelper.php index f3c42b7ce8..b1b75eccb3 100644 --- a/modules/qlopaypalcommerce/libs/Helpers/HttpHelper.php +++ b/modules/qlopaypalcommerce/libs/Helpers/HttpHelper.php @@ -30,9 +30,9 @@ public function __construct() { $this->_initCurl(); } - public function __destruct() { - curl_close($this->_curl); - } + public function __destruct() + { + } private function _initCurl() { if(!function_exists('curl_version')) { From 0b2f9def2f91d9e9b9e0f932adb95865bb6ad47f Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 22 Jun 2026 18:53:32 +0530 Subject: [PATCH 2/7] Fixed: Update tcpdf lib --- tools/tcpdf/CHANGELOG.TXT | 76 +- tools/tcpdf/LICENSE.TXT | 12 +- tools/tcpdf/Makefile | 154 ++ tools/tcpdf/README.md | 170 +- tools/tcpdf/VERSION | 2 +- tools/tcpdf/composer.json | 75 + tools/tcpdf/config/tcpdf_config.php | 8 +- .../examples/barcodes/example_1d_html.php | 57 - .../examples/barcodes/example_1d_png.php | 56 - .../examples/barcodes/example_1d_svg.php | 57 - .../examples/barcodes/example_1d_svgi.php | 57 - .../barcodes/example_2d_datamatrix_html.php | 57 - .../barcodes/example_2d_datamatrix_png.php | 56 - .../barcodes/example_2d_datamatrix_svg.php | 57 - .../barcodes/example_2d_datamatrix_svgi.php | 57 - .../barcodes/example_2d_pdf417_html.php | 57 - .../barcodes/example_2d_pdf417_png.php | 56 - .../barcodes/example_2d_pdf417_svg.php | 57 - .../barcodes/example_2d_pdf417_svgi.php | 57 - .../barcodes/example_2d_qrcode_html.php | 56 - .../barcodes/example_2d_qrcode_png.php | 56 - .../barcodes/example_2d_qrcode_svg.php | 56 - .../barcodes/example_2d_qrcode_svgi.php | 56 - .../barcodes/tcpdf_barcodes_1d_include.php | 46 - .../barcodes/tcpdf_barcodes_2d_include.php | 46 - .../examples/config/tcpdf_config_alt.php | 230 --- tools/tcpdf/examples/data/cert/tcpdf.crt | 40 - tools/tcpdf/examples/data/cert/tcpdf.fdf | Bin 1286 -> 0 bytes tools/tcpdf/examples/data/cert/tcpdf.p12 | Bin 1749 -> 0 bytes tools/tcpdf/examples/data/chapter_demo_1.txt | 19 - tools/tcpdf/examples/data/chapter_demo_2.txt | 23 - tools/tcpdf/examples/data/table_data_demo.txt | 15 - tools/tcpdf/examples/data/utf8test.txt | 128 -- tools/tcpdf/examples/example_001.php | 110 -- tools/tcpdf/examples/example_002.php | 91 - tools/tcpdf/examples/example_003.php | 122 -- tools/tcpdf/examples/example_004.php | 123 -- tools/tcpdf/examples/example_005.php | 160 -- tools/tcpdf/examples/example_006.php | 347 ---- tools/tcpdf/examples/example_007.php | 117 -- tools/tcpdf/examples/example_008.php | 99 -- tools/tcpdf/examples/example_009.php | 148 -- tools/tcpdf/examples/example_010.php | 152 -- tools/tcpdf/examples/example_011.php | 141 -- tools/tcpdf/examples/example_012.pdf | Bin 13214 -> 0 bytes tools/tcpdf/examples/example_012.php | 207 --- tools/tcpdf/examples/example_013.php | 231 --- tools/tcpdf/examples/example_014.php | 197 --- tools/tcpdf/examples/example_015.php | 164 -- tools/tcpdf/examples/example_016.php | 136 -- tools/tcpdf/examples/example_017.php | 120 -- tools/tcpdf/examples/example_018.php | 130 -- tools/tcpdf/examples/example_019.php | 100 -- tools/tcpdf/examples/example_020.php | 149 -- tools/tcpdf/examples/example_021.php | 93 -- tools/tcpdf/examples/example_022.php | 148 -- tools/tcpdf/examples/example_023.php | 115 -- tools/tcpdf/examples/example_024.php | 142 -- tools/tcpdf/examples/example_025.php | 120 -- tools/tcpdf/examples/example_026.php | 146 -- tools/tcpdf/examples/example_027.php | 420 ----- tools/tcpdf/examples/example_028.php | 140 -- tools/tcpdf/examples/example_029.php | 126 -- tools/tcpdf/examples/example_030.php | 190 --- tools/tcpdf/examples/example_031.php | 105 -- tools/tcpdf/examples/example_032.php | 93 -- tools/tcpdf/examples/example_033.php | 107 -- tools/tcpdf/examples/example_034.php | 98 -- tools/tcpdf/examples/example_035.php | 113 -- tools/tcpdf/examples/example_036.php | 91 - tools/tcpdf/examples/example_037.php | 149 -- tools/tcpdf/examples/example_038.php | 94 -- tools/tcpdf/examples/example_039.php | 106 -- tools/tcpdf/examples/example_040.php | 118 -- tools/tcpdf/examples/example_041.php | 93 -- tools/tcpdf/examples/example_042.php | 104 -- tools/tcpdf/examples/example_043.php | 87 - tools/tcpdf/examples/example_044.php | 130 -- tools/tcpdf/examples/example_045.php | 143 -- tools/tcpdf/examples/example_046.php | 125 -- tools/tcpdf/examples/example_047.php | 119 -- tools/tcpdf/examples/example_048.php | 316 ---- tools/tcpdf/examples/example_049.php | 128 -- tools/tcpdf/examples/example_050.php | 212 --- tools/tcpdf/examples/example_051.php | 148 -- tools/tcpdf/examples/example_052.php | 123 -- tools/tcpdf/examples/example_053.php | 110 -- tools/tcpdf/examples/example_054.php | 131 -- tools/tcpdf/examples/example_055.php | 118 -- tools/tcpdf/examples/example_056.php | 135 -- tools/tcpdf/examples/example_057.php | 270 --- tools/tcpdf/examples/example_058.php | 97 -- tools/tcpdf/examples/example_059.php | 193 --- tools/tcpdf/examples/example_060.php | 110 -- tools/tcpdf/examples/example_061.php | 267 --- tools/tcpdf/examples/example_062.php | 142 -- tools/tcpdf/examples/example_063.php | 133 -- tools/tcpdf/examples/example_064.php | 178 -- tools/tcpdf/examples/example_065.php | 100 -- tools/tcpdf/examples/example_066.php | 88 - tools/tcpdf/examples/example_067.php | 223 --- tools/tcpdf/examples/images/_blank.png | Bin 137 -> 0 bytes tools/tcpdf/examples/images/alpha.png | Bin 23862 -> 0 bytes tools/tcpdf/examples/images/image_demo.jpg | Bin 573845 -> 0 bytes .../examples/images/image_with_alpha.png | Bin 243788 -> 0 bytes tools/tcpdf/examples/images/img.png | Bin 194711 -> 0 bytes tools/tcpdf/examples/images/logo_example.gif | Bin 21022 -> 0 bytes tools/tcpdf/examples/images/logo_example.jpg | Bin 32732 -> 0 bytes tools/tcpdf/examples/images/logo_example.png | Bin 17829 -> 0 bytes tools/tcpdf/examples/images/tcpdf_box.ai | 214 --- tools/tcpdf/examples/images/tcpdf_box.svg | 69 - tools/tcpdf/examples/images/tcpdf_cell.png | Bin 38367 -> 0 bytes tools/tcpdf/examples/images/tcpdf_logo.jpg | Bin 17633 -> 0 bytes .../tcpdf/examples/images/tcpdf_signature.png | Bin 67764 -> 0 bytes tools/tcpdf/examples/images/testsvg.svg | 328 ---- tools/tcpdf/examples/images/tux.svg | 1487 ----------------- tools/tcpdf/examples/index.php | 117 -- tools/tcpdf/examples/lang/afr.php | 44 - tools/tcpdf/examples/lang/ara.php | 44 - tools/tcpdf/examples/lang/aze.php | 44 - tools/tcpdf/examples/lang/bel.php | 44 - tools/tcpdf/examples/lang/bra.php | 44 - tools/tcpdf/examples/lang/bul.php | 44 - tools/tcpdf/examples/lang/cat.php | 44 - tools/tcpdf/examples/lang/ces.php | 44 - tools/tcpdf/examples/lang/chi.php | 44 - tools/tcpdf/examples/lang/cym.php | 44 - tools/tcpdf/examples/lang/dan.php | 44 - tools/tcpdf/examples/lang/eng.php | 44 - tools/tcpdf/examples/lang/est.php | 44 - tools/tcpdf/examples/lang/eus.php | 44 - tools/tcpdf/examples/lang/far.php | 44 - tools/tcpdf/examples/lang/fra.php | 44 - tools/tcpdf/examples/lang/ger.php | 44 - tools/tcpdf/examples/lang/gle.php | 44 - tools/tcpdf/examples/lang/glg.php | 44 - tools/tcpdf/examples/lang/hat.php | 44 - tools/tcpdf/examples/lang/heb.php | 44 - tools/tcpdf/examples/lang/hrv.php | 44 - tools/tcpdf/examples/lang/hun.php | 44 - tools/tcpdf/examples/lang/hye.php | 44 - tools/tcpdf/examples/lang/ind.php | 44 - tools/tcpdf/examples/lang/ita.php | 44 - tools/tcpdf/examples/lang/jpn.php | 44 - tools/tcpdf/examples/lang/kat.php | 44 - tools/tcpdf/examples/lang/kor.php | 44 - tools/tcpdf/examples/lang/mkd.php | 44 - tools/tcpdf/examples/lang/mlt.php | 44 - tools/tcpdf/examples/lang/msa.php | 44 - tools/tcpdf/examples/lang/nld.php | 44 - tools/tcpdf/examples/lang/nob.php | 44 - tools/tcpdf/examples/lang/pol.php | 44 - tools/tcpdf/examples/lang/por.php | 44 - tools/tcpdf/examples/lang/ron.php | 44 - tools/tcpdf/examples/lang/rus.php | 44 - tools/tcpdf/examples/lang/slv.php | 44 - tools/tcpdf/examples/lang/spa.php | 44 - tools/tcpdf/examples/lang/sqi.php | 44 - tools/tcpdf/examples/lang/srp.php | 44 - tools/tcpdf/examples/lang/swa.php | 44 - tools/tcpdf/examples/lang/swe.php | 44 - tools/tcpdf/examples/lang/ukr.php | 44 - tools/tcpdf/examples/lang/urd.php | 44 - tools/tcpdf/examples/lang/yid.php | 44 - tools/tcpdf/examples/lang/zho.php | 44 - tools/tcpdf/examples/tcpdf_include.php | 49 - tools/tcpdf/fonts/ae_fonts_2.0/README | 2 +- tools/tcpdf/fonts/freefont-20100919/COPYING | 8 +- tools/tcpdf/fonts/freefont-20100919/CREDITS | 2 +- tools/tcpdf/fonts/freefont-20120503/COPYING | 8 +- tools/tcpdf/fonts/freefont-20120503/CREDITS | 2 +- tools/tcpdf/fonts/freefont-20120503/README | 4 +- .../fonts/freefont-20120503/TROUBLESHOOTING | 2 +- tools/tcpdf/include/barcodes/datamatrix.php | 6 +- tools/tcpdf/include/barcodes/pdf417.php | 6 +- tools/tcpdf/include/barcodes/qrcode.php | 6 +- tools/tcpdf/include/tcpdf_colors.php | 30 +- tools/tcpdf/include/tcpdf_filters.php | 4 +- tools/tcpdf/include/tcpdf_font_data.php | 6 +- tools/tcpdf/include/tcpdf_fonts.php | 49 +- tools/tcpdf/include/tcpdf_images.php | 18 +- tools/tcpdf/include/tcpdf_static.php | 106 +- tools/tcpdf/tcpdf.php | 246 ++- tools/tcpdf/tcpdf_autoconfig.php | 22 +- tools/tcpdf/tcpdf_barcodes_1d.php | 10 +- tools/tcpdf/tcpdf_barcodes_2d.php | 10 +- tools/tcpdf/tcpdf_import.php | 104 -- tools/tcpdf/tcpdf_parser.php | 815 --------- tools/tcpdf/tools/tcpdf_addfont.php | 4 +- 189 files changed, 781 insertions(+), 16795 deletions(-) create mode 100644 tools/tcpdf/Makefile create mode 100644 tools/tcpdf/composer.json delete mode 100644 tools/tcpdf/examples/barcodes/example_1d_html.php delete mode 100644 tools/tcpdf/examples/barcodes/example_1d_png.php delete mode 100644 tools/tcpdf/examples/barcodes/example_1d_svg.php delete mode 100644 tools/tcpdf/examples/barcodes/example_1d_svgi.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_datamatrix_html.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_datamatrix_png.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_datamatrix_svgi.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_pdf417_html.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_pdf417_png.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_pdf417_svg.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_pdf417_svgi.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_qrcode_html.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_qrcode_png.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_qrcode_svg.php delete mode 100644 tools/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php delete mode 100644 tools/tcpdf/examples/barcodes/tcpdf_barcodes_1d_include.php delete mode 100644 tools/tcpdf/examples/barcodes/tcpdf_barcodes_2d_include.php delete mode 100644 tools/tcpdf/examples/config/tcpdf_config_alt.php delete mode 100644 tools/tcpdf/examples/data/cert/tcpdf.crt delete mode 100644 tools/tcpdf/examples/data/cert/tcpdf.fdf delete mode 100644 tools/tcpdf/examples/data/cert/tcpdf.p12 delete mode 100644 tools/tcpdf/examples/data/chapter_demo_1.txt delete mode 100644 tools/tcpdf/examples/data/chapter_demo_2.txt delete mode 100644 tools/tcpdf/examples/data/table_data_demo.txt delete mode 100644 tools/tcpdf/examples/data/utf8test.txt delete mode 100644 tools/tcpdf/examples/example_001.php delete mode 100644 tools/tcpdf/examples/example_002.php delete mode 100644 tools/tcpdf/examples/example_003.php delete mode 100644 tools/tcpdf/examples/example_004.php delete mode 100644 tools/tcpdf/examples/example_005.php delete mode 100644 tools/tcpdf/examples/example_006.php delete mode 100644 tools/tcpdf/examples/example_007.php delete mode 100644 tools/tcpdf/examples/example_008.php delete mode 100644 tools/tcpdf/examples/example_009.php delete mode 100644 tools/tcpdf/examples/example_010.php delete mode 100644 tools/tcpdf/examples/example_011.php delete mode 100644 tools/tcpdf/examples/example_012.pdf delete mode 100644 tools/tcpdf/examples/example_012.php delete mode 100644 tools/tcpdf/examples/example_013.php delete mode 100644 tools/tcpdf/examples/example_014.php delete mode 100644 tools/tcpdf/examples/example_015.php delete mode 100644 tools/tcpdf/examples/example_016.php delete mode 100644 tools/tcpdf/examples/example_017.php delete mode 100644 tools/tcpdf/examples/example_018.php delete mode 100644 tools/tcpdf/examples/example_019.php delete mode 100644 tools/tcpdf/examples/example_020.php delete mode 100644 tools/tcpdf/examples/example_021.php delete mode 100644 tools/tcpdf/examples/example_022.php delete mode 100644 tools/tcpdf/examples/example_023.php delete mode 100644 tools/tcpdf/examples/example_024.php delete mode 100644 tools/tcpdf/examples/example_025.php delete mode 100644 tools/tcpdf/examples/example_026.php delete mode 100644 tools/tcpdf/examples/example_027.php delete mode 100644 tools/tcpdf/examples/example_028.php delete mode 100644 tools/tcpdf/examples/example_029.php delete mode 100644 tools/tcpdf/examples/example_030.php delete mode 100644 tools/tcpdf/examples/example_031.php delete mode 100644 tools/tcpdf/examples/example_032.php delete mode 100644 tools/tcpdf/examples/example_033.php delete mode 100644 tools/tcpdf/examples/example_034.php delete mode 100644 tools/tcpdf/examples/example_035.php delete mode 100644 tools/tcpdf/examples/example_036.php delete mode 100644 tools/tcpdf/examples/example_037.php delete mode 100644 tools/tcpdf/examples/example_038.php delete mode 100644 tools/tcpdf/examples/example_039.php delete mode 100644 tools/tcpdf/examples/example_040.php delete mode 100644 tools/tcpdf/examples/example_041.php delete mode 100644 tools/tcpdf/examples/example_042.php delete mode 100644 tools/tcpdf/examples/example_043.php delete mode 100644 tools/tcpdf/examples/example_044.php delete mode 100644 tools/tcpdf/examples/example_045.php delete mode 100644 tools/tcpdf/examples/example_046.php delete mode 100644 tools/tcpdf/examples/example_047.php delete mode 100644 tools/tcpdf/examples/example_048.php delete mode 100644 tools/tcpdf/examples/example_049.php delete mode 100644 tools/tcpdf/examples/example_050.php delete mode 100644 tools/tcpdf/examples/example_051.php delete mode 100644 tools/tcpdf/examples/example_052.php delete mode 100644 tools/tcpdf/examples/example_053.php delete mode 100644 tools/tcpdf/examples/example_054.php delete mode 100644 tools/tcpdf/examples/example_055.php delete mode 100644 tools/tcpdf/examples/example_056.php delete mode 100644 tools/tcpdf/examples/example_057.php delete mode 100644 tools/tcpdf/examples/example_058.php delete mode 100644 tools/tcpdf/examples/example_059.php delete mode 100644 tools/tcpdf/examples/example_060.php delete mode 100644 tools/tcpdf/examples/example_061.php delete mode 100644 tools/tcpdf/examples/example_062.php delete mode 100644 tools/tcpdf/examples/example_063.php delete mode 100644 tools/tcpdf/examples/example_064.php delete mode 100644 tools/tcpdf/examples/example_065.php delete mode 100644 tools/tcpdf/examples/example_066.php delete mode 100644 tools/tcpdf/examples/example_067.php delete mode 100644 tools/tcpdf/examples/images/_blank.png delete mode 100644 tools/tcpdf/examples/images/alpha.png delete mode 100644 tools/tcpdf/examples/images/image_demo.jpg delete mode 100644 tools/tcpdf/examples/images/image_with_alpha.png delete mode 100644 tools/tcpdf/examples/images/img.png delete mode 100644 tools/tcpdf/examples/images/logo_example.gif delete mode 100644 tools/tcpdf/examples/images/logo_example.jpg delete mode 100644 tools/tcpdf/examples/images/logo_example.png delete mode 100644 tools/tcpdf/examples/images/tcpdf_box.ai delete mode 100644 tools/tcpdf/examples/images/tcpdf_box.svg delete mode 100644 tools/tcpdf/examples/images/tcpdf_cell.png delete mode 100644 tools/tcpdf/examples/images/tcpdf_logo.jpg delete mode 100644 tools/tcpdf/examples/images/tcpdf_signature.png delete mode 100644 tools/tcpdf/examples/images/testsvg.svg delete mode 100644 tools/tcpdf/examples/images/tux.svg delete mode 100644 tools/tcpdf/examples/index.php delete mode 100644 tools/tcpdf/examples/lang/afr.php delete mode 100644 tools/tcpdf/examples/lang/ara.php delete mode 100644 tools/tcpdf/examples/lang/aze.php delete mode 100644 tools/tcpdf/examples/lang/bel.php delete mode 100644 tools/tcpdf/examples/lang/bra.php delete mode 100644 tools/tcpdf/examples/lang/bul.php delete mode 100644 tools/tcpdf/examples/lang/cat.php delete mode 100644 tools/tcpdf/examples/lang/ces.php delete mode 100644 tools/tcpdf/examples/lang/chi.php delete mode 100644 tools/tcpdf/examples/lang/cym.php delete mode 100644 tools/tcpdf/examples/lang/dan.php delete mode 100644 tools/tcpdf/examples/lang/eng.php delete mode 100644 tools/tcpdf/examples/lang/est.php delete mode 100644 tools/tcpdf/examples/lang/eus.php delete mode 100644 tools/tcpdf/examples/lang/far.php delete mode 100644 tools/tcpdf/examples/lang/fra.php delete mode 100644 tools/tcpdf/examples/lang/ger.php delete mode 100644 tools/tcpdf/examples/lang/gle.php delete mode 100644 tools/tcpdf/examples/lang/glg.php delete mode 100644 tools/tcpdf/examples/lang/hat.php delete mode 100644 tools/tcpdf/examples/lang/heb.php delete mode 100644 tools/tcpdf/examples/lang/hrv.php delete mode 100644 tools/tcpdf/examples/lang/hun.php delete mode 100644 tools/tcpdf/examples/lang/hye.php delete mode 100644 tools/tcpdf/examples/lang/ind.php delete mode 100644 tools/tcpdf/examples/lang/ita.php delete mode 100644 tools/tcpdf/examples/lang/jpn.php delete mode 100644 tools/tcpdf/examples/lang/kat.php delete mode 100644 tools/tcpdf/examples/lang/kor.php delete mode 100644 tools/tcpdf/examples/lang/mkd.php delete mode 100644 tools/tcpdf/examples/lang/mlt.php delete mode 100644 tools/tcpdf/examples/lang/msa.php delete mode 100644 tools/tcpdf/examples/lang/nld.php delete mode 100644 tools/tcpdf/examples/lang/nob.php delete mode 100644 tools/tcpdf/examples/lang/pol.php delete mode 100644 tools/tcpdf/examples/lang/por.php delete mode 100644 tools/tcpdf/examples/lang/ron.php delete mode 100644 tools/tcpdf/examples/lang/rus.php delete mode 100644 tools/tcpdf/examples/lang/slv.php delete mode 100644 tools/tcpdf/examples/lang/spa.php delete mode 100644 tools/tcpdf/examples/lang/sqi.php delete mode 100644 tools/tcpdf/examples/lang/srp.php delete mode 100644 tools/tcpdf/examples/lang/swa.php delete mode 100644 tools/tcpdf/examples/lang/swe.php delete mode 100644 tools/tcpdf/examples/lang/ukr.php delete mode 100644 tools/tcpdf/examples/lang/urd.php delete mode 100644 tools/tcpdf/examples/lang/yid.php delete mode 100644 tools/tcpdf/examples/lang/zho.php delete mode 100644 tools/tcpdf/examples/tcpdf_include.php delete mode 100644 tools/tcpdf/tcpdf_import.php delete mode 100644 tools/tcpdf/tcpdf_parser.php diff --git a/tools/tcpdf/CHANGELOG.TXT b/tools/tcpdf/CHANGELOG.TXT index 4437e2cf3f..3c600bc89e 100644 --- a/tools/tcpdf/CHANGELOG.TXT +++ b/tools/tcpdf/CHANGELOG.TXT @@ -1,3 +1,73 @@ +6.11.3 (2026-04-21) + - Added deprecation notice. + - Improved composer.json. + - Added Makefile for common automation tasks. + +6.11.2 (2026-03-03) + - Refactor setCompression(). + +6.11.1 (2026-03-03) + - Remove debug line preventing compression. + +6.11.0 (2026-03-01) + - Updated copyright year. + - Updated linked http urls to https. + - Fix PHP 8.5 deprecation on curl_close() - PR #838 + - Fix PHP 8.5 deprecation on null array offset - PR #839 + - Fixed: Font subsetting - incorrect placement of head checksum - PR #849 + - Fix imagedestroy() deprecation in PHP 8.5 - PR #851 + - Fix Rendering of SVG -> PDF issue - PR #855 + +6.10.1 (2025-11-21) + - cI: Add 8.5 to CI matrix - PR #836 + - Fix PHP 8.5 deprecation for xml_parser_free - PR #835 + - Fix bad text-align from HTML source - PR #833 + - Fix image on footer problems - PR #823 + - Preserving percentage gradient decimals and correctly clamp coordinates - PR #815 + - Enables compression for PDF/A - PR #820 + +6.10.0 (2025-05-27) + - Embedded files support (Factur-X 1.07 / ZUGFeRD 2.3) #789 + +6.9.5 (2025-05-27) + - Automatically add destinations from HTML code #804 + - Wrong default value when $table_el['old_cell_padding'] is missing #807 + - Fixed PHP warning when empty hash link for image exists in HTML #809 + - Fix for application of alpha component to SVG RGBA fills #810 + +6.9.4 (2025-05-13) + - Update donation link. + +6.9.3 (2025-04-20) + - New fix for "Deserialization of untrusted data" (check on valid protocols). + - Removed global phar configuration. + +6.9.2 (2025-04-18) + - Quick fix for "Deserialization of untrusted data" security vulnerability reported by Positive Technologies. + - Disable phar protocol globally. + +6.9.1 (2025-04-03) + - Fixed "Path Traversal" security vulnerability reported by Positive Technologies. + +6.9.0 (2025-03-30) + - Added PHP 8.4 testing. + - Removed tcpdf_import.php and tcpdf_parser.php files (for a parser check the tc-lib-pdf-parser project instead). + - Fix composer.json. + +6.8.2 (2025-01-26) + - Fix some annotation flags values. + - Remove examples from packaging. + +6.8.1 (2025-01-26) - UNTAGGED + - Check relative paths on SVG images. + +6.8.0 (2024-12-23) + - Requires PHP 7.1+ and curl extension. + - Escape error message. + - Use strict time-constant function to compare TCPDF-tag hashes. + - Add K_CURLOPTS config array to set custom cURL options (NOTE: some defaults have changed). + - Add some addTTFfont fixes from tc-lib-pdf-font. + 6.7.8 (2024-12-13) - Improve SVG detection by checking for (mandatory) namespace. - Use late state binding now that minimum PHP version is 5.5. @@ -1780,7 +1850,7 @@ addTOCPage(), endTOCPage(), addHTMLTOC(). 5.0.000 (2010-05-05) - - Method ImageSVG() was added to embedd SVG images (see example n. 58). Note that not all SVG images are supported. + - Method ImageSVG() was added to embed SVG images (see example n. 58). Note that not all SVG images are supported. - Method setRasterizeVectorImages() was added to enable/disable rasterization for vector images via ImageMagick library. - Method RoundedRectXY() was added. - Method PieSectorXY() was added. @@ -2507,7 +2577,7 @@ - A bug relative to fill color on next page was fixed. 4.2.007 (2008-11-12) - - The function setListIndentWidth() was added to set custom indentation widht for HTML lists. + - The function setListIndentWidth() was added to set custom indentation width for HTML lists. 4.2.006 (2008-11-06) - A bug relative to HTML justification was fixed. @@ -2701,7 +2771,7 @@ 4.0.011 (2008-07-23) - Font support was improved. - - The folder /fonts/utils contains new utilities and instructions for embedd font files. + - The folder /fonts/utils contains new utilities and instructions for embed font files. - Documentation was updated. 4.0.010 (2008-07-22) diff --git a/tools/tcpdf/LICENSE.TXT b/tools/tcpdf/LICENSE.TXT index ec7968a7e2..b85904e8bc 100644 --- a/tools/tcpdf/LICENSE.TXT +++ b/tools/tcpdf/LICENSE.TXT @@ -7,7 +7,7 @@ published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - 2002-2024 Nicola Asuni - Tecnick.com LTD + 2002-2026 Nicola Asuni - Tecnick.com LTD ********************************************************************** ********************************************************************** @@ -15,7 +15,7 @@ GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -184,7 +184,7 @@ Library. GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -828,7 +828,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -847,14 +847,14 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. ********************************************************************** ********************************************************************** diff --git a/tools/tcpdf/Makefile b/tools/tcpdf/Makefile new file mode 100644 index 0000000000..83c0df5c7a --- /dev/null +++ b/tools/tcpdf/Makefile @@ -0,0 +1,154 @@ +# Makefile +# +# @since 2026-04-21 +# @category Library +# @package TCPDF +# @author Nicola Asuni +# @copyright 2002-2026 Nicola Asuni - Tecnick.com LTD +# @license https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) +# @link https://github.com/tecnickcom/TCPDF +# +# This file is part of tcpdf software library. +# ---------------------------------------------------------------------------------------------------------------------- + +SHELL=/bin/bash +.SHELLFLAGS=-o pipefail -c + +# Project owner +OWNER=tecnickcom + +# Project vendor +VENDOR=${OWNER} + +# Project name +PROJECT=tcpdf + +# Project version (strip trailing line endings and accidental literal "\\n") +VERSION=$(shell sed -E 's/\\n$$//' VERSION | tr -d '\r\n') + +# Current directory +CURRENTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +# Target directory +TARGETDIR=$(CURRENTDIR)target + +# sed argument for in-place substitutions +SEDINPLACE=-i +ifeq ($(shell uname -s),Darwin) + SEDINPLACE=-i '' +endif + +# Default port number for the example server +PORT?=8971 + +# PHP binary +PHP=$(shell which php) + +# Composer executable +COMPOSER=$(PHP) -d "apc.enable_cli=0" $(shell which composer) + +# --- MAKE TARGETS --- + +# Display general help about this command +.PHONY: help +help: + @echo "" + @echo "$(PROJECT) Makefile." + @echo "The following commands are available:" + @echo "" + @awk '/^## /{desc=substr($$0,4)} /^\.PHONY:/{if(NF>1) {target=$$2; if(desc) printf " make %-15s: %s\n",target,desc; desc=""}}' Makefile + @echo "" + @echo "To test and build everything from scratch, use the shortcut:" + @echo " make x" + @echo "" + +# Alias for help target +.PHONY: all +all: help + +# Test and build everything from scratch +.PHONY: x +x: buildall + +## Test and build everything from scratch +.PHONY: buildall +buildall: deps + $(MAKE) qa + +## Delete vendor and generated directories +.PHONY: clean +clean: + rm -rf ./vendor ./tests/vendor $(TARGETDIR) ./build ./cache + +## Download dependencies for the library and test harness +.PHONY: deps +deps: ensuretarget + $(COMPOSER) install --no-interaction + @if [ -f ./tests/composer.json ]; then \ + $(COMPOSER) --working-dir=tests install --no-interaction; \ + fi + +## Generate source code documentation with Doctum if available +.PHONY: doc +doc: + @if [ -x ./vendor/bin/doctum ]; then \ + ./vendor/bin/doctum update ./scripts/doctum.php --force; \ + else \ + echo "Doctum is not installed. Run make deps first."; \ + exit 1; \ + fi + +## Create missing target directories for test and build artifacts +.PHONY: ensuretarget +ensuretarget: + mkdir -p $(TARGETDIR)/test + mkdir -p $(TARGETDIR)/report + mkdir -p $(TARGETDIR)/doc + +## Lint PHP files (syntax only) +.PHONY: lint +lint: + find . -type f -name '*.php' \ + -not -path './vendor/*' \ + -not -path './tests/vendor/*' \ + -print0 | xargs -0 -n1 -P4 $(PHP) -l > /dev/null + +## Run all checks +.PHONY: qa +qa: version ensuretarget lint test + +## Generate quality reports (not implemented in this legacy repository) +.PHONY: report +report: ensuretarget + @echo "No additional report target is configured for TCPDF." + +## Start the development server +.PHONY: server +server: + $(PHP) -t examples -S localhost:$(PORT) + +## Tag this git version +.PHONY: tag +tag: + git checkout main && \ + git tag -a ${VERSION} -m "Release ${VERSION}" && \ + git push origin --tags && \ + git pull + +## Run integration tests from tests/launch.sh +.PHONY: test +test: + XDEBUG_MODE=coverage sh ./tests/launch.sh + +## Set the code version from the VERSION file +.PHONY: version +version: + sed $(SEDINPLACE) -E "s#^([[:space:]]*private static [^=]+ = ')[^']*';#\1${VERSION}';#" include/tcpdf_static.php + sed $(SEDINPLACE) -E "1,170 s#^// Version[[:space:]]+: .*#// Version : ${VERSION}#" tcpdf.php + sed $(SEDINPLACE) -E "1,170 s#^ \* @version .*# * @version ${VERSION}#" tcpdf.php + +## Increase the version patch number +.PHONY: versionup +versionup: + echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION + $(MAKE) version diff --git a/tools/tcpdf/README.md b/tools/tcpdf/README.md index f59f663399..00ad81a188 100644 --- a/tools/tcpdf/README.md +++ b/tools/tcpdf/README.md @@ -1,83 +1,131 @@ # TCPDF -*PHP PDF Library* -[![Donate via PayPal](https://img.shields.io/badge/donate-paypal-87ceeb.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20TCPDF%20project) -*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20TCPDF%20project)* +> Legacy PDF engine for PHP. **Deprecated** and maintained for existing integrations. -* **category** Library -* **author** Nicola Asuni -* **copyright** 2002-2024 Nicola Asuni - Tecnick.com LTD -* **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) -* **link** http://www.tcpdf.org -* **source** https://github.com/tecnickcom/TCPDF +[![Latest Stable Version](https://poser.pugx.org/tecnickcom/tcpdf/version)](https://packagist.org/packages/tecnickcom/tcpdf) +[![License](https://poser.pugx.org/tecnickcom/tcpdf/license)](https://packagist.org/packages/tecnickcom/tcpdf) +[![Downloads](https://poser.pugx.org/tecnickcom/tcpdf/downloads)](https://packagist.org/packages/tecnickcom/tcpdf) +[![Donate via PayPal](https://img.shields.io/badge/donate-paypal-87ceeb.svg)](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ) +If TCPDF helps your business, please consider supporting development via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ). -## NOTE -A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this library is in support only mode. +--- +## Deprecation Notice +TCPDF is **deprecated** and in **maintenance-only mode**. -## Description +Active feature development has moved to [tc-lib-pdf](https://github.com/tecnickcom/tc-lib-pdf), the modern and modular successor. -PHP library for generating PDF documents on-the-fly. +For new projects, use `tecnickcom/tc-lib-pdf`. This repository remains available for legacy systems and critical compatibility fixes. -### Main Features: -* no external libraries are required for the basic functions; -* all standard page formats, custom page formats, custom margins and units of measure; -* UTF-8 Unicode and Right-To-Left languages; -* TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts; -* font subsetting; -* methods to publish some XHTML + CSS code, Javascript and Forms; -* images, graphic (geometric figures) and transformation methods; -* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/script/formats.php) -* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417; -* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies; -* automatic page header and footer management; -* document encryption up to 256 bit and digital signature certifications; -* transactions to UNDO commands; -* PDF annotations, including links, text and file attachments; -* text rendering modes (fill, stroke and clipping); -* multiple columns mode; -* no-write page regions; -* bookmarks, named destinations and table of content; -* text hyphenation; -* text stretching and spacing (tracking); -* automatic page break, line break and text alignments including justification; -* automatic page numbering and page groups; -* move and delete pages; -* page compression (requires php-zlib extension); -* XOBject Templates; -* Layers and object visibility. -* PDF/A-1b support. +### Migration Path -### Third party fonts: +- New projects: install `tecnickcom/tc-lib-pdf`. +- Existing TCPDF users: keep TCPDF for current production workloads and migrate in phases. +- Teams seeking modern architecture, Composer-first design, and stronger type-safety should prioritize `tc-lib-pdf`. -This library may include third party font files released with different licenses. +### Why Migrate to tc-lib-pdf -All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3), -they do not contain any binary data but just a description of the general properties of a particular font. -These files can be also generated on the fly using the font utilities and TCPDF methods. +- Modern architecture: modular libraries and cleaner component boundaries improve maintainability. +- Better extensibility: new features are easier to add without patching a monolithic legacy core. +- Stronger tooling fit: modern package structure works better with static analysis, CI, and automated tests. +- Lower long-term risk: reduces technical debt tied to legacy APIs and supports ongoing PHP ecosystem evolution. +- Improved delivery speed: teams can implement and ship new PDF capabilities with less friction. -All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files). +Migration still requires planning and regression checks to preserve rendering parity for existing documents. -The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3). -The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license. -For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503 -Link : http://www.gnu.org/software/freefont/ +### Future Compatibility Possibility -The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection. -For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33 -Link : http://dejavu-fonts.org +As a long-term possibility, TCPDF could be refactored to use `tc-lib-pdf` internally as a backend while preserving a practical level of backward compatibility for existing TCPDF integrations. -The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2). -Link : http://projects.arabeyes.org/ +This is not part of a committed roadmap and there is no guarantee it will happen. It is documented here only as a potential direction that may be evaluated in the future. -### ICC profile: +--- -TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package: -https://packages.debian.org/source/stable/icc-profiles-free +## Overview +TCPDF is a pure-PHP library for generating PDF documents and barcodes directly in application code. -## Developer(s) Contact +It has been widely used across many PHP stacks and still provides a complete feature set for text rendering, page composition, graphics, signatures, forms, and standards-oriented output. -* Nicola Asuni +| | | +|---|---| +| **Package** | `tecnickcom/tcpdf` | +| **Author** | Nicola Asuni | +| **License** | [GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) (see [LICENSE.TXT](LICENSE.TXT)) | +| **Website** | | +| **Source** | | + +--- + +## Features + +### Text & Fonts +- UTF-8 Unicode and right-to-left (RTL) language support +- TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1, and CID-0 fonts +- Font subsetting +- Text hyphenation, stretching, spacing, and rendering modes (fill/stroke/clipping) +- Automatic line breaks, page breaks, and justification + +### Layout & Content +- Standard and custom page formats, margins, and measurement units +- XHTML + CSS rendering, JavaScript, and forms +- Automatic headers and footers +- Multi-column mode and no-write page regions +- Bookmarks, named destinations, and table of contents +- Automatic page numbering, page groups, move/delete pages, and undo transactions + +### Images, Graphics & Color +- Native JPEG, PNG, and SVG support +- Geometric drawing primitives and transformations +- Support for GD image formats (`GD`, `GD2`, `GD2PART`, `GIF`, `JPEG`, `PNG`, `BMP`, `XBM`, `XPM`) +- Additional formats via ImageMagick (when available) +- JPEG/PNG ICC profiles, grayscale/RGB/CMYK/spot colors, and transparencies + +### Security, Standards & Advanced Output +- Encryption up to 256-bit and digital signature certifications +- PDF annotations (links, text, and file attachments) +- 1D and 2D barcode support (including CODE 128, EAN/UPC, Datamatrix, QR Code, PDF417) +- XObject templates and layers with object visibility controls +- PDF/A-1b support + +--- + +## Requirements + +- PHP 7.1 or later +- `ext-curl` + +Optional extensions for richer output in some workflows: `gd`, `zlib`, `imagick`. + +--- + +## Third-Party Fonts + +This library may include third-party font files released under different licenses. + +PHP metadata files under [fonts](fonts) are covered by the TCPDF license (GNU LGPL v3). They contain font metadata and can also be generated using TCPDF font utilities. + +Original binary TTF files are renamed for compatibility and compressed with PHP `gzcompress` (the `.z` format). + +| Prefix | Source | License | +|---|---|---| +| `free*` | [GNU FreeFont](https://www.gnu.org/software/freefont/) | GNU GPL v3 | +| `pdfa*` | Derived from GNU FreeFont | GNU GPL v3 | +| `dejavu*` | [DejaVu Fonts](http://dejavu-fonts.org) | Bitstream/DejaVu terms | +| `ae*` | [Arabeyes.org](http://projects.arabeyes.org/) | GNU GPL v2 | + +For full details, see the bundled notices in the corresponding subdirectories under [fonts](fonts). + +--- + +## ICC Profile + +TCPDF includes `sRGB.icc` from the Debian [`icc-profiles-free`](https://packages.debian.org/source/stable/icc-profiles-free) package. + +--- + +## Contact + +Nicola Asuni diff --git a/tools/tcpdf/VERSION b/tools/tcpdf/VERSION index eed6de4bbb..060e73a63b 100644 --- a/tools/tcpdf/VERSION +++ b/tools/tcpdf/VERSION @@ -1 +1 @@ -6.7.8 +6.11.3 \ No newline at end of file diff --git a/tools/tcpdf/composer.json b/tools/tcpdf/composer.json new file mode 100644 index 0000000000..cc5904d207 --- /dev/null +++ b/tools/tcpdf/composer.json @@ -0,0 +1,75 @@ +{ + "name": "tecnickcom/tcpdf", + "type": "library", + "description": "Deprecated legacy PDF engine for PHP. For new projects use tecnickcom/tc-lib-pdf.", + "keywords": [ + "PDF", + "tcpdf", + "PDFD32000-2008", + "qrcode", + "datamatrix", + "pdf417", + "barcodes" + ], + "homepage": "https://tcpdf.org", + "license": "LGPL-3.0-or-later", + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "role": "lead" + } + ], + "require": { + "php": ">=7.1.0", + "ext-curl": "*" + }, + "suggest": { + "tecnickcom/tc-lib-pdf": "Modern replacement for TCPDF for new projects.", + "ext-gd": "Enables additional image handling in some workflows.", + "ext-imagick": "Enables additional image format support when available.", + "ext-zlib": "Recommended for compressed streams and related features." + }, + "minimum-stability": "dev", + "prefer-stable": true, + "config": { + "sort-packages": true + }, + "autoload": { + "classmap": [ + "config", + "include", + "tcpdf.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + }, + "archive": { + "exclude": [ + "/.github", + "/.phpdoc", + "/examples", + "/scripts", + "/tests" + ] + }, + "support": { + "issues": "https://github.com/tecnickcom/TCPDF/issues", + "source": "https://github.com/tecnickcom/TCPDF" + }, + "funding": [ + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ" + } + ] +} diff --git a/tools/tcpdf/config/tcpdf_config.php b/tools/tcpdf/config/tcpdf_config.php index 9888a6778b..d430ee4d06 100644 --- a/tools/tcpdf/config/tcpdf_config.php +++ b/tools/tcpdf/config/tcpdf_config.php @@ -6,9 +6,9 @@ // // Description : Configuration file for TCPDF. // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com -// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) +// License : GNU-LGPL v3 (https://www.gnu.org/copyleft/lesser.html) // ------------------------------------------------------------------- -// Copyright (C) 2004-2014 Nicola Asuni - Tecnick.com LTD +// Copyright (C) 2004-2014 2026 Nicola Asuni - Tecnick.com LTD // // This file is part of TCPDF software library. // @@ -23,7 +23,7 @@ // See the GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with TCPDF. If not, see . +// along with TCPDF. If not, see . // // See LICENSE.TXT file for more information. //============================================================+ @@ -114,7 +114,7 @@ /** * Header description string. */ -define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"); +define ('PDF_HEADER_STRING', "by2026 Nicola Asuni - Tecnick.com\nwww.tcpdf.org"); /** * Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]. diff --git a/tools/tcpdf/examples/barcodes/example_1d_html.php b/tools/tcpdf/examples/barcodes/example_1d_html.php deleted file mode 100644 index 6d3233bd62..0000000000 --- a/tools/tcpdf/examples/barcodes/example_1d_html.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_1d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_1d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.000 - * @group barcode - * @group 1d - * @group html - * @group comparable - */ - -// include 1D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); - -// output the barcode as HTML object -echo $barcodeobj->getBarcodeHTML(2, 30, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_1d_png.php b/tools/tcpdf/examples/barcodes/example_1d_png.php deleted file mode 100644 index 02ed1660e8..0000000000 --- a/tools/tcpdf/examples/barcodes/example_1d_png.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_1d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_1d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.000 - * @group barcode - * @group 1d - * @group png - */ - -// include 1D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); - -// output the barcode as PNG image -$barcodeobj->getBarcodePNG(2, 30, array(0,0,0)); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_1d_svg.php b/tools/tcpdf/examples/barcodes/example_1d_svg.php deleted file mode 100644 index 5e5ccfc355..0000000000 --- a/tools/tcpdf/examples/barcodes/example_1d_svg.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_1d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_1d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.000 - * @group barcode - * @group 1d - * @group svg - * @group comparable - */ - -// include 1D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); - -// output the barcode as SVG image -$barcodeobj->getBarcodeSVG(2, 30, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_1d_svgi.php b/tools/tcpdf/examples/barcodes/example_1d_svgi.php deleted file mode 100644 index 8c65b669be..0000000000 --- a/tools/tcpdf/examples/barcodes/example_1d_svgi.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_1d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_1d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.000 - * @group barcode - * @group 1d - * @group svg - * @group comparable - */ - -// include 1D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); - -// output the barcode as SVG inline code -echo $barcodeobj->getBarcodeSVGcode(2, 40, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_html.php b/tools/tcpdf/examples/barcodes/example_2d_datamatrix_html.php deleted file mode 100644 index e0d200cc74..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_html.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group datamatrix - * @group html - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX'); - -// output the barcode as HTML object -echo $barcodeobj->getBarcodeHTML(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_png.php b/tools/tcpdf/examples/barcodes/example_2d_datamatrix_png.php deleted file mode 100644 index 35d344dac0..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_png.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group datamatrix - * @group png - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX'); - -// output the barcode as PNG image -$barcodeobj->getBarcodePNG(6, 6, array(0,0,0)); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php b/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php deleted file mode 100644 index 10d0aa36a7..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group datamatrix - * @group svg - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX'); - -// output the barcode as SVG image -$barcodeobj->getBarcodeSVG(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svgi.php b/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svgi.php deleted file mode 100644 index 42627006f1..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_datamatrix_svgi.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group datamatrix - * @group svg - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX'); - -// output the barcode as SVG inline code -echo $barcodeobj->getBarcodeSVGcode(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_pdf417_html.php b/tools/tcpdf/examples/barcodes/example_2d_pdf417_html.php deleted file mode 100644 index 3d8de31026..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_pdf417_html.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group pdf417 - * @group html - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417'); - -// output the barcode as HTML object -echo $barcodeobj->getBarcodeHTML(4, 4, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_pdf417_png.php b/tools/tcpdf/examples/barcodes/example_2d_pdf417_png.php deleted file mode 100644 index b7c95855a9..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_pdf417_png.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group pdf417 - * @group png - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417'); - -// output the barcode as PNG image -$barcodeobj->getBarcodePNG(4, 4, array(0,0,0)); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_pdf417_svg.php b/tools/tcpdf/examples/barcodes/example_2d_pdf417_svg.php deleted file mode 100644 index 9017e5bcb8..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_pdf417_svg.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group pdf417 - * @group svg - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417'); - -// output the barcode as SVG image -$barcodeobj->getBarcodeSVG(4, 4, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_pdf417_svgi.php b/tools/tcpdf/examples/barcodes/example_2d_pdf417_svgi.php deleted file mode 100644 index 2075da7402..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_pdf417_svgi.php +++ /dev/null @@ -1,57 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group pdf417 - * @group svg - * @group comparable - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417'); - -// output the barcode as SVG inline code -echo $barcodeobj->getBarcodeSVGcode(4, 4, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_qrcode_html.php b/tools/tcpdf/examples/barcodes/example_2d_qrcode_html.php deleted file mode 100644 index 7c05f00f2d..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_qrcode_html.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group qrcode - * @group html - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'QRCODE,H'); - -// output the barcode as HTML object -echo $barcodeobj->getBarcodeHTML(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_qrcode_png.php b/tools/tcpdf/examples/barcodes/example_2d_qrcode_png.php deleted file mode 100644 index 75daa7c07d..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_qrcode_png.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group qrcode - * @group png - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'QRCODE,H'); - -// output the barcode as PNG image -$barcodeobj->getBarcodePNG(6, 6, array(0,0,0)); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_qrcode_svg.php b/tools/tcpdf/examples/barcodes/example_2d_qrcode_svg.php deleted file mode 100644 index c104ca63fe..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_qrcode_svg.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group qrcode - * @group svg - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'QRCODE,H'); - -// output the barcode as SVG image -$barcodeobj->getBarcodeSVG(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php b/tools/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php deleted file mode 100644 index f31a10083b..0000000000 --- a/tools/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php +++ /dev/null @@ -1,56 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Example for tcpdf_barcodes_2d.php class -// -//============================================================+ - -/** - * @file - * Example for tcpdf_barcodes_2d.php class - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.009 - * @group barcode - * @group qrcode - * @group svg - */ - -// include 2D barcode class (search for installation path) -require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php'); - -// set the barcode content and type -$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'QRCODE,H'); - -// output the barcode as SVG inline code -echo $barcodeobj->getBarcodeSVGcode(6, 6, 'black'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/barcodes/tcpdf_barcodes_1d_include.php b/tools/tcpdf/examples/barcodes/tcpdf_barcodes_1d_include.php deleted file mode 100644 index 0add5ec6fb..0000000000 --- a/tools/tcpdf/examples/barcodes/tcpdf_barcodes_1d_include.php +++ /dev/null @@ -1,46 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -//============================================================+ - -/** - * Example of alternative configuration file for TCPDF. - * @author Nicola Asuni - * @package com.tecnick.tcpdf - * @version 4.9.005 - * @since 2004-10-27 - */ - -/** - * Define the following constant to ignore the default configuration file. - */ -define ('K_TCPDF_EXTERNAL_CONFIG', true); - -/** - * Installation path (/var/www/tcpdf/). - * By default it is automatically calculated but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_MAIN', ''); - -/** - * URL path to tcpdf installation folder (http://localhost/tcpdf/). - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_URL', ''); - -/** - * Path for PDF fonts. - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/'); - -/** - * Default images directory. - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -define ('K_PATH_IMAGES', dirname(__FILE__).'/../images/'); - -/** - * Deafult image logo used be the default Header() method. - * Please set here your own logo or an empty string to disable it. - */ -define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg'); - -/** - * Header logo image width in user units. - */ -define ('PDF_HEADER_LOGO_WIDTH', 30); - -/** - * Cache directory for temporary files (full path). - */ -define ('K_PATH_CACHE', sys_get_temp_dir().'/'); - -/** - * Generic name for a blank image. - */ -define ('K_BLANK_IMAGE', '_blank.png'); - -/** - * Page format. - */ -define ('PDF_PAGE_FORMAT', 'A4'); - -/** - * Page orientation (P=portrait, L=landscape). - */ -define ('PDF_PAGE_ORIENTATION', 'P'); - -/** - * Document creator. - */ -define ('PDF_CREATOR', 'TCPDF'); - -/** - * Document author. - */ -define ('PDF_AUTHOR', 'TCPDF'); - -/** - * Header title. - */ -define ('PDF_HEADER_TITLE', 'TCPDF Example'); - -/** - * Header description string. - */ -define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"); - -/** - * Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]. - */ -define ('PDF_UNIT', 'mm'); - -/** - * Header margin. - */ -define ('PDF_MARGIN_HEADER', 5); - -/** - * Footer margin. - */ -define ('PDF_MARGIN_FOOTER', 10); - -/** - * Top margin. - */ -define ('PDF_MARGIN_TOP', 27); - -/** - * Bottom margin. - */ -define ('PDF_MARGIN_BOTTOM', 25); - -/** - * Left margin. - */ -define ('PDF_MARGIN_LEFT', 15); - -/** - * Right margin. - */ -define ('PDF_MARGIN_RIGHT', 15); - -/** - * Default main font name. - */ -define ('PDF_FONT_NAME_MAIN', 'helvetica'); - -/** - * Default main font size. - */ -define ('PDF_FONT_SIZE_MAIN', 10); - -/** - * Default data font name. - */ -define ('PDF_FONT_NAME_DATA', 'helvetica'); - -/** - * Default data font size. - */ -define ('PDF_FONT_SIZE_DATA', 8); - -/** - * Default monospaced font name. - */ -define ('PDF_FONT_MONOSPACED', 'courier'); - -/** - * Ratio used to adjust the conversion of pixels to user units. - */ -define ('PDF_IMAGE_SCALE_RATIO', 1.25); - -/** - * Magnification factor for titles. - */ -define('HEAD_MAGNIFICATION', 1.1); - -/** - * Height of cell respect font height. - */ -define('K_CELL_HEIGHT_RATIO', 1.25); - -/** - * Title magnification respect main font size. - */ -define('K_TITLE_MAGNIFICATION', 1.3); - -/** - * Reduction factor for small font. - */ -define('K_SMALL_RATIO', 2/3); - -/** - * Set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language. - */ -define('K_THAI_TOPCHARS', true); - -/** - * If true allows to call TCPDF methods using HTML syntax - * IMPORTANT: For security reason, disable this feature if you are printing user HTML content. - */ -define('K_TCPDF_CALLS_IN_HTML', true); - -/** - * List of TCPDF methods that are allowed to be called using HTML syntax. - * Note: each method name must end with surrounded with | (pipe) character. - * The constant K_TCPDF_CALLS_IN_HTML must be set to true. - * IMPORTANT: For security reason, disable this feature if you are allowing user HTML content. - */ -define('K_ALLOWED_TCPDF_TAGS', '|AddPage|Rect|SetDrawColor|write1DBarcode|'); - -/** - * If true and PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution. - */ -define('K_TCPDF_THROW_EXCEPTION_ERROR', false); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/data/cert/tcpdf.crt b/tools/tcpdf/examples/data/cert/tcpdf.crt deleted file mode 100644 index f0491391cf..0000000000 --- a/tools/tcpdf/examples/data/cert/tcpdf.crt +++ /dev/null @@ -1,40 +0,0 @@ -Bag Attributes - localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C -subject=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT -issuer=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT ------BEGIN CERTIFICATE----- -MIIC1TCCAj6gAwIBAgIKkehOL/XGkB5cjjANBgkqhkiG9w0BAQUFADBhMRMwEQYD -VQQDEwpUQ1BERiBERU1PMQ4wDAYDVQQKEwVUQ1BERjENMAsGA1UECxMEREVNTzEe -MBwGCSqGSIb3DQEJARYPeW91QGV4YW1wbGUuY29tMQswCQYDVQQGEwJJVDAeFw0w -OTA4MjExMjU0NDhaFw0xNDA4MjExMjU0NDhaMGExEzARBgNVBAMTClRDUERGIERF -TU8xDjAMBgNVBAoTBVRDUERGMQ0wCwYDVQQLEwRERU1PMR4wHAYJKoZIhvcNAQkB -Fg95b3VAZXhhbXBsZS5jb20xCzAJBgNVBAYTAklUMIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H -XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0 -Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB -o4GTMIGQMDcGA1UdEgQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwGA1UECgwFVENQ -REagCwYDVQQLDARERU1PMDcGA1UdEQQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwG -A1UECgwFVENQREagCwYDVQQLDARERU1PMA8GCSqGSIb3LwEBCgQCBQAwCwYDVR0P -BAQDAgSQMA0GCSqGSIb3DQEBBQUAA4GBAEhTQfqX3ZNdHmpTLDbIj22RHXii2roE -OavCbu9WsHoWpva0qSd+yIoD594VHvYAd29sfzDfiN+7W0aiZfDhq5jpaSQMVlN8 -RGYMupbHY/+a9Gz1wqxnR84mlTtIkZVRYAhsfPwy6M1BEjdMqfdh9h40JIdkdjtb -8faTCfXPePWQ ------END CERTIFICATE----- -Bag Attributes - localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C -Key Attributes: ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H -XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0 -Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB -AoGAXc+wNMmz/5Z+RlIKYia44klmqbplEx+0JULqXI4BQsrqvs67i+I4bJkznoL+ -rEIRYSuQ3sCRKFsFtckjTGpxadnxkB+uwGKc6pZChv99BFX6HFR4hgBlT/BBRAQA -hMDlM2JIRr4S4SMVXR7MHwGMUf9mUeanGLR3ZWtU3aXJrIECQQD7OaYUVYNEEnM9 -uXyjm22CuHyqyEf5gb13sK0uQty67547yJTMUQZd/sQc9KGwhzBbhrob2LO2jAhh -S+f+NSRnAkEAxFHm3fMI5RgXmswxlGm4QW07a/Ueo7ZJG6xjTkFXluJhd+XHswRD -dQIO3zG9nGjNUoeMrPhXhPvKqFc2F9RDuQJAQBEGin74N77gxqfr4ik79y8nE8J5 -oGZ2s/RJZdfFRKLg3mwbjjNHhWb4Ck5UgZkoOt8TzRApXG8/n9hktE5HFwJBALur -M5AueO1Pl5kB489lNJ9OxUQRYUXMxpxuscuoCQwSwmv0O2+0/qtG2WKhUQnI4aYo -L+FV0YwtivBb1jj3T/kCQQDIWOxq8eRowdaMzvJpRUHFgMcf1AVZExKyrugwYOWd -KNsDxC4KaQOsPt8iT/Ulo4g/MJC0HolCOhWibKmR9Ayl ------END RSA PRIVATE KEY----- diff --git a/tools/tcpdf/examples/data/cert/tcpdf.fdf b/tools/tcpdf/examples/data/cert/tcpdf.fdf deleted file mode 100644 index a8f7c35d9af83d2579adafbe8d2745daa30dfd3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1286 zcmY#&b8*u()HC8$ef0SJWnL~r1p|frq%2+=8-1XRf)S7#r0=WYVr67tU}<1sWNK(+ zVqj{ZZD6EsV4$w4A5vM6s_&dwl9-d9ZfD1vnwJ974blcRB_P0C!5Cx;LKeh@%DVa{ zX69&A=9fC8RwU*YU-uEiZ?;rfP&Z2LK)A;_B7r3kke!oRl4_NlT2$g%0n&r%SOWtqBSU91S93#0P5mGRLt{e&OJj)R zfezFUQ!unNGcz$2Stmap^>SHiA5BUZ)k$Vr=CM% zc=0=>aXxA&FtRc*H}*0ZG&u@?wgf?)m6q&9>l2-|l~g=lrrfT;F~&|0XoQ#OZO$icNz4 z-3H87&iPEtj0}v68z&nyPB1VB2BNGGi-CdO0!TdZAji`JXe{wSVrc;=ieh+KxOu>l z1ko%=ie|W0erW9KGcv~Hu`mIX3dn3(eijyHCYA}PK?qDp%)qeo2zLB6{qE#gxvXFv zvlIQf6J;wF-P*-sx%yDv`>+jFV#~g5S*c!kqKo)Yp8S8-mz=MM)}*_iQ=4k-F>z{O0!L2GAEOs%9fiz&R(?FEV{qfsm&adYyzE04L)pyR%D@jZ)LCJsMoDa#P`pJ37QixnsQIwj-%VnTo z3MAk_!OYau*i-=|0R@I;3SgE(9zx6lQ_K*HIwK1Mgx-=OU}=(C#LERNy@E5VQWZ?~ kgYxrB6hMU zY-rcU0s;sCfPw=!#BpZA(3DXgvNT6SMx2c3M^p9_<~*qj&~k|Wio#7(scRd zVB;~P(%~|g!$#H)Uj>}ly*mK-K*NcRU+dxygiF7$BDFu;YqjVO#_{qT;h+#I>a(HG z6~@vJ%56(B0~rm^94uG!F&Q6%9$*+cPTn~18aH}n`p;SwVUc3}cGnJV33D`@$5Df5 zka5G^;jy@bF*5dt7yj?!On2m{6(lU}`+Ngz(u>-st&u3q&_N{T-$B(t9@HplX>tLm z<+%6V-nXIed*8 zvh$I?cs-H$tTFYyLYOK&N@y0$j3(wM=r+RHOFm_l_Ew3J zjZ|cTFZc?kMLbIRq9#Je0!uHg$!6L_|JSTh4SBDC^kz-4Q$rl0exLwuv7)I*(A$u( z4~P;V(@gR1lQvQ9WUL5F(7#Oi)Yh-}TXhqUaHvL^;{PKZ_!c^5TIaYzP~~Y~ol!Ix zIU5LwA?E0d=I<-Og-X;m1K5(@AtP)n6jQ1{Q2ko=_)Bd{1(bAXe>Coeda=}lih)j$ z2>zQNzJ;fmRdBanq`^ZJV5@Ra+72~oPcmiLf=NHQP1lj<)-k#CXYR9X=4kR3k!;Y8h(}v0#D@^oeB!oK*4q{yIW*$U z&LNQUbi3jQQ0AALA`*I zEfwAUX0Q~1Fi>8l{3I2b+YV;2v~q$Ht)BfYyxTJvSQ3SoAxX}JT3QHXqu~l@W;f&? zvySO921ne7{yT!I)^oWbM&abJwv8?L zM@*J>12l+CQ;QV!Y|w=vINzLD8!z3$e&b>m;bngGpZYK)8EI}digPEz z`_pvC6Afky&Q2vvrHY~v?ZeFbT?m+rp=p=tij1id`L#ceB43YATh$S6RuVfPIPHzQGmAuP1O9==9r!_9t z(XXtxXOZ1gWS49JT5NEHFG{7{?SuzHx8kV3=tHXcRlJ=U+G!T)+ z?jrd2IhsLxK1dcI7Bz#699SwDG5!;?5@oG>vkAutIB1uG5% r0vZJX1QaJKFP)8IPAOWT%X#|+d4hgQWoQHlY+QLorem 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.

- -

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.

diff --git a/tools/tcpdf/examples/data/table_data_demo.txt b/tools/tcpdf/examples/data/table_data_demo.txt deleted file mode 100644 index 5a48a42e77..0000000000 --- a/tools/tcpdf/examples/data/table_data_demo.txt +++ /dev/null @@ -1,15 +0,0 @@ -Austria;Vienna;83859;8075 -Belgium;Brussels;30518;10192 -Denmark;Copenhagen;43094;5295 -Finland;Helsinki;304529;5147 -France;Paris;543965;58728 -Germany;Berlin;357022;82057 -Greece;Athens;131625;10511 -Ireland;Dublin;70723;3694 -Italy;Roma;301316;57563 -Luxembourg;Luxembourg;2586;424 -Netherlands;Amsterdam;41526;15654 -Portugal;Lisbon;91906;9957 -Spain;Madrid;504790;39348 -Sweden;Stockholm;410934;8839 -United Kingdom;London;243820;58862 diff --git a/tools/tcpdf/examples/data/utf8test.txt b/tools/tcpdf/examples/data/utf8test.txt deleted file mode 100644 index 291d4e7355..0000000000 --- a/tools/tcpdf/examples/data/utf8test.txt +++ /dev/null @@ -1,128 +0,0 @@ -Sentences that contain all letters commonly used in a language --------------------------------------------------------------- - -This file is UTF-8 encoded. - -Czech (cz) ---------- - - Příšerně žluťoučký kůň úpěl ďábelské ódy. - Hleď, toť přízračný kůň v mátožné póze šíleně úpí. - Zvlášť zákeřný učeň s ďolíčky běží podél zóny úlů. - Loď čeří kýlem tůň obzvlášť v Grónské úžině. - Ó, náhlý déšť již zvířil prach a čilá laň teď běží s houfcem gazel k úkrytům. - -Danish (da) ---------- - - Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen - Wolther spillede på xylofon. - (= Quiz contestants were eating strawbery with cream while Wolther - the circus clown played on xylophone.) - -German (de) ------------ - - Falsches Üben von Xylophonmusik quält jeden größeren Zwerg - (= Wrongful practicing of xylophone music tortures every larger dwarf) - - Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich - (= Twelve boxing fighters hunted Eva across the dike of Sylt) - - Heizölrückstoßabdämpfung - (= fuel oil recoil absorber) - (jqvwxy missing, but all non-ASCII letters in one word) - -English (en) ------------- - - The quick brown fox jumps over the lazy dog - -Spanish (es) ------------- - - El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y - frío, añoraba a su querido cachorro. - (Contains every letter and every accent, but not every combination - of vowel + acute.) - -French (fr) ------------ - - Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à - côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce - qui lui permet de penser à la cænogenèse de l'être dont il est question - dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui, - pense-t-il, diminue çà et là la qualité de son œuvre. - - l'île exiguë - Où l'obèse jury mûr - Fête l'haï volapük, - Âne ex aéquo au whist, - Ôtez ce vœu déçu. - - Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en - canoë au delà des îles, près du mälström où brûlent les novæ. - -Irish Gaelic (ga) ------------------ - - D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh - -Hungarian (hu) --------------- - - Árvíztűrő tükörfúrógép - (= flood-proof mirror-drilling machine, only all non-ASCII letters) - -Icelandic (is) --------------- - - Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa - - Sævör grét áðan því úlpan var ónýt - (some ASCII letters missing) - -Greek (el) -------------- - - Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο - (= No more shall I see acacias or myrtles in the golden clearing) - - Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία - (= I uncover the soul-destroying abhorrence) - -Hebrew (iw) ------------ - - ? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה - -Polish (pl) ------------ - - Pchnąć w tę łódź jeża lub osiem skrzyń fig - (= To push a hedgehog or eight bins of figs in this boat) - - Zażółć gęślą jaźń - -Russian (ru) ------------- - - В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! - (= Would a citrus live in the bushes of south? Yes, but only a fake one!) - -Thai (th) ---------- - - [--------------------------|------------------------] - ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน - จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร - ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย - ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ - - [The copyright for the Thai example is owned by The Computer - Association of Thailand under the Royal Patronage of His Majesty the - King.] - -Please let me know if you find others! Special thanks to the people -from all over the world who contributed these sentences. diff --git a/tools/tcpdf/examples/example_001.php b/tools/tcpdf/examples/example_001.php deleted file mode 100644 index 82555e6b25..0000000000 --- a/tools/tcpdf/examples/example_001.php +++ /dev/null @@ -1,110 +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, array(0,64,255), array(0,64,128)); -$pdf->setFooterData(array(0,64,0), array(0,64,128)); - -// 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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $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 text shadow effect -$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal')); - -// 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(0, 0, '', '', $html, 0, 1, 0, true, '', 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/tools/tcpdf/examples/example_002.php b/tools/tcpdf/examples/example_002.php deleted file mode 100644 index f40a2014a3..0000000000 --- a/tools/tcpdf/examples/example_002.php +++ /dev/null @@ -1,91 +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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $pdf->setLanguageArray($l); -} - -// --------------------------------------------------------- - -// set font -$pdf->setFont('times', 'BI', 20); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write(0, $txt, '', 0, 'C', true, 0, false, false, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_002.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/example_003.php b/tools/tcpdf/examples/example_003.php deleted file mode 100644 index eeeb0c8d5e..0000000000 --- a/tools/tcpdf/examples/example_003.php +++ /dev/null @@ -1,122 +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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $pdf->setLanguageArray($l); -} - -// --------------------------------------------------------- - -// set font -$pdf->setFont('times', 'BI', 12); - -// add a page -$pdf->AddPage(); - -// set some text to print -$txt = <<Write(0, $txt, '', 0, 'C', true, 0, false, false, 0); - -// --------------------------------------------------------- - -//Close and output PDF document -$pdf->Output('example_003.pdf', 'I'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/tools/tcpdf/examples/example_004.php b/tools/tcpdf/examples/example_004.php deleted file mode 100644 index a1f69a5b90..0000000000 --- a/tools/tcpdf/examples/example_004.php +++ /dev/null @@ -1,123 +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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $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/tools/tcpdf/examples/example_005.php b/tools/tcpdf/examples/example_005.php deleted file mode 100644 index c27dfeac44..0000000000 --- a/tools/tcpdf/examples/example_005.php +++ /dev/null @@ -1,160 +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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $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/tools/tcpdf/examples/example_006.php b/tools/tcpdf/examples/example_006.php deleted file mode 100644 index f2c7dbca71..0000000000 --- a/tools/tcpdf/examples/example_006.php +++ /dev/null @@ -1,347 +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 (optional) -if (@file_exists(dirname(__FILE__).'/lang/eng.php')) { - require_once(dirname(__FILE__).'/lang/eng.php'); - $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, ''); - -// create some HTML content -$html = '

Embedded Images

- - - -
src="@..."
src="data..."
'; - -$data = base64_encode(file_get_contents("images/logo_example.png")); -$html = str_replace("@DATA1@", "@" . $data, $html); -$html = str_replace("@DATA2@", "data:image/png;base64," . $data, $html); - -// 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(); - -$textcolors = '

HTML Text Colors

'; -$bgcolors = '

HTML Background Colors

'; - -foreach(TCPDF_COLORS::$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 -