6.0.015 (2013-04-14)

- Some unused vars were removed from AddFont() method.
- Some directories were moved inside the examples directory.
- All examples were updated to reflect the new default structure.
- Source code were clean-up up to be more compatible with system packaging.
- Files encodings and permissions were reset.
- The command line tool tcpdf_addfont.php was added on the tools directory.
This commit is contained in:
nicolaasuni 2013-05-14 21:28:42 +01:00
parent e7c64b4f1c
commit 39528a1441
168 changed files with 6933 additions and 6445 deletions

8
CHANGELOG.TXT Executable file → Normal file
View File

@ -1,3 +1,11 @@
6.0.015 (2013-04-14)
- Some unused vars were removed from AddFont() method.
- Some directories were moved inside the examples directory.
- All examples were updated to reflect the new default structure.
- Source code were clean-up up to be more compatible with system packaging.
- Files encodings and permissions were reset.
- The command line tool tcpdf_addfont.php was added on the tools directory.
6.0.014 (2013-04-13)
- The signature of addTTFfont() method includes a new parameter to link existing fonts instead of copying and compressing them.

0
LICENSE.TXT Executable file → Normal file
View File

6
README.TXT Executable file → Normal file
View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 6.0.014
Release date: 2013-05-13
Version: 6.0.015
Release date: 2013-05-14
Author: Nicola Asuni
Copyright (c) 2002-2013:
@ -86,7 +86,7 @@ License
See LICENSE.TXT file for more information.
Third party fonts
This library includes third party font files released with different licenses.
This library may include third party font files released with different licenses.
These fonts are not required by TCPDF but have been included as you convenience.
The original 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).
To get the original distribution archives please check the information on fonts subfolders:

View File

@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.0.014",
"version": "6.0.015",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.",
@ -19,7 +19,6 @@
"autoload": {
"classmap": [
"fonts",
"config/lang",
"config",
"include",
"tcpdf.php",

117
config/tcpdf_config.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : tcpdf_config.php
// Begin : 2004-06-11
// Last Update : 2013-02-06
// Last Update : 2013-05-14
//
// Description : Configuration file for TCPDF.
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
@ -51,15 +51,31 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
$_SERVER['DOCUMENT_ROOT'] = '/';
}
}
// be sure that the end slash is present
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'].'/');
// Automatic calculation for the following K_PATH_MAIN constant
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
if (substr($k_path_main, -1) != '/') {
$k_path_main .= '/';
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Try to automatically set the value for the following K_PATH_MAIN constant.
// NOTE: delete this section and manually set the K_PATH_MAIN constant below for better performances.
$tcpdf_install_dirs = array();
if (strpos(dirname(__FILE__), '/config') !== false) {
// default config file
$k_path_main_default = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
if (substr($k_path_main_default, -1) != '/') {
$k_path_main_default .= '/';
}
$tcpdf_install_dirs[] = $k_path_main_default;
}
$tcpdf_install_dirs += array('/usr/share/php/tcpdf/', '/usr/share/tcpdf/', '/usr/share/php-tcpdf/', '/var/www/tcpdf/', '/var/www/html/tcpdf/', '/usr/local/apache2/htdocs/tcpdf/');
foreach ($tcpdf_install_dirs as $k_path_main) {
if (file_exists($k_path_main.'tcpdf.php')) {
break;
}
}
if (!file_exists($k_path_main)) {
die('TCPDF ERROR: please set the correct path to TCPDF on the configuration file');
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/**
* Installation path (/var/www/tcpdf/).
@ -67,10 +83,12 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
*/
define ('K_PATH_MAIN', $k_path_main);
// Automatic calculation for the following K_PATH_URL constant
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Try to automatically set the value for the following K_PATH_URL constant.
// NOTE: delete this section and manually set the K_PATH_URL constant below for better performances.
$k_path_url = $k_path_main; // default value for console mode
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND (strtolower($_SERVER['HTTPS']) != 'off')) {
$k_path_url = 'https://';
} else {
$k_path_url = 'http://';
@ -78,177 +96,172 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
$k_path_url .= $_SERVER['HTTP_HOST'];
$k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/**
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
* By default it is automatically set but you can also set it as a fixed string to improve performances.
*/
define ('K_PATH_URL', $k_path_url);
/**
* path for PDF fonts
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
* Cache directory for temporary files (full path).
*/
define ('K_PATH_CACHE', sys_get_temp_dir().'/');
/**
* Path for PDF fonts.
*/
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
/**
* cache directory for temporary files (full path)
* Default images directory.
*/
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
define ('K_PATH_IMAGES', K_PATH_MAIN.'examples/images/');
/**
* cache directory for temporary files (url path)
*/
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
/**
*images directory
*/
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
/**
* blank image
* Blank image.
*/
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
/**
* page format
* Page format.
*/
define ('PDF_PAGE_FORMAT', 'A4');
/**
* page orientation (P=portrait, L=landscape)
* Page orientation (P=portrait, L=landscape).
*/
define ('PDF_PAGE_ORIENTATION', 'P');
/**
* document creator
* Document creator.
*/
define ('PDF_CREATOR', 'TCPDF');
/**
* document author
* Document author.
*/
define ('PDF_AUTHOR', 'TCPDF');
/**
* header title
* Header title.
*/
define ('PDF_HEADER_TITLE', 'TCPDF Example');
/**
* header description string
* Header description string.
*/
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
/**
* image logo
* Image logo.
*/
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
/**
* header logo image width [mm]
* Header logo image width [mm].
*/
define ('PDF_HEADER_LOGO_WIDTH', 30);
/**
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
* Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
*/
define ('PDF_UNIT', 'mm');
/**
* header margin
* Header margin.
*/
define ('PDF_MARGIN_HEADER', 5);
/**
* footer margin
* Footer margin.
*/
define ('PDF_MARGIN_FOOTER', 10);
/**
* top margin
* Top margin.
*/
define ('PDF_MARGIN_TOP', 27);
/**
* bottom margin
* Bottom margin.
*/
define ('PDF_MARGIN_BOTTOM', 25);
/**
* left margin
* Left margin.
*/
define ('PDF_MARGIN_LEFT', 15);
/**
* right margin
* Right margin.
*/
define ('PDF_MARGIN_RIGHT', 15);
/**
* default main font name
* Default main font name.
*/
define ('PDF_FONT_NAME_MAIN', 'helvetica');
/**
* default main font size
* Default main font size.
*/
define ('PDF_FONT_SIZE_MAIN', 10);
/**
* default data font name
* Default data font name.
*/
define ('PDF_FONT_NAME_DATA', 'helvetica');
/**
* default data font size
* Default data font size.
*/
define ('PDF_FONT_SIZE_DATA', 8);
/**
* default monospaced font name
* Default monospaced font name.
*/
define ('PDF_FONT_MONOSPACED', 'courier');
/**
* ratio used to adjust the conversion of pixels to user units
* Ratio used to adjust the conversion of pixels to user units.
*/
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
/**
* magnification factor for titles
* Magnification factor for titles.
*/
define('HEAD_MAGNIFICATION', 1.1);
/**
* height of cell respect font height
* Height of cell respect font height.
*/
define('K_CELL_HEIGHT_RATIO', 1.25);
/**
* title magnification respect main font size
* Title magnification respect main font size.
*/
define('K_TITLE_MAGNIFICATION', 1.3);
/**
* reduction factor for small font
* 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
* 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
* 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);
/**
* if true adn PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
* If true adn 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);
}

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>TCPDF DOCUMENTATION</title>
<meta http-equiv="refresh" content="1;url=http://www.tcpdf.org/doc/" />
</head>
<body>
<a href="http://www.tcpdf.org/doc/">TCPDF Documentation</a>
</body>
</html>

View File

@ -2,9 +2,9 @@
//============================================================+
// File name : tcpdf_config.php
// Begin : 2004-06-11
// Last Update : 2013-02-06
// Last Update : 2013-05-14
//
// Description : Alternative configuration file for TCPDF.
// Description : Example of alternative 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)
// -------------------------------------------------------------------
@ -29,13 +29,16 @@
//============================================================+
/**
* Alternative configuration file for TCPDF.
* 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);
// DOCUMENT_ROOT fix for IIS Webserver
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
if(isset($_SERVER['SCRIPT_FILENAME'])) {
@ -47,15 +50,31 @@ if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
$_SERVER['DOCUMENT_ROOT'] = '/';
}
}
// be sure that the end slash is present
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'].'/');
// Automatic calculation for the following K_PATH_MAIN constant
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
if (substr($k_path_main, -1) != '/') {
$k_path_main .= '/';
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Try to automatically set the value for the following K_PATH_MAIN constant.
// NOTE: delete this section and manually set the K_PATH_MAIN constant below for better performances.
$tcpdf_install_dirs = array();
if (strpos(dirname(__FILE__), '/config') !== false) {
// default config file
$k_path_main_default = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('examples/config'))));
if (substr($k_path_main_default, -1) != '/') {
$k_path_main_default .= '/';
}
$tcpdf_install_dirs[] = $k_path_main_default;
}
$tcpdf_install_dirs += array('/usr/share/php/tcpdf/', '/usr/share/tcpdf/', '/usr/share/php-tcpdf/', '/var/www/tcpdf/', '/var/www/html/tcpdf/', '/usr/local/apache2/htdocs/tcpdf/');
foreach ($tcpdf_install_dirs as $k_path_main) {
if (file_exists($k_path_main.'tcpdf.php')) {
break;
}
}
if (!file_exists($k_path_main)) {
die('TCPDF ERROR: please set the correct path to TCPDF on the configuration file');
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/**
* Installation path (/var/www/tcpdf/).
@ -63,9 +82,12 @@ if (substr($k_path_main, -1) != '/') {
*/
define ('K_PATH_MAIN', $k_path_main);
// Automatic calculation for the following K_PATH_URL constant
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Try to automatically set the value for the following K_PATH_URL constant.
// NOTE: delete this section and manually set the K_PATH_URL constant below for better performances.
$k_path_url = $k_path_main; // default value for console mode
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND (strtolower($_SERVER['HTTPS']) != 'off')) {
$k_path_url = 'https://';
} else {
$k_path_url = 'http://';
@ -73,177 +95,172 @@ if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
$k_path_url .= $_SERVER['HTTP_HOST'];
$k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/**
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
* By default it is automatically calculated but you can also set it as a fixed string to improve performances..
* By default it is automatically set but you can also set it as a fixed string to improve performances.
*/
define ('K_PATH_URL', $k_path_url);
/**
* path for PDF fonts
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
* Cache directory for temporary files (full path).
*/
define ('K_PATH_CACHE', sys_get_temp_dir().'/');
/**
* Path for PDF fonts.
*/
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
/**
* cache directory for temporary files (full path)
* Default images directory.
*/
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
define ('K_PATH_IMAGES', K_PATH_MAIN.'examples/images/');
/**
* cache directory for temporary files (url path)
*/
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
/**
*images directory
*/
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
/**
* blank image
* Blank image.
*/
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
/**
* page format
* Page format.
*/
define ('PDF_PAGE_FORMAT', 'A4');
/**
* page orientation (P=portrait, L=landscape)
* Page orientation (P=portrait, L=landscape).
*/
define ('PDF_PAGE_ORIENTATION', 'P');
/**
* document creator
* Document creator.
*/
define ('PDF_CREATOR', 'TCPDF');
/**
* document author
* Document author.
*/
define ('PDF_AUTHOR', 'TCPDF');
/**
* header title
* Header title.
*/
define ('PDF_HEADER_TITLE', 'TCPDF Example');
/**
* header description string
* Header description string.
*/
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
/**
* image logo
* Image logo.
*/
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
/**
* header logo image width [mm]
* Header logo image width [mm].
*/
define ('PDF_HEADER_LOGO_WIDTH', 30);
/**
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
* Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
*/
define ('PDF_UNIT', 'mm');
/**
* header margin
* Header margin.
*/
define ('PDF_MARGIN_HEADER', 5);
/**
* footer margin
* Footer margin.
*/
define ('PDF_MARGIN_FOOTER', 10);
/**
* top margin
* Top margin.
*/
define ('PDF_MARGIN_TOP', 27);
/**
* bottom margin
* Bottom margin.
*/
define ('PDF_MARGIN_BOTTOM', 25);
/**
* left margin
* Left margin.
*/
define ('PDF_MARGIN_LEFT', 15);
/**
* right margin
* Right margin.
*/
define ('PDF_MARGIN_RIGHT', 15);
/**
* default main font name
* Default main font name.
*/
define ('PDF_FONT_NAME_MAIN', 'helvetica');
/**
* default main font size
* Default main font size.
*/
define ('PDF_FONT_SIZE_MAIN', 10);
/**
* default data font name
* Default data font name.
*/
define ('PDF_FONT_NAME_DATA', 'helvetica');
/**
* default data font size
* Default data font size.
*/
define ('PDF_FONT_SIZE_DATA', 8);
/**
* default monospaced font name
* Default monospaced font name.
*/
define ('PDF_FONT_MONOSPACED', 'courier');
/**
* ratio used to adjust the conversion of pixels to user units
* Ratio used to adjust the conversion of pixels to user units.
*/
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
/**
* magnification factor for titles
* Magnification factor for titles.
*/
define('HEAD_MAGNIFICATION', 1.1);
/**
* height of cell repect font height
* Height of cell respect font height.
*/
define('K_CELL_HEIGHT_RATIO', 1.25);
/**
* title magnification respect main font size
* Title magnification respect main font size.
*/
define('K_TITLE_MAGNIFICATION', 1.3);
/**
* reduction factor for small font
* 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
* 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
* 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);
/**
* if true adn PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
* If true adn 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);

0
config/cert/tcpdf.crt → examples/data/cert/tcpdf.crt Executable file → Normal file
View File

0
config/cert/tcpdf.fdf → examples/data/cert/tcpdf.fdf Executable file → Normal file
View File

0
config/cert/tcpdf.p12 → examples/data/cert/tcpdf.p12 Executable file → Normal file
View File

View File

View File

@ -1,6 +1,6 @@
<p><strong>Lorem ipsum</strong> 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.</p>
<img src="../images/image_demo.jpg" width="54mm" height="80mm" />
<img src="images/image_demo.jpg" width="54mm" height="80mm" />
<p style="background-color:yellow;"><i>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.</i></p>
@ -12,7 +12,7 @@
<p><strong>Lorem ipsum</strong> 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.</p>
<img src="../images/image_demo.jpg" width="54mm" height="80mm" />
<img src="images/image_demo.jpg" width="54mm" height="80mm" />
<p style="background-color:yellow;"><i>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.</i></p>

View File

0
cache/utf8test.txt → examples/data/utf8test.txt Executable file → Normal file
View File

15
examples/example_001.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_001.php
// Begin : 2008-03-04
// Last Update : 2012-07-25
// Last Update : 2013-05-14
//
// Description : Example 001 for TCPDF class
// Default Header and Footer
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -39,7 +39,7 @@ $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($tc=array(0,64,0), $lc=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));
@ -59,8 +59,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -90,7 +93,7 @@ $html = <<<EOD
EOD;
// Print text using writeHTMLCell()
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
// ---------------------------------------------------------

13
examples/example_002.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_002.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 002 for TCPDF class
// Removing Header and Footer
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -53,8 +53,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -72,7 +75,7 @@ Default page header and footer are disabled using setPrintHeader() and setPrintF
EOD;
// print a block of text using Write()
$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// ---------------------------------------------------------

13
examples/example_003.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_003.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 003 for TCPDF class
// Custom Header and Footer
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// Extend the TCPDF class to create custom Header and Footer
@ -84,8 +84,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -103,7 +106,7 @@ Custom page header and footer are defined by extending the TCPDF class and overr
EOD;
// print a block of text using Write()
$pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// ---------------------------------------------------------

11
examples/example_004.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_004.php
// Begin : 2008-03-04
// Last Update : 2010-10-08
// Last Update : 2013-05-14
//
// Description : Example 004 for TCPDF class
// Cell stretching
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_005.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_005.php
// Begin : 2008-03-04
// Last Update : 2010-10-04
// Last Update : 2013-05-14
//
// Description : Example 005 for TCPDF class
// Multicell
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

31
examples/example_006.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_006.php
// Begin : 2008-03-04
// Last Update : 2013-03-16
// Last Update : 2013-05-14
//
// Description : Example 006 for TCPDF class
// WriteHTML and RTL support
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -78,7 +81,7 @@ Some special characters: &lt; € &euro; &#8364; &amp; è &egrave; &copy; &gt; \
<h2>List</h2>
List example:
<ol>
<li><img src="../images/logo_example.png" alt="test alt attribute" width="30" height="30" border="0" /> test image</li>
<li><img src="images/logo_example.png" alt="test alt attribute" width="30" height="30" border="0" /> test image</li>
<li><b>bold text</b></li>
<li><i>italic text</i></li>
<li><u>underlined text</u></li>
@ -106,7 +109,7 @@ List example:
<dd>White cold drink</dd>
</dl>
<div style="text-align:center">IMAGES<br />
<img src="../images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" />
<img src="images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /><img src="images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /><img src="images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" />
</div>';
// output the HTML content
@ -209,13 +212,13 @@ $pdf->AddPage();
// create some HTML content
$html = '<h1>Image alignments on HTML table</h1>
<table cellpadding="1" cellspacing="1" border="1" style="text-align:center;">
<tr><td><img src="../images/logo_example.png" border="0" height="41" width="41" /></td></tr>
<tr style="text-align:left;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
<tr style="text-align:center;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
<tr style="text-align:right;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
<tr><td style="text-align:left;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
<tr><td style="text-align:center;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
<tr><td style="text-align:right;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
<tr><td><img src="images/logo_example.png" border="0" height="41" width="41" /></td></tr>
<tr style="text-align:left;"><td><img src="images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
<tr style="text-align:center;"><td><img src="images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
<tr style="text-align:right;"><td><img src="images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
<tr><td style="text-align:left;"><img src="images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
<tr><td style="text-align:center;"><img src="images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
<tr><td style="text-align:right;"><img src="images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
</table>';
// output the HTML content
@ -301,7 +304,7 @@ $pdf->AddPage();
$html = <<<EOF
<h1>Test custom bullet image for list items</h1>
<ul style="font-size:14pt;list-style-type:img|png|4|4|../images/logo_example.png">
<ul style="font-size:14pt;list-style-type:img|png|4|4|images/logo_example.png">
<li>test custom bullet image</li>
<li>test custom bullet image</li>
<li>test custom bullet image</li>

11
examples/example_007.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_007.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 007 for TCPDF class
// Two independent columns with WriteHTMLCell()
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_008.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_008.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 008 for TCPDF class
// Include external UTF-8 text file
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -73,7 +76,7 @@ $pdf->SetFont('freeserif', '', 12);
$pdf->AddPage();
// get esternal file content
$utf8text = file_get_contents('../cache/utf8test.txt', false);
$utf8text = file_get_contents('data/utf8test.txt', false);
// set color for text
$pdf->SetTextColor(0, 63, 127);

21
examples/example_009.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_009.php
// Begin : 2008-03-04
// Last Update : 2010-12-04
// Last Update : 2013-05-14
//
// Description : Example 009 for TCPDF class
// Test Image
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// -------------------------------------------------------------------
@ -83,7 +86,7 @@ $pdf->Image('@'.$imgdata);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Image example with resizing
$pdf->Image('../images/image_demo.jpg', 15, 140, 75, 113, 'JPG', 'http://www.tcpdf.org', '', true, 150, '', false, false, 1, false, false, false);
$pdf->Image('images/image_demo.jpg', 15, 140, 75, 113, 'JPG', 'http://www.tcpdf.org', '', true, 150, '', false, false, 1, false, false, false);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -103,7 +106,7 @@ for ($i = 0; $i < 3; ++$i) {
for ($j = 0; $j < 3; ++$j) {
$fitbox{1} = $vertical_alignments[$j];
$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,128));
$pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
$pdf->Image('images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
$x += 32; // new column
}
$y += 32; // new row
@ -119,7 +122,7 @@ for ($i = 0; $i < 3; ++$i) {
for ($j = 0; $j < 3; ++$j) {
$fitbox{1} = $vertical_alignments[$j];
$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,255));
$pdf->Image('../images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
$pdf->Image('images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false);
$x += 27; // new column
}
$y += 52; // new row
@ -130,8 +133,8 @@ for ($i = 0; $i < 3; ++$i) {
// Stretching, position and alignment example
$pdf->SetXY(110, 200);
$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', 'T', false, 300, '', false, false, 1, false, false, false);
$pdf->Image('../images/image_demo.jpg', '', '', 40, 40, '', '', '', false, 300, '', false, false, 1, false, false, false);
$pdf->Image('images/image_demo.jpg', '', '', 40, 40, '', '', 'T', false, 300, '', false, false, 1, false, false, false);
$pdf->Image('images/image_demo.jpg', '', '', 40, 40, '', '', '', false, 300, '', false, false, 1, false, false, false);
// -------------------------------------------------------------------

15
examples/example_010.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_010.php
// Begin : 2008-03-04
// Last Update : 2011-04-26
// Last Update : 2013-05-14
//
// Description : Example 010 for TCPDF class
// Text on multiple columns
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
/**
@ -126,16 +126,19 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
// print TEXT
$pdf->PrintChapter(1, 'LOREM IPSUM [TEXT]', '../cache/chapter_demo_1.txt', false);
$pdf->PrintChapter(1, 'LOREM IPSUM [TEXT]', 'data/chapter_demo_1.txt', false);
// print HTML
$pdf->PrintChapter(2, 'LOREM IPSUM [HTML]', '../cache/chapter_demo_2.txt', true);
$pdf->PrintChapter(2, 'LOREM IPSUM [HTML]', 'data/chapter_demo_2.txt', true);
// ---------------------------------------------------------

21
examples/example_011.php Executable file → Normal file
View File

@ -2,10 +2,10 @@
//============================================================+
// File name : example_011.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 011 for TCPDF class
// Colored Table
// Colored Table (very simple table)
//
// Author: Nicola Asuni
//
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// extend TCPF with custom functions
class MYPDF extends TCPDF {
@ -105,8 +105,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -116,18 +119,18 @@ $pdf->SetFont('helvetica', '', 12);
// add a page
$pdf->AddPage();
//Column titles
// column titles
$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
//Data loading
$data = $pdf->LoadData('../cache/table_data_demo.txt');
// data loading
$data = $pdf->LoadData('data/table_data_demo.txt');
// print colored table
$pdf->ColoredTable($header, $data);
// ---------------------------------------------------------
//Close and output PDF document
// close and output PDF document
$pdf->Output('example_011.pdf', 'I');
//============================================================+

Binary file not shown.

23
examples/example_012.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_012.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 012 for TCPDF class
// Graphic Functions
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -53,8 +53,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -155,10 +158,10 @@ $pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200,
$pdf->Text(185, 249, 'Arrows');
$pdf->SetLineStyle($style5);
$pdf->SetFillColor(255, 0, 0);
$pdf->Arrow($x0=200, $y0=280, $x1=185, $y1=266, $head_style=0, $arm_size=5, $arm_angle=15);
$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=263, $head_style=1, $arm_size=5, $arm_angle=15);
$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=261, $head_style=2, $arm_size=5, $arm_angle=15);
$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=3, $arm_size=5, $arm_angle=15);
$pdf->Arrow(200, 280, 185, 266, 0, 5, 15);
$pdf->Arrow(200, 280, 190, 263, 1, 5, 15);
$pdf->Arrow(200, 280, 195, 261, 2, 5, 15);
$pdf->Arrow(200, 280, 200, 260, 3, 5, 15);
// - . - . - . - . - . - . - . - . - . - . - . - . - . - . -
@ -185,11 +188,11 @@ $pdf->Line($xc-50, $yc+50, $xc+50, $yc-50);
// ellipse
$pdf->SetDrawColor(200, 255, 200);
$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=0, $afinish=360, $style='D', $line_style=array(), $fill_color=array(), $nc=2);
$pdf->Ellipse($xc, $yc, 30, 15, 45, 0, 360, 'D', array(), array(), 2);
// ellipse arc
$pdf->SetDrawColor(255, 0, 0);
$pdf->Ellipse($xc, $yc, $rx=30, $ry=15, $angle=45, $astart=45, $afinish=90, $style='D', $line_style=array(), $fill_color=array(), $nc=2);
$pdf->Ellipse($xc, $yc, 30, 15, 45, 45, 90, 'D', array(), array(), 2);
// ---------------------------------------------------------

11
examples/example_013.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_013.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 013 for TCPDF class
// Graphic Transformations
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_014.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_014.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 014 for TCPDF class
// Javascript Form and user rights (only works on Adobe Acrobat)
@ -25,8 +25,8 @@
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -59,8 +59,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -184,7 +187,7 @@ $pdf->IncludeJS($js);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_014.pdf', 'I');
$pdf->Output('example_014.pdf', 'D');
//============================================================+
// END OF FILE

15
examples/example_015.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_015.php
// Begin : 2008-03-04
// Last Update : 2013-01-28
// Last Update : 2013-05-14
//
// Description : Example 015 for TCPDF class
// Bookmarks (Table of Content)
@ -25,8 +25,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -59,8 +59,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -132,7 +135,7 @@ $pdf->SetFont('helvetica', '', 10);
$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// attach an external file TXT file
$pdf->Annotation(20, 50, 5, 5, 'TXT file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => '../cache/utf8test.txt'));
$pdf->Annotation(20, 50, 5, 5, 'TXT file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => 'data/utf8test.txt'));
// attach an external file
$pdf->Annotation(50, 50, 5, 5, 'PDF file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => 'example_012.pdf'));
@ -151,7 +154,7 @@ $pdf->Bookmark('External URL', 0, 0, '', 'B', array(0,0,255), -1, 'http://www.tc
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_015.pdf', 'I');
$pdf->Output('example_015.pdf', 'D');
//============================================================+
// END OF FILE

15
examples/example_016.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_016.php
// Begin : 2008-03-04
// Last Update : 2013-03-17
// Last Update : 2013-05-14
//
// Description : Example 016 for TCPDF class
// Document Encryption / Security
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -62,7 +62,7 @@ $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8',
*/
$pdf->SetProtection($permissions=array('print', 'copy'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null);
$pdf->SetProtection(array('print', 'copy'), '', null, 0, null);
// Example with public-key
// To open the document you need to install the private key (tcpdf.p12) on the Acrobat Reader. The password is: 1234
@ -99,8 +99,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -124,7 +127,7 @@ $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_016.pdf', 'I');
$pdf->Output('example_016.pdf', 'D');
//============================================================+
// END OF FILE

11
examples/example_017.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_017.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 017 for TCPDF class
// Two independent columns with MultiCell
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

8
examples/example_018.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_018.php
// Begin : 2008-03-06
// Last Update : 2011-10-01
// Last Update : 2013-05-14
//
// Description : Example 018 for TCPDF class
// RTL document with Persian language
@ -24,8 +24,8 @@
* @since 2008-03-06
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -65,7 +65,7 @@ $lg['a_meta_dir'] = 'rtl';
$lg['a_meta_language'] = 'fa';
$lg['w_page'] = 'page';
//set some language-dependent strings
// set some language-dependent strings (optional)
$pdf->setLanguageArray($lg);
// ---------------------------------------------------------

12
examples/example_019.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_019.php
// Begin : 2008-03-07
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 019 for TCPDF class
// Non unicode with alternative config file
@ -24,13 +24,13 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
// load alternative config file
require_once('../config/tcpdf_config_alt.php');
define("K_TCPDF_EXTERNAL_CONFIG", true);
require_once('config/tcpdf_config_alt.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
@ -73,7 +73,7 @@ $lg['a_meta_dir'] = 'ltr';
$lg['a_meta_language'] = 'en';
$lg['w_page'] = 'page';
//set some language-dependent strings
// set some language-dependent strings (optional)
$pdf->setLanguageArray($lg);
// ---------------------------------------------------------

11
examples/example_020.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_020.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 020 for TCPDF class
// Two columns composed by MultiCell of different
@ -25,8 +25,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// extend TCPF with custom functions
class MYPDF extends TCPDF {
@ -99,8 +99,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_021.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_021.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 021 for TCPDF class
// WriteHTML text flow
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_022.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_022.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 022 for TCPDF class
// CMYK colors
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_023.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_023.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 023 for TCPDF class
// Page Groups
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_024.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_024.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 024 for TCPDF class
// Object Visibility and Layers
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -130,7 +133,7 @@ $pdf->endLayer();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_024.pdf', 'I');
$pdf->Output('example_024.pdf', 'D');
//============================================================+
// END OF FILE

13
examples/example_025.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_025.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 025 for TCPDF class
// Object Transparency
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -100,7 +103,7 @@ $pdf->SetDrawColor(0, 0, 127);
$pdf->Rect(70, 80, 60, 60, 'DF');
// draw jpeg image
$pdf->Image('../images/image_demo.jpg', 90, 100, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
$pdf->Image('images/image_demo.jpg', 90, 100, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
// restore full opacity
$pdf->SetAlpha(1);

19
examples/example_026.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_026.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 026 for TCPDF class
// Text Rendering Modes and Text Clipping
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -91,25 +94,25 @@ $pdf->Write(0, 'Neither fill nor stroke text (invisible)', '', 0, '', true, 0, f
$pdf->StartTransform();
$pdf->setTextRenderingMode($stroke=0, $fill=true, $clip=true);
$pdf->Write(0, 'Fill text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
$pdf->Image('../images/image_demo.jpg', 15, 65, 170, 10, '', '', '', true, 72);
$pdf->Image('images/image_demo.jpg', 15, 65, 170, 10, '', '', '', true, 72);
$pdf->StopTransform();
$pdf->StartTransform();
$pdf->setTextRenderingMode($stroke=0.3, $fill=false, $clip=true);
$pdf->Write(0, 'Stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
$pdf->Image('../images/image_demo.jpg', 15, 75, 170, 10, '', '', '', true, 72);
$pdf->Image('images/image_demo.jpg', 15, 75, 170, 10, '', '', '', true, 72);
$pdf->StopTransform();
$pdf->StartTransform();
$pdf->setTextRenderingMode($stroke=0.3, $fill=true, $clip=true);
$pdf->Write(0, 'Fill, then stroke text and add to path for clipping', '', 0, '', true, 0, false, false, 0);
$pdf->Image('../images/image_demo.jpg', 15, 85, 170, 10, '', '', '', true, 72);
$pdf->Image('images/image_demo.jpg', 15, 85, 170, 10, '', '', '', true, 72);
$pdf->StopTransform();
$pdf->StartTransform();
$pdf->setTextRenderingMode($stroke=0, $fill=false, $clip=true);
$pdf->Write(0, 'Add text to path for clipping', '', 0, '', true, 0, false, false, 0);
$pdf->Image('../images/image_demo.jpg', 15, 95, 170, 10, '', '', '', true, 72);
$pdf->Image('images/image_demo.jpg', 15, 95, 170, 10, '', '', '', true, 72);
$pdf->StopTransform();
// reset text rendering mode

13
examples/example_027.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_027.php
// Begin : 2008-03-04
// Last Update : 2011-09-22
// Last Update : 2013-05-14
//
// Description : Example 027 for TCPDF class
// 1D Barcodes
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -73,7 +76,7 @@ $pdf->SetFont('helvetica', '', 11);
$pdf->AddPage();
// print a message
$txt = "You can also export 1D barcodes in other formats (PNG, SVG, HTML). Check the source code documentation of TCPDFBarcode class for further information.";
$txt = "You can also export 1D barcodes in other formats (PNG, SVG, HTML). Check the examples inside the barcodes directory.\n";
$pdf->MultiCell(70, 50, $txt, 0, 'J', false, 1, 125, 30, true, 0, false, true, 0, 'T', false);
$pdf->SetY(30);

11
examples/example_028.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_028.php
// Begin : 2008-03-04
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 028 for TCPDF class
// Changing page formats
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -53,8 +53,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_029.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_029.php
// Begin : 2008-06-09
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 029 for TCPDF class
// Set PDF viewer display preferences.
@ -24,8 +24,8 @@
* @since 2008-06-09
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -114,7 +117,7 @@ $pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 3', 0, 0, 'C');
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_029.pdf', 'I');
$pdf->Output('example_029.pdf', 'D');
//============================================================+
// END OF FILE

15
examples/example_030.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_030.php
// Begin : 2008-06-09
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 030 for TCPDF class
// Colour gradients
@ -24,8 +24,8 @@
* @since 2008-06-09
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -105,7 +108,7 @@ $pdf->CoonsPatchMesh(20, 155, 80, 80, $yellow, $blue, $green, $red);
// write label
$pdf->Text(20, 240, 'CoonsPatchMesh()');
// set the coordinates for the cubic Bézier points x1,y1 ... x12, y12 of the patch (see coons_patch_mesh_coords.jpg)
// set the coordinates for the cubic Bézier points x1,y1 ... x12, y12 of the patch (see coons_patch_mesh_coords.jpg)
$coords = array(
0.00,0.00, 0.33,0.20, //lower left
0.67,0.00, 1.00,0.00, 0.80,0.33, //lower right
@ -178,7 +181,7 @@ $pdf->Text(10, 250, 'CoonsPatchMesh()');
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_030.pdf', 'I');
$pdf->Output('example_030.pdf', 'D');
//============================================================+
// END OF FILE

11
examples/example_031.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_031.php
// Begin : 2008-06-09
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 031 for TCPDF class
// Pie Chart
@ -24,8 +24,8 @@
* @since 2008-06-09
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

17
examples/example_032.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_032.php
// Begin : 2008-06-09
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 032 for TCPDF class
// EPS/AI image
@ -24,8 +24,8 @@
* @since 2008-06-09
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -70,15 +73,15 @@ $pdf->AddPage();
$pdf->Write(0, 'Example of ImageEPS() method for AI and EPS images');
$pdf->ImageEps($file='../images/tiger.ai', $x=10, $y=50, $w=190, $h=190, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false);
$pdf->ImageEps($file='images/tiger.ai', $x=10, $y=50, $w=190, $h=190, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false);
$pdf->AddPage();
$pdf->ImageEps('../images/bug.eps', 0, 25, 0, 240, "http://www.tcpdf.org", true, 'T', 'C');
$pdf->ImageEps('images/bug.eps', 0, 25, 0, 240, "http://www.tcpdf.org", true, 'T', 'C');
$pdf->AddPage();
$pdf->ImageEps('../images/pelican.ai', 15, 70, 180);
$pdf->ImageEps('images/pelican.ai', 15, 70, 180);
// ---------------------------------------------------------

11
examples/example_033.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_033.php
// Begin : 2008-06-24
// Last Update : 2011-10-01
// Last Update : 2013-05-14
//
// Description : Example 033 for TCPDF class
// Mixed font types
@ -24,8 +24,8 @@
* @since 2008-06-24
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_034.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_034.php
// Begin : 2008-07-18
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 034 for TCPDF class
// Clipping
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -78,7 +81,7 @@ $pdf->StartTransform();
$pdf->StarPolygon(105, 100, 30, 10, 3, 0, 1, 'CNZ');
// draw jpeg image to be clipped
$pdf->Image('../images/image_demo.jpg', 75, 70, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
$pdf->Image('images/image_demo.jpg', 75, 70, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
//Stop Graphic Transformation
$pdf->StopTransform();

11
examples/example_035.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_035.php
// Begin : 2008-07-22
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 035 for TCPDF class
// Line styles with cells and multicells
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_036.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_036.php
// Begin : 2008-08-08
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 036 for TCPDF class
// Annotations
@ -24,8 +24,8 @@
* @since 2008-08-08
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_037.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_037.php
// Begin : 2008-09-12
// Last Update : 2011-10-03
// Last Update : 2013-05-14
//
// Description : Example 037 for TCPDF class
// Spot colors
@ -24,8 +24,8 @@
* @since 2008-09-12
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -69,7 +72,7 @@ $pdf->SetFont('helvetica', '', 11);
// add a page
$pdf->AddPage();
$html = '<h1>Example of Spot Colors</h1>Spot colors are single ink colors, rather than colors produced by four (CMYK), six (CMYKOG) or more inks in the printing process (process colors). They can be obtained by special vendors, but often the printers have found their own way of mixing inks to match defined colors.<br /><br />As long as no open standard for spot colours exists, TCPDF users will have to buy a colour book by one of the colour manufacturers and insert the values and names of spot colours directly into <b><em>spotcolors.php</em></b> file, or define them using the <b><em>AddSpotColor()</em></b> method.<br /><br />Common industry standard spot colors are:<br /><span color="#008800">ANPA-COLOR, DIC, FOCOLTONE, GCMI, HKS, PANTONE, TOYO, TRUMATCH</span>.';
$html = '<h1>Example of Spot Colors</h1>Spot colors are single ink colors, rather than colors produced by four (CMYK), six (CMYKOG) or more inks in the printing process (process colors). They can be obtained by special vendors, but often the printers have found their own way of mixing inks to match defined colors.<br /><br />As long as no open standard for spot colours exists, TCPDF users will have to buy a colour book by one of the colour manufacturers and insert the values and names of spot colours directly into the $spotcolor array in <b><em>include/tcpdf_colors.php</em></b> file, or define them using the <b><em>AddSpotColor()</em></b> method.<br /><br />Common industry standard spot colors are:<br /><span color="#008800">ANPA-COLOR, DIC, FOCOLTONE, GCMI, HKS, PANTONE, TOYO, TRUMATCH</span>.';
// Print text using writeHTMLCell()
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, 'J', true);

20
examples/example_038.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_038.php
// Begin : 2008-09-15
// Last Update : 2011-10-01
// Last Update : 2013-05-14
//
// Description : Example 038 for TCPDF class
// CID-0 CJK unembedded font
@ -24,8 +24,8 @@
* @since 2008-09-15
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,20 +58,28 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// 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('cid0jp', '', 20);
$pdf->SetFont('helvetica', '', 20);
// add a page
$pdf->AddPage();
$txt = 'Example of CID-0 CJK unembedded font.
To display extended text you must have CJK fonts for your PDF reader: こんにちは世界';
To display extended text you must have CJK fonts installed for your PDF reader:';
$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// set font
$pdf->SetFont('cid0jp', '', 40);
$txt = 'こんにちは世界';
$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// ---------------------------------------------------------

13
examples/example_039.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_039.php
// Begin : 2008-10-16
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 039 for TCPDF class
// HTML justification
@ -24,8 +24,8 @@
* @since 2008-10-18
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -72,7 +75,7 @@ $pdf->SetFont('helvetica', 'B', 20);
$pdf->Write(0, 'Example of HTML Justification', '', 0, 'L', true, 0, false, false, 0);
// create some HTML content
$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl abcdef abcdefg <b>abcdefghi</b> a abc abcd <img src="../images/logo_example.png" border="0" height="41" width="41" /> <img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl abcdef abcdefg <b>abcdefghi</b> a abc abcd <img src="images/logo_example.png" border="0" height="41" width="41" /> <img src="images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
// set core font
$pdf->SetFont('helvetica', '', 10);

11
examples/example_040.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_040.php
// Begin : 2008-10-28
// Last Update : 2010-08-31
// Last Update : 2013-05-14
//
// Description : Example 040 for TCPDF class
// Booklet mode (double-sided pages)
@ -24,8 +24,8 @@
* @since 2008-10-28
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

15
examples/example_041.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_041.php
// Begin : 2008-12-07
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 041 for TCPDF class
// Annotation - FileAttachment
@ -24,8 +24,8 @@
* @since 2008-12-07
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -75,12 +78,12 @@ Double click on the icon to open the attached file.';
$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// attach an external file
$pdf->Annotation(85, 27, 5, 5, 'text file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => '../cache/utf8test.txt'));
$pdf->Annotation(85, 27, 5, 5, 'text file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => 'data/utf8test.txt'));
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_041.pdf', 'I');
$pdf->Output('example_041.pdf', 'D');
//============================================================+
// END OF FILE

17
examples/example_042.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_042.php
// Begin : 2008-12-23
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 042 for TCPDF class
// Test Image with alpha channel
@ -24,8 +24,8 @@
* @since 2008-12-23
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -78,16 +81,16 @@ $pdf->MultiCell(0, 5, $background_text, 0, 'J', 0, 2, '', '', true, 0, false);
// --- Method (A) ------------------------------------------
// the Image() method recognizes the alpha channel embedded on the image:
$pdf->Image('../images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300);
$pdf->Image('images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300);
// --- Method (B) ------------------------------------------
// provide image + separate 8-bit mask
// first embed mask image (w, h, x and y will be ignored, the image will be scaled to the target image's size)
$mask = $pdf->Image('../images/alpha.png', 50, 140, 100, '', '', '', '', false, 300, '', true);
$mask = $pdf->Image('images/alpha.png', 50, 140, 100, '', '', '', '', false, 300, '', true);
// embed image, masked with previously embedded mask
$pdf->Image('../images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '', false, 300, '', false, $mask);
$pdf->Image('images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '', false, 300, '', false, $mask);
// ---------------------------------------------------------

11
examples/example_043.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_043.php
// Begin : 2009-01-02
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 043 for TCPDF class
// Disk caching
@ -24,8 +24,8 @@
* @since 2009-01-02
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', true);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_044.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_044.php
// Begin : 2009-01-02
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 044 for TCPDF class
// Move, copy and delete pages
@ -24,8 +24,8 @@
* @since 2009-01-02
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_045.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_045.php
// Begin : 2008-03-04
// Last Update : 2011-04-15
// Last Update : 2013-05-14
//
// Description : Example 045 for TCPDF class
// Bookmarks and Table of Content
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -120,7 +123,7 @@ $pdf->endTOCPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_045.pdf', 'I');
$pdf->Output('example_045.pdf', 'D');
//============================================================+
// END OF FILE

15
examples/example_046.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_046.php
// Begin : 2009-02-28
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 046 for TCPDF class
// Text Hyphenation
@ -24,8 +24,8 @@
* @since 2009-02-28
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -94,9 +97,9 @@ Unicode Data for SHY:
$html = 'On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.';
$hyphen_patterns = $pdf->getHyphenPatternsFromTEX('../hyphens/hyph-en-gb.tex');
$hyphen_patterns = $pdf->getHyphenPatternsFromTEX('hyphens/hyph-en-gb.tex');
$html = $pdf->hyphenateText($html, $hyphen_patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8);
$html = $pdf->hyphenateText($html, $hyphen_patterns, array(), 1, 2, 1, 8);
*/

11
examples/example_047.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_047.php
// Begin : 2009-03-19
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 047 for TCPDF class
// Transactions
@ -24,8 +24,8 @@
* @since 2009-03-19
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

11
examples/example_048.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_048.php
// Begin : 2009-03-20
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 048 for TCPDF class
// HTML tables and table headers
@ -24,8 +24,8 @@
* @since 2009-03-20
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_049.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_049.php
// Begin : 2009-04-03
// Last Update : 2013-03-16
// Last Update : 2013-05-14
//
// Description : Example 049 for TCPDF class
// WriteHTML with TCPDF callback functions
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -86,7 +89,7 @@ serializeTCPDFtagParameters() method (see the example below).
$html = '<h1>Test TCPDF Methods in HTML</h1>
<h2 style="color:red;">IMPORTANT:</h2>
<span style="color:red;">If you are printing user-generated content, tcpdf tag can be unsafe.<br />
<span style="color:red;">If you are using user-generated content, the tcpdf tag can be unsafe.<br />
You can disable this tag by setting to false the <b>K_TCPDF_CALLS_IN_HTML</b> constant on TCPDF configuration file.</span>
<h2>write1DBarcode method in HTML</h2>';

13
examples/example_050.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_050.php
// Begin : 2009-04-09
// Last Update : 2011-09-22
// Last Update : 2013-05-14
//
// Description : Example 050 for TCPDF class
// 2D Barcodes
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -72,7 +75,7 @@ $pdf->SetFont('helvetica', '', 11);
$pdf->AddPage();
// print a message
$txt = "You can also export 2D barcodes in other formats (PNG, SVG, HTML). Check the source code documentation of TCPDF2DBarcode class for further information.";
$txt = "You can also export 2D barcodes in other formats (PNG, SVG, HTML). Check the examples inside the barcode directory.\n";
$pdf->MultiCell(70, 50, $txt, 0, 'J', false, 1, 125, 30, true, 0, false, true, 0, 'T', false);

11
examples/example_051.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_051.php
// Begin : 2009-04-16
// Last Update : 2011-06-01
// Last Update : 2013-05-14
//
// Description : Example 051 for TCPDF class
// Full page background
@ -24,8 +24,8 @@
* @since 2009-04-16
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// Extend the TCPDF class to create custom Header and Footer
@ -78,8 +78,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

17
examples/example_052.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_052.php
// Begin : 2009-05-07
// Last Update : 2013-03-17
// Last Update : 2013-05-14
//
// Description : Example 052 for TCPDF class
// Certification Signature (experimental)
@ -24,8 +24,8 @@
* @since 2009-05-07
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -71,7 +74,7 @@ NOTES:
*/
// set certificate file
$certificate = 'file://../config/cert/tcpdf.crt';
$certificate = 'file://data/cert/tcpdf.crt';
// set additional information
$info = array(
@ -98,7 +101,7 @@ $pdf->writeHTML($text, true, 0, true, 0);
// *** set signature appearance ***
// create content for signature (image and/or text)
$pdf->Image('../images/tcpdf_signature.png', 180, 60, 15, 15, 'PNG');
$pdf->Image('images/tcpdf_signature.png', 180, 60, 15, 15, 'PNG');
// define active area for signature appearance
$pdf->setSignatureAppearance(180, 60, 15, 15);
@ -111,7 +114,7 @@ $pdf->addEmptySignatureAppearance(180, 80, 15, 15);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_052.pdf', 'I');
$pdf->Output('example_052.pdf', 'D');
//============================================================+
// END OF FILE

13
examples/example_053.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_053.php
// Begin : 2009-09-02
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 053 for TCPDF class
// Javascript example.
@ -24,8 +24,8 @@
* @since 2009-09-02
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -98,7 +101,7 @@ $pdf->IncludeJS($js);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_053.pdf', 'I');
$pdf->Output('example_053.pdf', 'D');
//============================================================+
// END OF FILE

13
examples/example_054.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_054.php
// Begin : 2009-09-07
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 054 for TCPDF class
// XHTML Forms
@ -24,8 +24,8 @@
* @since 2009-09-07
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -118,7 +121,7 @@ $pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_054.pdf', 'I');
$pdf->Output('example_054.pdf', 'D');
//============================================================+
// END OF FILE

16
examples/example_055.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_055.php
// Begin : 2009-10-21
// Last Update : 2011-01-01
// Last Update : 2013-05-14
//
// Description : Example 055 for TCPDF class
// Display all characters available on core fonts.
@ -24,8 +24,8 @@
* @since 2009-10-21
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -105,7 +108,8 @@ foreach($core_fonts as $font) {
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_055.pdf', 'I');
$pdf->Output('example_055.pdf', 'D');
//============================================================+
// END OF FILE //============================================================+
// END OF FILE
//============================================================+

11
examples/example_056.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_056.php
// Begin : 2010-03-26
// Last Update : 2011-12-10
// Last Update : 2013-05-14
//
// Description : Example 056 for TCPDF class
// Crop marks and color registration bars
@ -24,8 +24,8 @@
* @since 2010-03-26
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

13
examples/example_057.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_057.php
// Begin : 2010-04-03
// Last Update : 2010-10-05
// Last Update : 2013-05-14
//
// Description : Example 057 for TCPDF class
// Cell vertical alignments
@ -24,8 +24,8 @@
* @since 2008-03-04
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -124,7 +127,7 @@ $pdf->Line(15, 120, 195, 120, $linestyle);
// Print an image to explain cell measures
$pdf->Image('../images/tcpdf_cell.png', 15, 160, 100, 100, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false);
$pdf->Image('images/tcpdf_cell.png', 15, 160, 100, 100, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false);
$legend = 'LEGEND:
X: cell x top-left origin (top-right for RTL)

17
examples/example_058.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_058.php
// Begin : 2010-04-22
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 058 for TCPDF class
// SVG Image
@ -24,8 +24,8 @@
* @since 2010-05-02
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -72,9 +75,9 @@ $pdf->AddPage();
// NOTE: Uncomment the following line to rasterize SVG image using the ImageMagick library.
//$pdf->setRasterizeVectorImages(true);
$pdf->ImageSVG($file='../images/testsvg.svg', $x=15, $y=30, $w='', $h='', $link='http://www.tcpdf.org', $align='', $palign='', $border=1, $fitonpage=false);
$pdf->ImageSVG($file='images/testsvg.svg', $x=15, $y=30, $w='', $h='', $link='http://www.tcpdf.org', $align='', $palign='', $border=1, $fitonpage=false);
$pdf->ImageSVG($file='../images/tux.svg', $x=30, $y=100, $w='', $h=100, $link='', $align='', $palign='', $border=0, $fitonpage=false);
$pdf->ImageSVG($file='images/tux.svg', $x=30, $y=100, $w='', $h=100, $link='', $align='', $palign='', $border=0, $fitonpage=false);
$pdf->SetFont('helvetica', '', 8);
$pdf->SetY(195);
@ -84,7 +87,7 @@ $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_058.pdf', 'I');
$pdf->Output('example_058.pdf', 'D');
//============================================================+
// END OF FILE

13
examples/example_059.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_059.php
// Begin : 2010-05-06
// Last Update : 2011-04-15
// Last Update : 2013-05-14
//
// Description : Example 059 for TCPDF class
// Table Of Content using HTML templates.
@ -24,8 +24,8 @@
* @since 2010-05-06
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
/**
* TCPDF class extension with custom header and footer for TOC page
@ -93,8 +93,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// 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('helvetica', '', 10);
@ -180,7 +183,7 @@ $pdf->endTOCPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_059.pdf', 'I');
$pdf->Output('example_059.pdf', 'D');
//============================================================+
// END OF FILE

11
examples/example_060.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_060.php
// Begin : 2010-05-17
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 060 for TCPDF class
// Advanced page settings.
@ -24,8 +24,8 @@
* @since 2010-05-17
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// 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('helvetica', '', 20);

84
examples/example_061.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_061.php
// Begin : 2010-05-24
// Last Update : 2010-08-08
// Last Update : 2013-05-14
//
// Description : Example 061 for TCPDF class
// XHTML + CSS
@ -24,8 +24,8 @@
* @since 2010-05-25
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -202,60 +205,37 @@ $pdf->writeHTML($html, true, false, true, false, '');
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// *******************************************************************
// HTML TIPS & TRICKS
// *******************************************************************
// add a page
$pdf->AddPage();
// REMOVE CELL PADDING
//
// $pdf->SetCellPadding(0);
//
// This is used to remove any additional vertical space inside a
// single cell of text.
$html = '
<h1>HTML TIPS & TRICKS</h1>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<h3>REMOVE CELL PADDING</h3>
<pre>$pdf->SetCellPadding(0);</pre>
This is used to remove any additional vertical space inside a single cell of text.
// REMOVE TAG TOP AND BOTTOM MARGINS
//
// $tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n' => 0)));
// $pdf->setHtmlVSpace($tagvs);
//
// Since the CSS margin command is not yet implemented on TCPDF, you
// need to set the spacing of block tags using the following method.
<h3>REMOVE TAG TOP AND BOTTOM MARGINS</h3>
<pre>$tagvs = array(\'p\' => array(0 => array(\'h\' => 0, \'n\' => 0), 1 => array(\'h\' => 0, \'n\' => 0)));
$pdf->setHtmlVSpace($tagvs);</pre>
Since the CSS margin command is not yet implemented on TCPDF, you need to set the spacing of block tags using the following method.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<h3>SET LINE HEIGHT</h3>
<pre>$pdf->setCellHeightRatio(1.25);</pre>
You can use the following method to fine tune the line height (the number is a percentage relative to font height).
// SET LINE HEIGHT
//
// $pdf->setCellHeightRatio(1.25);
//
// You can use the following method to fine tune the line height
// (the number is a percentage relative to font height).
<h3>CHANGE THE PIXEL CONVERSION RATIO</h3>
<pre>$pdf->setImageScale(0.47);</pre>
This is used to adjust the conversion ratio between pixels and document units. Increase the value to get smaller objects.<br />
Since you are using pixel unit, this method is important to set theright zoom factor.<br /><br />
Suppose that you want to print a web page larger 1024 pixels to fill all the available page width.<br />
An A4 page is larger 210mm equivalent to 8.268 inches, if you subtract 13mm (0.512") of margins for each side, the remaining space is 184mm (7.244 inches).<br />
The default resolution for a PDF document is 300 DPI (dots per inch), so you have 7.244 * 300 = 2173.2 dots (this is the maximum number of points you can print at 300 DPI for the given width).<br />
The conversion ratio is approximatively 1024 / 2173.2 = 0.47 px/dots<br />
If the web page is larger 1280 pixels, on the same A4 page the conversion ratio to use is 1280 / 2173.2 = 0.59 pixels/dots';
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// CHANGE THE PIXEL CONVERSION RATIO
//
// $pdf->setImageScale(0.47);
//
// This is used to adjust the conversion ratio between pixels and
// document units. Increase the value to get smaller objects.
// Since you are using pixel unit, this method is important to set the
// right zoom factor.
//
// Suppose that you want to print a web page larger 1024 pixels to
// fill all the available page width.
// An A4 page is larger 210mm equivalent to 8.268 inches, if you
// subtract 13mm (0.512") of margins for each side, the remaining
// space is 184mm (7.244 inches).
// The default resolution for a PDF document is 300 DPI (dots per
// inch), so you have 7.244 * 300 = 2173.2 dots (this is the maximum
// number of points you can print at 300 DPI for the given width).
// The conversion ratio is approximatively 1024 / 2173.2 = 0.47 px/dots
// If the web page is larger 1280 pixels, on the same A4 page the
// conversion ratio to use is 1280 / 2173.2 = 0.59 pixels/dots
// *******************************************************************
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
// reset pointer to the last page
$pdf->lastPage();

13
examples/example_062.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_062.php
// Begin : 2010-08-25
// Last Update : 2011-08-04
// Last Update : 2013-05-14
//
// Description : Example 062 for TCPDF class
// XObject Template
@ -24,8 +24,8 @@
* @since 2010-08-25
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -94,7 +97,7 @@ $pdf->StartTransform();
$pdf->StarPolygon(30, 30, 29, 10, 3, 0, 1, 'CNZ');
// draw jpeg image to be clipped
$pdf->Image('../images/image_demo.jpg', 0, 0, 60, 60, '', '', '', true, 72, '', false, false, 0, false, false, false);
$pdf->Image('images/image_demo.jpg', 0, 0, 60, 60, '', '', '', true, 72, '', false, false, 0, false, false, false);
//Stop Graphic Transformation
$pdf->StopTransform();

11
examples/example_063.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_063.php
// Begin : 2010-09-29
// Last Update : 2012-06-21
// Last Update : 2013-05-14
//
// Description : Example 063 for TCPDF class
// Text stretching and spacing (tracking)
@ -24,8 +24,8 @@
* @since 2010-09-29
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

17
examples/example_064.php Executable file → Normal file
View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_064.php
// Begin : 2010-10-13
// Last Update : 2010-10-15
// Last Update : 2013-05-14
//
// Description : Example 064 for TCPDF class
// No-write page regions
@ -24,8 +24,8 @@
* @since 2010-10-14
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
@ -70,7 +73,7 @@ $pdf->SetFont('helvetica', '', 8);
// define some html content for testing
$txt = '<p style="text-align:justify;color:blue;font-size:12pt;"><span style="color:red;font-size:14pt;font-weight:bold;">TEST PAGE REGIONS:</span> <span style="color:green;">A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. A region is always aligned on the left or right side of the page ad is defined using a vertical segment. You can set multiple regions for the same page. You can combine several adjacent regions to aproximate curved shapes.</span> 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. <img src="../images/image_demo.jpg" width="5mm" height="5mm" /> Phasellus vel lorem eu lectus porta sodales. Etiam neque tortor, sagittis id pharetra quis, laoreet vel arcu.
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. <img src="images/image_demo.jpg" width="5mm" height="5mm" /> 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.</p>';
@ -79,8 +82,8 @@ Nulla facilisi. Cras varius quam eget libero aliquam vitae tincidunt leo rutrum.
$pdf->AddPage();
// print some graphic content
$pdf->Image('../images/image_demo.jpg', 155, 30, 40, 40, 'JPG', '', '', true);
$pdf->Image('../images/image_demo.jpg', 15, 230, 40, 40, 'JPG', '', '', true);
$pdf->Image('images/image_demo.jpg', 155, 30, 40, 40, 'JPG', '', '', true);
$pdf->Image('images/image_demo.jpg', 15, 230, 40, 40, 'JPG', '', '', true);
// define some graphic styles
$styleA = array('width' => 0.254, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0));

View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_065.php
// Begin : 2011-09-28
// Last Update : 2011-09-28
// Last Update : 2013-05-14
//
// Description : Example 065 for TCPDF class
// Creates an example PDF/A-1b document using TCPDF
@ -24,8 +24,8 @@
* @since 2011-09-28
*/
require_once('../config/lang/eng.php');
require_once('../tcpdf.php');
// Include the main TCPDF library (search for installation path).
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false, true);
@ -58,8 +58,11 @@ $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
// set some language-dependent strings (optional)
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------

0
images/_blank.png → examples/images/_blank.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

0
images/alpha.png → examples/images/alpha.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
images/bug.eps → examples/images/bug.eps Executable file → Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 560 KiB

After

Width:  |  Height:  |  Size: 560 KiB

View File

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

0
images/img.png → examples/images/img.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

0
images/pelican.ai → examples/images/pelican.ai Executable file → Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

0
images/testsvg.svg → examples/images/testsvg.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
images/tiger.ai → examples/images/tiger.ai Executable file → Normal file
View File

0
images/tux.svg → examples/images/tux.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

0
examples/index.php Executable file → Normal file
View File

0
config/lang/afr.php → examples/lang/afr.php Executable file → Normal file
View File

0
config/lang/ara.php → examples/lang/ara.php Executable file → Normal file
View File

0
config/lang/aze.php → examples/lang/aze.php Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More