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.
8
CHANGELOG.TXT
Executable file → Normal 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
6
README.TXT
Executable file → Normal 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:
|
||||
|
@ -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",
|
||||
|
119
config/tcpdf_config.php
Executable file → Normal 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,26 +51,44 @@ 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/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
@ -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>
|
125
config/tcpdf_config_alt.php → examples/config/tcpdf_config_alt.php
Executable file → Normal 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
0
config/cert/tcpdf.fdf → examples/data/cert/tcpdf.fdf
Executable file → Normal file
0
config/cert/tcpdf.p12 → examples/data/cert/tcpdf.p12
Executable file → Normal file
0
cache/chapter_demo_1.txt → examples/data/chapter_demo_1.txt
Executable file → Normal file
4
cache/chapter_demo_2.txt → examples/data/chapter_demo_2.txt
Executable file → Normal 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>
|
||||
|
0
cache/table_data_demo.txt → examples/data/table_data_demo.txt
Executable file → Normal file
0
cache/utf8test.txt → examples/data/utf8test.txt
Executable file → Normal file
23
examples/example_001.php
Executable file → Normal 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));
|
||||
@ -48,19 +48,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
23
examples/example_002.php
Executable file → Normal 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);
|
||||
@ -44,17 +44,20 @@ $pdf->setPrintFooter(false);
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -80,5 +83,5 @@ $pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $fi
|
||||
$pdf->Output('example_002.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
23
examples/example_003.php
Executable file → Normal 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
|
||||
@ -73,19 +73,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -111,5 +114,5 @@ $pdf->Write($h=0, $txt, $link='', $fill=0, $align='C', $ln=true, $stretch=0, $fi
|
||||
$pdf->Output('example_003.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
19
examples/example_004.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
19
examples/example_005.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
41
examples/example_006.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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: < € € € & è è © > \
|
||||
<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>
|
||||
@ -323,5 +326,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_006.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_007.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -106,5 +109,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_007.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
23
examples/example_008.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
@ -90,5 +93,5 @@ $pdf->Write(5, $utf8text, '', 0, '', false, 0, false, false, 0);
|
||||
$pdf->Output('example_008.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
29
examples/example_009.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
23
examples/example_010.php
Executable file → Normal 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');
|
||||
|
||||
|
||||
/**
|
||||
@ -115,27 +115,30 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
31
examples/example_011.php
Executable file → Normal 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 {
|
||||
@ -94,19 +94,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,20 +119,20 @@ $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');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
31
examples/example_012.php
Executable file → Normal 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);
|
||||
@ -44,17 +44,20 @@ $pdf->setPrintFooter(false);
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
19
examples/example_013.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
21
examples/example_014.php
Executable file → Normal 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);
|
||||
@ -48,19 +48,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
23
examples/example_015.php
Executable file → Normal 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);
|
||||
@ -48,19 +48,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
23
examples/example_016.php
Executable file → Normal 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
|
||||
@ -88,19 +88,22 @@ $pdf->setFooterFont(Array('helvetica', '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
21
examples/example_017.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -110,5 +113,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_017.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
14
examples/example_018.php
Executable file → Normal 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);
|
||||
@ -47,15 +47,15 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
// set some language dependent data:
|
||||
@ -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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
18
examples/example_019.php
Executable file → Normal 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);
|
||||
@ -55,15 +55,15 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
// set some language dependent data:
|
||||
@ -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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
39
examples/example_020.php
Executable file → Normal 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,32 +25,32 @@
|
||||
* @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 {
|
||||
|
||||
|
||||
public function MultiRow($left, $right) {
|
||||
// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0)
|
||||
|
||||
|
||||
$page_start = $this->getPage();
|
||||
$y_start = $this->GetY();
|
||||
|
||||
|
||||
// write the left cell
|
||||
$this->MultiCell(40, 0, $left, 1, 'R', 1, 2, '', '', true, 0);
|
||||
|
||||
|
||||
$page_end_1 = $this->getPage();
|
||||
$y_end_1 = $this->GetY();
|
||||
|
||||
|
||||
$this->setPage($page_start);
|
||||
|
||||
|
||||
// write the right cell
|
||||
$this->MultiCell(0, 0, $right, 1, 'J', 0, 1, $this->GetX() ,$y_start, true, 0);
|
||||
|
||||
|
||||
$page_end_2 = $this->getPage();
|
||||
$y_end_2 = $this->GetY();
|
||||
|
||||
|
||||
// set the new row position by case
|
||||
if (max($page_end_1,$page_end_2) == $page_start) {
|
||||
$ynew = max($y_end_1, $y_end_2);
|
||||
@ -61,7 +61,7 @@ class MYPDF extends TCPDF {
|
||||
} else {
|
||||
$ynew = $y_end_2;
|
||||
}
|
||||
|
||||
|
||||
$this->setPage(max($page_end_1,$page_end_2));
|
||||
$this->SetXY($this->GetX(),$ynew);
|
||||
}
|
||||
@ -88,19 +88,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -139,5 +142,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_020.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_021.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -84,5 +87,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_021.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
19
examples/example_022.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
21
examples/example_023.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -106,5 +109,5 @@ $pdf->Cell(0, 10, 'This is the fourth page of group 2', 0, 1, 'L');
|
||||
$pdf->Output('example_023.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
23
examples/example_024.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,8 +133,8 @@ $pdf->endLayer();
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_024.pdf', 'I');
|
||||
$pdf->Output('example_024.pdf', 'D');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_025.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
27
examples/example_026.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
21
examples/example_027.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
|
21
examples/example_028.php
Executable file → Normal 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);
|
||||
@ -44,17 +44,20 @@ $pdf->setPrintFooter(false);
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(10, PDF_MARGIN_TOP, 10);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -131,5 +134,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_028.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
23
examples/example_029.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,8 +117,8 @@ $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
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
25
examples/example_030.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,8 +181,8 @@ $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
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
19
examples/example_031.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
27
examples/example_032.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -86,5 +89,5 @@ $pdf->ImageEps('../images/pelican.ai', 15, 70, 180);
|
||||
$pdf->Output('example_032.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
19
examples/example_033.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
23
examples/example_034.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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();
|
||||
@ -89,5 +92,5 @@ $pdf->StopTransform();
|
||||
$pdf->Output('example_034.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_035.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -104,5 +107,5 @@ $pdf->MultiCell(60, 4, $text, 1, 'C', 1, 1);
|
||||
$pdf->Output('example_035.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_036.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -82,5 +85,5 @@ $pdf->Annotation(83, 27, 10, 10, "Text annotation example\naccented letters test
|
||||
$pdf->Output('example_036.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_037.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
28
examples/example_038.php
Executable file → Normal 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);
|
||||
@ -47,31 +47,39 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
23
examples/example_039.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
@ -97,5 +100,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_039.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_040.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -109,5 +112,5 @@ $pdf->Cell(0, 0, 'PAGE 4', 1, 1, 'C');
|
||||
$pdf->Output('example_040.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
25
examples/example_041.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,13 +78,13 @@ 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
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
27
examples/example_042.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -95,5 +98,5 @@ $pdf->Image('../images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '
|
||||
$pdf->Output('example_042.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_043.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,5 +81,5 @@ $pdf->MultiCell(0, 0, 'DISK CACHING TEST: check the parameters of the class cons
|
||||
$pdf->Output('example_043.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
19
examples/example_044.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
21
examples/example_045.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
23
examples/example_046.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
*/
|
||||
|
||||
|
||||
|
23
examples/example_047.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -102,7 +105,7 @@ $pdf->startTransaction();
|
||||
$pdf->Write(0, "LINE 7\n");
|
||||
|
||||
// commit transaction (actually just frees memory)
|
||||
$pdf->commitTransaction();
|
||||
$pdf->commitTransaction();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -110,5 +113,5 @@ $pdf->commitTransaction();
|
||||
$pdf->Output('example_047.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
27
examples/example_048.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -89,7 +92,7 @@ $tbl = <<<EOD
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
@ -111,7 +114,7 @@ $tbl = <<<EOD
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
@ -133,7 +136,7 @@ $tbl = <<<EOD
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
@ -306,5 +309,5 @@ $pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
$pdf->Output('example_048.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
25
examples/example_049.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -77,8 +80,8 @@ If you are printing user-generated content, tcpdf tag can be unsafe.
|
||||
You can disable this tag by setting to false the K_TCPDF_CALLS_IN_HTML
|
||||
constant on TCPDF configuration file.
|
||||
|
||||
For security reasons, the parameters for the 'params' attribute of TCPDF
|
||||
tag must be prepared as an array and encoded with the
|
||||
For security reasons, the parameters for the 'params' attribute of TCPDF
|
||||
tag must be prepared as an array and encoded with the
|
||||
serializeTCPDFtagParameters() method (see the example below).
|
||||
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
@ -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>';
|
||||
|
||||
|
21
examples/example_050.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
||||
|
||||
|
19
examples/example_051.php
Executable file → Normal 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
|
||||
@ -64,7 +64,7 @@ $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(0);
|
||||
$pdf->SetFooterMargin(0);
|
||||
@ -72,14 +72,17 @@ $pdf->SetFooterMargin(0);
|
||||
// remove default footer
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
25
examples/example_052.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
23
examples/example_053.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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,8 +101,8 @@ $pdf->IncludeJS($js);
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_053.pdf', 'I');
|
||||
$pdf->Output('example_053.pdf', 'D');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_054.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
38
examples/example_055.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -76,18 +79,18 @@ $pdf->SetFillColor(221,238,255);
|
||||
foreach($core_fonts as $font) {
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
|
||||
// Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
|
||||
|
||||
|
||||
// set font for title
|
||||
$pdf->SetFont('helvetica', 'B', 16);
|
||||
|
||||
|
||||
// print font name
|
||||
$pdf->Cell(0, 10, 'FONT: '.$font, 1, 1, 'C', true, '', 0, false, 'T', 'M');
|
||||
|
||||
|
||||
// set font for chars
|
||||
$pdf->SetFont($font, '', 16);
|
||||
|
||||
|
||||
// print each character
|
||||
for ($i = 0; $i < 256; ++$i) {
|
||||
if (($i > 0) AND (($i % 16) == 0)) {
|
||||
@ -95,9 +98,9 @@ foreach($core_fonts as $font) {
|
||||
}
|
||||
$pdf->Cell(11.25, 11.25, $pdf->unichr($i), 1, 0, 'C', false, '', 0, false, 'T', 'M');
|
||||
}
|
||||
|
||||
|
||||
$pdf->Ln(20);
|
||||
|
||||
|
||||
// print a pangram
|
||||
$pdf->Cell(0, 0, 'The quick brown fox jumps over the lazy dog', 0, 1, 'C', false, '', 0, false, 'T', 'M');
|
||||
}
|
||||
@ -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
|
||||
//============================================================+
|
||||
|
19
examples/example_056.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
21
examples/example_057.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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)
|
||||
|
25
examples/example_058.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
21
examples/example_059.php
Executable file → Normal 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
|
||||
@ -82,19 +82,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
|
||||
|
19
examples/example_060.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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);
|
||||
|
94
examples/example_061.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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();
|
||||
@ -266,5 +246,5 @@ $pdf->lastPage();
|
||||
$pdf->Output('example_061.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
|
21
examples/example_062.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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();
|
||||
|
19
examples/example_063.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// set some language-dependent strings (optional)
|
||||
if (file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||
$pdf->setLanguageArray($l);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
25
examples/example_064.php
Executable file → Normal 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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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));
|
||||
|
@ -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);
|
||||
@ -47,19 +47,22 @@ $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
// set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
// set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
// set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
// 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
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
0
images/alpha.png → examples/images/alpha.png
Executable file → Normal file
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
3618
images/bug.eps → examples/images/bug.eps
Executable file → Normal file
0
images/image_demo.jpg → examples/images/image_demo.jpg
Executable file → Normal file
Before Width: | Height: | Size: 560 KiB After Width: | Height: | Size: 560 KiB |
0
images/image_with_alpha.png → examples/images/image_with_alpha.png
Executable file → Normal 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
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
0
images/logo_example.gif → examples/images/logo_example.gif
Executable file → Normal file
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
0
images/logo_example.jpg → examples/images/logo_example.jpg
Executable file → Normal file
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
0
images/logo_example.png → examples/images/logo_example.png
Executable file → Normal file
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
294
images/pelican.ai → examples/images/pelican.ai
Executable file → Normal file
@ -1,147 +1,147 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: Adobe Illustrator(TM) 3.2
|
||||
%%AI8_CreatorVersion: 12.0.0
|
||||
%%For: (fluxus) (x)
|
||||
%%Title: (pelican.ai)
|
||||
%%CreationDate: 4/15/2006 11:28 PM
|
||||
%%BoundingBox: 38 221 564 654
|
||||
%%DocumentProcessColors: Black
|
||||
%%DocumentNeededResources: procset Adobe_packedarray 2.0 0
|
||||
%%+ procset Adobe_cshow 1.1 0
|
||||
%%+ procset Adobe_customcolor 1.0 0
|
||||
%%+ procset Adobe_pattern_AI3 1.0 0
|
||||
%%+ procset Adobe_Illustrator_AI3 1.0 1
|
||||
%AI3_ColorUsage: Color
|
||||
%%CMYKCustomColor: 1 1 1 1 ([Registration])
|
||||
%AI3_TemplateBox: 298.5 420.3896 298.5 420.3896
|
||||
%AI3_TileBox: 0.157715 0.044861 595.1177 841.9648
|
||||
%AI3_DocumentPreview: None
|
||||
%%PageOrigin:-32 11.8896
|
||||
%AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9
|
||||
%AI9_Flatten: 1
|
||||
%AI12_CMSettings: 00.MS
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%IncludeResource: procset Adobe_packedarray 2.0 0
|
||||
Adobe_packedarray /initialize get exec
|
||||
%%IncludeResource: procset Adobe_cshow 1.1 0
|
||||
%%IncludeResource: procset Adobe_customcolor 1.0 0
|
||||
%%IncludeResource: procset Adobe_pattern_AI3 1.0 0
|
||||
%%IncludeResource: procset Adobe_Illustrator_AI3 1.0 1
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
Adobe_cshow /initialize get exec
|
||||
Adobe_customcolor /initialize get exec
|
||||
Adobe_pattern_AI3 /initialize get exec
|
||||
Adobe_Illustrator_AI3 /initialize get exec
|
||||
%%EndSetup
|
||||
0 A
|
||||
0 O
|
||||
0.823529 g
|
||||
0 J 0 j 1 w 4 M []0 d
|
||||
406.3574 653.9336 m
|
||||
464.8369 654.4839 476.1016 604.7227 506.8555 577.2656 c
|
||||
518.2334 567.1074 538.876 556.4058 541.0449 537.8945 C
|
||||
525.793 545.1372 515.3398 557.5967 502.1924 566.9033 c
|
||||
492.1299 574.0298 478.9131 577.0991 467.4844 582.9634 c
|
||||
454.5439 589.603 441.3213 599.4785 424.4873 589.1792 c
|
||||
413.7012 582.5776 412.9746 565.8579 406.3574 554.9893 c
|
||||
401.2715 546.6338 390.2637 539.4668 382.0098 534.269 c
|
||||
370.5801 527.0684 326.3232 509.3872 322.4365 499.042 C
|
||||
331.416 493.8628 340.3955 488.6816 349.375 483.5005 C
|
||||
370.4541 474.8203 420.0293 453.8994 428.1152 435.3247 C
|
||||
427.9424 435.3247 427.7695 435.3247 427.5967 435.3247 C
|
||||
422.0781 438.2988 418.0566 441.834 411.0205 443.6128 C
|
||||
411.0205 442.9214 411.0205 442.2324 411.0205 441.541 C
|
||||
415.6807 438.0884 420.3457 434.6333 425.0059 431.1807 C
|
||||
426.5615 431.6968 428.1152 432.2153 429.6689 432.7339 C
|
||||
436.3252 429.1694 440.0146 421.5771 446.2451 417.1924 c
|
||||
468.749 401.3643 540.2861 360.04 557.624 408.9043 C
|
||||
559.6963 408.7314 561.7676 408.5586 563.8398 408.3857 C
|
||||
564.2002 369.6592 525.0967 377.3896 496.4951 382.4844 c
|
||||
485.8457 384.3838 476.0742 379.3203 465.4141 380.9307 c
|
||||
458.0371 382.0459 454.999 385.5068 447.8008 386.1123 C
|
||||
444.6514 384.4326 443.9072 382.2314 441.583 379.8955 C
|
||||
441.7559 379.5498 441.9287 379.2041 442.1016 378.8584 C
|
||||
453.1211 376.5439 474.8496 358.7158 485.6162 352.4404 c
|
||||
499.0371 344.6182 513.7188 346.8398 528.6133 341.043 C
|
||||
531.0205 346.2412 546.2559 365.248 551.9258 365.9072 C
|
||||
552.0986 365.3896 552.2715 364.8721 552.4424 364.3545 C
|
||||
553.4883 360.7607 550.0078 356.1338 548.2988 353.4756 c
|
||||
539.4346 339.6855 527.2559 336.8584 503.748 337.415 C
|
||||
507.8379 329.7158 516.5977 331.1191 522.3965 325.501 C
|
||||
510.8311 324.9131 495.6875 323.7822 486.6533 327.5732 C
|
||||
483.0273 329.6455 479.4004 331.7178 475.7744 333.79 C
|
||||
468.749 335.082 467.1133 328.6885 461.7891 327.5732 c
|
||||
451.8096 325.4854 442.6299 328.9424 433.8125 329.6455 C
|
||||
427.6152 314.2881 411.4697 330.1348 399.1045 326.5381 C
|
||||
395.1328 323.6025 391.1621 320.666 387.1904 317.7314 C
|
||||
380.2559 315.4561 375.2725 320.9756 368.0234 319.2861 C
|
||||
363.707 316.8682 359.3877 314.4502 355.0732 312.0322 C
|
||||
346.0449 325.4189 337.3516 308.3584 325.0264 313.0693 c
|
||||
319.249 315.2764 317.3877 322.9951 312.0762 324.9834 c
|
||||
302.3477 328.626 290.0044 321.8848 280.4756 325.501 c
|
||||
275.7075 327.3125 274.5767 334.043 270.1157 335.8623 C
|
||||
266.6616 335.6885 263.208 335.5166 259.7544 335.3428 C
|
||||
254.7881 336.4834 253.1904 341.9092 248.8755 343.6338 C
|
||||
245.7686 343.8066 242.6592 343.9775 239.5513 344.1494 C
|
||||
236.9614 347.4326 234.3711 350.7119 231.7803 353.9941 C
|
||||
227.1187 356.2158 222.1738 353.7666 218.312 356.0654 C
|
||||
217.707 358.9385 216.9556 361.4961 214.6855 362.8008 C
|
||||
210.5415 362.9736 206.396 363.1465 202.2529 363.3174 C
|
||||
200.6987 365.3896 199.145 367.4639 197.5903 369.5332 C
|
||||
193.9648 370.2246 190.3384 370.916 186.7119 371.6074 C
|
||||
183.0776 383.6631 179.9097 377.1084 172.7246 383.0029 C
|
||||
172.0347 384.5557 171.3433 386.1123 170.6528 387.665 C
|
||||
167.4033 390.2705 160.396 389.1025 157.1846 391.291 C
|
||||
150.2778 399.2334 143.3691 407.1787 136.4629 415.1201 C
|
||||
135.7725 415.1201 135.0811 415.1201 134.3906 415.1201 C
|
||||
129.8872 408.9912 123.022 405.2783 118.332 399.5791 c
|
||||
109.856 389.2803 103.8877 376.3271 98.6465 362.8008 c
|
||||
91.7344 344.96 87.7056 323.8467 83.6235 304.2627 c
|
||||
81.5273 294.2061 81.9316 284.2168 78.4434 275.7705 c
|
||||
74.5234 266.2822 66.5 259.7139 60.8296 251.9404 c
|
||||
54.7129 243.5557 51.2388 224.7588 40.627 221.3779 C
|
||||
40.7998 221.7217 40.9727 222.0674 41.144 222.4131 C
|
||||
39.79 227.2139 42.2383 230.333 43.2163 234.3291 C
|
||||
41.1147 235.4502 39.3652 235.8232 38.5547 238.4736 C
|
||||
40.1084 244.3438 41.6626 250.2139 43.2163 256.085 C
|
||||
42.6357 258.7764 38.5103 262.4824 40.1084 267.4814 c
|
||||
41.354 271.3818 44.9365 271.5908 45.2896 277.3262 C
|
||||
43.8086 279.5244 41.9907 280.7529 40.1084 282.5049 C
|
||||
40.1084 282.6777 40.1084 282.8506 40.1084 283.0234 C
|
||||
52.8052 283.6553 57.1475 290.5166 61.3481 299.6006 C
|
||||
53.7988 301.8721 41.7808 303.3838 38.5547 309.96 C
|
||||
46.126 307.9092 59.4692 305.3623 67.0459 307.3721 C
|
||||
69.4639 315.3115 71.8813 323.2568 74.2993 331.1992 C
|
||||
77.9248 347.085 81.5513 362.9736 85.1777 378.8584 C
|
||||
87.957 392.2158 84.7827 409.2002 90.3579 419.7832 C
|
||||
92.7749 421.6826 95.1934 423.5815 97.6104 425.481 C
|
||||
99.3364 431.1782 101.064 436.8784 102.7905 442.5757 C
|
||||
107.7554 450.8428 114.814 456.6777 119.3677 465.8892 C
|
||||
115.0508 468.8232 110.7329 471.7593 106.417 474.6938 C
|
||||
106.7617 476.2495 107.1074 477.8027 107.4531 479.3564 C
|
||||
93.3389 475.1343 85.5649 470.4336 75.8525 462.7798 C
|
||||
65.6665 462.7798 55.4756 462.7798 45.2896 462.7798 C
|
||||
45.4609 463.1255 45.6338 463.4712 45.8066 463.8169 C
|
||||
74.2612 470.5581 82.3726 479.2275 102.7905 491.7886 C
|
||||
114.7041 497.832 126.6211 503.8774 138.5347 509.9204 C
|
||||
142.1606 513.2007 145.7881 516.4824 149.4136 519.7622 C
|
||||
168.4629 531.9883 188.5562 540.2256 210.5415 549.8081 c
|
||||
217.877 553.0059 224.0391 558.6489 232.2988 561.2056 c
|
||||
245.8008 565.3853 266.6577 569.8081 284.1025 566.3867 C
|
||||
292.7354 563.4507 301.3701 560.5142 310.0039 557.5801 C
|
||||
324.5254 553.9165 346.2764 558.8447 355.0732 564.3149 c
|
||||
369.0625 573.0098 372.4688 593.5171 375.793 613.0088 C
|
||||
376.6572 620.606 377.5195 628.2046 378.3838 635.8013 C
|
||||
383.2783 647.8481 394.3535 648.647 406.3574 653.9336 C
|
||||
f
|
||||
%%PageTrailer
|
||||
gsave annotatepage grestore showpage
|
||||
%%Trailer
|
||||
Adobe_Illustrator_AI3 /terminate get exec
|
||||
Adobe_pattern_AI3 /terminate get exec
|
||||
Adobe_customcolor /terminate get exec
|
||||
Adobe_cshow /terminate get exec
|
||||
Adobe_packedarray /terminate get exec
|
||||
%%EOF
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: Adobe Illustrator(TM) 3.2
|
||||
%%AI8_CreatorVersion: 12.0.0
|
||||
%%For: (fluxus) (x)
|
||||
%%Title: (pelican.ai)
|
||||
%%CreationDate: 4/15/2006 11:28 PM
|
||||
%%BoundingBox: 38 221 564 654
|
||||
%%DocumentProcessColors: Black
|
||||
%%DocumentNeededResources: procset Adobe_packedarray 2.0 0
|
||||
%%+ procset Adobe_cshow 1.1 0
|
||||
%%+ procset Adobe_customcolor 1.0 0
|
||||
%%+ procset Adobe_pattern_AI3 1.0 0
|
||||
%%+ procset Adobe_Illustrator_AI3 1.0 1
|
||||
%AI3_ColorUsage: Color
|
||||
%%CMYKCustomColor: 1 1 1 1 ([Registration])
|
||||
%AI3_TemplateBox: 298.5 420.3896 298.5 420.3896
|
||||
%AI3_TileBox: 0.157715 0.044861 595.1177 841.9648
|
||||
%AI3_DocumentPreview: None
|
||||
%%PageOrigin:-32 11.8896
|
||||
%AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9
|
||||
%AI9_Flatten: 1
|
||||
%AI12_CMSettings: 00.MS
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%IncludeResource: procset Adobe_packedarray 2.0 0
|
||||
Adobe_packedarray /initialize get exec
|
||||
%%IncludeResource: procset Adobe_cshow 1.1 0
|
||||
%%IncludeResource: procset Adobe_customcolor 1.0 0
|
||||
%%IncludeResource: procset Adobe_pattern_AI3 1.0 0
|
||||
%%IncludeResource: procset Adobe_Illustrator_AI3 1.0 1
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
Adobe_cshow /initialize get exec
|
||||
Adobe_customcolor /initialize get exec
|
||||
Adobe_pattern_AI3 /initialize get exec
|
||||
Adobe_Illustrator_AI3 /initialize get exec
|
||||
%%EndSetup
|
||||
0 A
|
||||
0 O
|
||||
0.823529 g
|
||||
0 J 0 j 1 w 4 M []0 d
|
||||
406.3574 653.9336 m
|
||||
464.8369 654.4839 476.1016 604.7227 506.8555 577.2656 c
|
||||
518.2334 567.1074 538.876 556.4058 541.0449 537.8945 C
|
||||
525.793 545.1372 515.3398 557.5967 502.1924 566.9033 c
|
||||
492.1299 574.0298 478.9131 577.0991 467.4844 582.9634 c
|
||||
454.5439 589.603 441.3213 599.4785 424.4873 589.1792 c
|
||||
413.7012 582.5776 412.9746 565.8579 406.3574 554.9893 c
|
||||
401.2715 546.6338 390.2637 539.4668 382.0098 534.269 c
|
||||
370.5801 527.0684 326.3232 509.3872 322.4365 499.042 C
|
||||
331.416 493.8628 340.3955 488.6816 349.375 483.5005 C
|
||||
370.4541 474.8203 420.0293 453.8994 428.1152 435.3247 C
|
||||
427.9424 435.3247 427.7695 435.3247 427.5967 435.3247 C
|
||||
422.0781 438.2988 418.0566 441.834 411.0205 443.6128 C
|
||||
411.0205 442.9214 411.0205 442.2324 411.0205 441.541 C
|
||||
415.6807 438.0884 420.3457 434.6333 425.0059 431.1807 C
|
||||
426.5615 431.6968 428.1152 432.2153 429.6689 432.7339 C
|
||||
436.3252 429.1694 440.0146 421.5771 446.2451 417.1924 c
|
||||
468.749 401.3643 540.2861 360.04 557.624 408.9043 C
|
||||
559.6963 408.7314 561.7676 408.5586 563.8398 408.3857 C
|
||||
564.2002 369.6592 525.0967 377.3896 496.4951 382.4844 c
|
||||
485.8457 384.3838 476.0742 379.3203 465.4141 380.9307 c
|
||||
458.0371 382.0459 454.999 385.5068 447.8008 386.1123 C
|
||||
444.6514 384.4326 443.9072 382.2314 441.583 379.8955 C
|
||||
441.7559 379.5498 441.9287 379.2041 442.1016 378.8584 C
|
||||
453.1211 376.5439 474.8496 358.7158 485.6162 352.4404 c
|
||||
499.0371 344.6182 513.7188 346.8398 528.6133 341.043 C
|
||||
531.0205 346.2412 546.2559 365.248 551.9258 365.9072 C
|
||||
552.0986 365.3896 552.2715 364.8721 552.4424 364.3545 C
|
||||
553.4883 360.7607 550.0078 356.1338 548.2988 353.4756 c
|
||||
539.4346 339.6855 527.2559 336.8584 503.748 337.415 C
|
||||
507.8379 329.7158 516.5977 331.1191 522.3965 325.501 C
|
||||
510.8311 324.9131 495.6875 323.7822 486.6533 327.5732 C
|
||||
483.0273 329.6455 479.4004 331.7178 475.7744 333.79 C
|
||||
468.749 335.082 467.1133 328.6885 461.7891 327.5732 c
|
||||
451.8096 325.4854 442.6299 328.9424 433.8125 329.6455 C
|
||||
427.6152 314.2881 411.4697 330.1348 399.1045 326.5381 C
|
||||
395.1328 323.6025 391.1621 320.666 387.1904 317.7314 C
|
||||
380.2559 315.4561 375.2725 320.9756 368.0234 319.2861 C
|
||||
363.707 316.8682 359.3877 314.4502 355.0732 312.0322 C
|
||||
346.0449 325.4189 337.3516 308.3584 325.0264 313.0693 c
|
||||
319.249 315.2764 317.3877 322.9951 312.0762 324.9834 c
|
||||
302.3477 328.626 290.0044 321.8848 280.4756 325.501 c
|
||||
275.7075 327.3125 274.5767 334.043 270.1157 335.8623 C
|
||||
266.6616 335.6885 263.208 335.5166 259.7544 335.3428 C
|
||||
254.7881 336.4834 253.1904 341.9092 248.8755 343.6338 C
|
||||
245.7686 343.8066 242.6592 343.9775 239.5513 344.1494 C
|
||||
236.9614 347.4326 234.3711 350.7119 231.7803 353.9941 C
|
||||
227.1187 356.2158 222.1738 353.7666 218.312 356.0654 C
|
||||
217.707 358.9385 216.9556 361.4961 214.6855 362.8008 C
|
||||
210.5415 362.9736 206.396 363.1465 202.2529 363.3174 C
|
||||
200.6987 365.3896 199.145 367.4639 197.5903 369.5332 C
|
||||
193.9648 370.2246 190.3384 370.916 186.7119 371.6074 C
|
||||
183.0776 383.6631 179.9097 377.1084 172.7246 383.0029 C
|
||||
172.0347 384.5557 171.3433 386.1123 170.6528 387.665 C
|
||||
167.4033 390.2705 160.396 389.1025 157.1846 391.291 C
|
||||
150.2778 399.2334 143.3691 407.1787 136.4629 415.1201 C
|
||||
135.7725 415.1201 135.0811 415.1201 134.3906 415.1201 C
|
||||
129.8872 408.9912 123.022 405.2783 118.332 399.5791 c
|
||||
109.856 389.2803 103.8877 376.3271 98.6465 362.8008 c
|
||||
91.7344 344.96 87.7056 323.8467 83.6235 304.2627 c
|
||||
81.5273 294.2061 81.9316 284.2168 78.4434 275.7705 c
|
||||
74.5234 266.2822 66.5 259.7139 60.8296 251.9404 c
|
||||
54.7129 243.5557 51.2388 224.7588 40.627 221.3779 C
|
||||
40.7998 221.7217 40.9727 222.0674 41.144 222.4131 C
|
||||
39.79 227.2139 42.2383 230.333 43.2163 234.3291 C
|
||||
41.1147 235.4502 39.3652 235.8232 38.5547 238.4736 C
|
||||
40.1084 244.3438 41.6626 250.2139 43.2163 256.085 C
|
||||
42.6357 258.7764 38.5103 262.4824 40.1084 267.4814 c
|
||||
41.354 271.3818 44.9365 271.5908 45.2896 277.3262 C
|
||||
43.8086 279.5244 41.9907 280.7529 40.1084 282.5049 C
|
||||
40.1084 282.6777 40.1084 282.8506 40.1084 283.0234 C
|
||||
52.8052 283.6553 57.1475 290.5166 61.3481 299.6006 C
|
||||
53.7988 301.8721 41.7808 303.3838 38.5547 309.96 C
|
||||
46.126 307.9092 59.4692 305.3623 67.0459 307.3721 C
|
||||
69.4639 315.3115 71.8813 323.2568 74.2993 331.1992 C
|
||||
77.9248 347.085 81.5513 362.9736 85.1777 378.8584 C
|
||||
87.957 392.2158 84.7827 409.2002 90.3579 419.7832 C
|
||||
92.7749 421.6826 95.1934 423.5815 97.6104 425.481 C
|
||||
99.3364 431.1782 101.064 436.8784 102.7905 442.5757 C
|
||||
107.7554 450.8428 114.814 456.6777 119.3677 465.8892 C
|
||||
115.0508 468.8232 110.7329 471.7593 106.417 474.6938 C
|
||||
106.7617 476.2495 107.1074 477.8027 107.4531 479.3564 C
|
||||
93.3389 475.1343 85.5649 470.4336 75.8525 462.7798 C
|
||||
65.6665 462.7798 55.4756 462.7798 45.2896 462.7798 C
|
||||
45.4609 463.1255 45.6338 463.4712 45.8066 463.8169 C
|
||||
74.2612 470.5581 82.3726 479.2275 102.7905 491.7886 C
|
||||
114.7041 497.832 126.6211 503.8774 138.5347 509.9204 C
|
||||
142.1606 513.2007 145.7881 516.4824 149.4136 519.7622 C
|
||||
168.4629 531.9883 188.5562 540.2256 210.5415 549.8081 c
|
||||
217.877 553.0059 224.0391 558.6489 232.2988 561.2056 c
|
||||
245.8008 565.3853 266.6577 569.8081 284.1025 566.3867 C
|
||||
292.7354 563.4507 301.3701 560.5142 310.0039 557.5801 C
|
||||
324.5254 553.9165 346.2764 558.8447 355.0732 564.3149 c
|
||||
369.0625 573.0098 372.4688 593.5171 375.793 613.0088 C
|
||||
376.6572 620.606 377.5195 628.2046 378.3838 635.8013 C
|
||||
383.2783 647.8481 394.3535 648.647 406.3574 653.9336 C
|
||||
f
|
||||
%%PageTrailer
|
||||
gsave annotatepage grestore showpage
|
||||
%%Trailer
|
||||
Adobe_Illustrator_AI3 /terminate get exec
|
||||
Adobe_pattern_AI3 /terminate get exec
|
||||
Adobe_customcolor /terminate get exec
|
||||
Adobe_cshow /terminate get exec
|
||||
Adobe_packedarray /terminate get exec
|
||||
%%EOF
|
0
images/tcpdf_cell.png → examples/images/tcpdf_cell.png
Executable file → Normal file
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
images/tcpdf_logo.jpg → examples/images/tcpdf_logo.jpg
Executable file → Normal file
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
0
images/tcpdf_signature.png → examples/images/tcpdf_signature.png
Executable file → Normal 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
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
7198
images/tiger.ai → examples/images/tiger.ai
Executable file → Normal file
0
images/tux.svg → examples/images/tux.svg
Executable file → Normal file
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |