mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 12:55:10 +00:00
4.9.011
This commit is contained in:
parent
ce2dca7465
commit
13a3ef412d
@ -1,3 +1,6 @@
|
||||
4.9.011 (2010-04-07)
|
||||
- Vertical alignments for Cell() method were improved (see example n. 57).
|
||||
|
||||
4.9.010 (2010-04-06)
|
||||
- Signature of Cell() method now includes a new parameters for vertical alignment (see example n. 57).
|
||||
- Text() method was extended to include all Cell() parameters.
|
||||
|
52
README.TXT
52
README.TXT
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.9.010
|
||||
Release date: 2010-04-06
|
||||
Version: 4.9.011
|
||||
Release date: 2010-04-07
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2010:
|
||||
@ -29,32 +29,28 @@ Description:
|
||||
TCPDF has been originally derived from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org).
|
||||
|
||||
Main Features:
|
||||
// * no external libraries are required for the basic functions;
|
||||
// * supports all ISO page formats;
|
||||
// * supports custom page formats, margins and units of measure;
|
||||
// * supports UTF-8 Unicode and Right-To-Left languages;
|
||||
// * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
|
||||
// * supports document encryption;
|
||||
// * includes methods to publish some XHTML code, including forms;
|
||||
// * includes graphic (geometric) and transformation methods;
|
||||
// * includes Javascript and Forms support;
|
||||
// * includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
|
||||
// * includes methods to set Bookmarks and print a Table of Content;
|
||||
// * includes methods to move and delete pages;
|
||||
// * includes methods for automatic page header and footer management;
|
||||
// * supports multi-column mode;
|
||||
// * supports automatic page break;
|
||||
// * supports automatic page numbering and page groups;
|
||||
// * supports automatic line break and text justification;
|
||||
// * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
|
||||
// * supports stroke and clipping mode for text;
|
||||
// * supports clipping masks;
|
||||
// * supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
// * supports several annotations, including links, text and file attachments;
|
||||
// * supports page compression (requires zlib extension);
|
||||
// * supports text hyphenation.
|
||||
// * supports transactions to UNDO commands.
|
||||
// * supports signature certifications.
|
||||
// * no external libraries are required for the basic functions;
|
||||
// * all ISO page formats, custom page formats, custom margins and units of measure;
|
||||
// * UTF-8 Unicode and Right-To-Left languages;
|
||||
// * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
|
||||
// * methods to publish some XHTML code, Javascript and Forms;
|
||||
// * images, graphic (geometric figures) and transformation methods;
|
||||
// * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
|
||||
// * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
|
||||
// * Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
// * automatic page header and footer management;
|
||||
// * document encryption and digital signature certifications;
|
||||
// * transactions to UNDO commands;
|
||||
// * PDF annotations, including links, text and file attachments;
|
||||
// * text rendering modes (fill, stroke and clipping);
|
||||
// * multiple columns mode;
|
||||
// * bookmarks and table of content;
|
||||
// * text hyphenation;
|
||||
// * automatic page break, line break and text alignments including justification;
|
||||
// * automatic page numbering and page groups;
|
||||
// * move and delete pages;
|
||||
// * page compression (requires php-zlib extension);
|
||||
|
||||
|
||||
Installation (full instructions on http://www.tcpdf.org):
|
||||
1. copy the folder on your Web server
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -5548,7 +5548,7 @@ $frame)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -296,7 +296,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1374,7 +1374,7 @@ $type)</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -102,7 +102,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -102,7 +102,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -539,7 +539,7 @@ Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:58 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -94,7 +94,7 @@ Array of WEB safe colors.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -477,7 +477,7 @@ string $string, [int $split_length = 1])</code>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -71,7 +71,7 @@ Source Location: /tcpdf.php<br /><br />
|
||||
</div><br /><br />
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
This is a PHP class for generating PDF documents without requiring external extensions.<br /><br /><br /><p>TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br /> <h3>TCPDF main features are:</h3> <ul><li>no external libraries are required for the basic functions;</li><li>supports all ISO page formats;</li><li>supports custom page formats, margins and units of measure;</li><li>supports UTF-8 Unicode and Right-To-Left languages;</li><li>supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li><li>supports document encryption;</li><li>includes methods to publish some XHTML code, including forms;</li><li>includes graphic (geometric) and transformation methods;</li><li>includes Javascript and Forms support;</li><li>includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS</li><li>includes methods to set Bookmarks and print a Table of Content;</li><li>includes methods to move and delete pages;</li><li>includes methods for automatic page header and footer management;</li><li>supports multi-column mode;</li><li>supports automatic page break;</li><li>supports automatic page numbering and page groups;</li><li>supports automatic line break and text justification;</li><li>supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)</li><li>supports stroke and clipping mode for text;</li><li>supports clipping masks;</li><li>supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;</li><li>supports several annotations, including links, text and file attachments;</li><li>supports page compression (requires zlib extension);</li><li>supports text hyphenation.</li><li>supports transactions to UNDO commands.</li><li>supports signature certifications.</li></ul> Tools to encode your unicode fonts are on fonts/utils directory.</p></p><br /><br /><br />
|
||||
This is a PHP class for generating PDF documents without requiring external extensions.<br /><br /><br /><p>TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br /> <h3>TCPDF main features are:</h3> <ul><li>no external libraries are required for the basic functions;</li><li>all ISO page formats, custom page formats, custom margins and units of measure;</li><li>UTF-8 Unicode and Right-To-Left languages;</li><li>TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li><li>methods to publish some XHTML code, Javascript and Forms;</li><li>images, graphic (geometric figures) and transformation methods;</li><li>supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)</li><li>1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;</li><li>Grayscale, RGB, CMYK, Spot Colors and Transparencies;</li><li>automatic page header and footer management;</li><li>document encryption and digital signature certifications;</li><li>transactions to UNDO commands;</li><li>PDF annotations, including links, text and file attachments;</li><li>text rendering modes (fill, stroke and clipping);</li><li>multiple columns mode;</li><li>bookmarks and table of content;</li><li>text hyphenation;</li><li>automatic page break, line break and text alignments including justification;</li><li>automatic page numbering and page groups;</li><li>move and delete pages;</li><li>page compression (requires php-zlib extension);</li></ul> Tools to encode your unicode fonts are on fonts/utils directory.</p></p><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
@ -79,7 +79,7 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.9.010</td>
|
||||
<td><b>version:</b> </td><td>4.9.011</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
@ -98,19 +98,19 @@ This is a PHP class for generating PDF documents without requiring external exte
|
||||
<br /><br />
|
||||
<h4>Includes:</h4>
|
||||
<div class="tags">
|
||||
require_once(dirname(__FILE__).'/config/tcpdf_config.php') [line 140]<br />
|
||||
main configuration file<br /><br />require_once(dirname(__FILE__).'/htmlcolors.php') [line 152]<br />
|
||||
html colors table<br /><br />require_once(dirname(__FILE__).'/unicode_data.php') [line 147]<br />
|
||||
require_once(dirname(__FILE__).'/config/tcpdf_config.php') [line 130]<br />
|
||||
main configuration file<br /><br />require_once(dirname(__FILE__).'/htmlcolors.php') [line 142]<br />
|
||||
html colors table<br /><br />require_once(dirname(__FILE__).'/unicode_data.php') [line 137]<br />
|
||||
unicode data<br /><br /></div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_PRODUCER"></a>
|
||||
<h3>PDF_PRODUCER <span class="smalllinenumber">[line 158]</span></h3>
|
||||
<h3>PDF_PRODUCER <span class="smalllinenumber">[line 148]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.9.010 (http://www.tcpdf.org)'</code>
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.9.011 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
@ -121,7 +121,7 @@ unicode data<br /><br /></div>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:56 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -243,7 +243,7 @@ Unicode Include file for TCPDF.<br /><br /><br /><br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:58 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1854,7 +1854,7 @@
|
||||
<a href="elementindex.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -1883,7 +1883,7 @@
|
||||
<a href="elementindex_com-tecnick-tcpdf.html#top">top</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:58 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -64,7 +64,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -64,7 +64,7 @@
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Tue, 06 Apr 2010 19:44:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
Documentation generated on Wed, 07 Apr 2010 10:00:55 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : example_057.php
|
||||
// Begin : 2010-04-03
|
||||
// Last Update : 2010-04-06
|
||||
// Last Update : 2010-04-07
|
||||
//
|
||||
// Description : Example 057 for TCPDF class
|
||||
// Cell vertical alignments
|
||||
@ -70,32 +70,53 @@ $pdf->setLanguageArray($l);
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 14);
|
||||
$pdf->SetFont('helvetica', '', 11);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->SetLineWidth(0.7);
|
||||
|
||||
$pdf->setCellHeightRatio(3);
|
||||
|
||||
$pdf->SetXY(17, 50);
|
||||
$pdf->SetXY(15, 50);
|
||||
|
||||
$pdf->Cell(35, 0, 'Cell Top', 1, $ln=0, 'C', 0, '', 0, false, 'T');
|
||||
$pdf->Cell(35, 0, 'Font Top', 1, $ln=0, 'C', 0, '', 0, false, 'A');
|
||||
$pdf->Cell(35, 0, 'Font Baseline', 1, $ln=0, 'C', 0, '', 0, false, 'L');
|
||||
$pdf->Cell(35, 0, 'Font Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'D');
|
||||
$pdf->Cell(35, 0, 'Cell Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'B');
|
||||
// text on center
|
||||
$pdf->Cell(30, 0, 'Top-Center', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'C');
|
||||
$pdf->Cell(30, 0, 'Center-Center', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'C');
|
||||
$pdf->Cell(30, 0, 'Bottom-Center', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'C');
|
||||
$pdf->Cell(30, 0, 'Ascent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'C');
|
||||
$pdf->Cell(30, 0, 'Baseline-Center', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'C');
|
||||
$pdf->Cell(30, 0, 'Descent-Center', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'C');
|
||||
|
||||
|
||||
$pdf->SetXY(15, 80);
|
||||
|
||||
$pdf->SetXY(30, 70);
|
||||
|
||||
$pdf->Cell(50, 0, 'Text Top', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'T');
|
||||
$pdf->Cell(50, 0, 'Text Center', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'M');
|
||||
$pdf->Cell(50, 0, 'Text Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'B');
|
||||
// text on top
|
||||
$pdf->Cell(30, 0, 'Top-Top', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'T');
|
||||
$pdf->Cell(30, 0, 'Center-Top', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'T');
|
||||
$pdf->Cell(30, 0, 'Bottom-Top', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'T');
|
||||
$pdf->Cell(30, 0, 'Ascent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'T');
|
||||
$pdf->Cell(30, 0, 'Baseline-Top', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'T');
|
||||
$pdf->Cell(30, 0, 'Descent-Top', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'T');
|
||||
|
||||
|
||||
$pdf->SetXY(15, 110);
|
||||
|
||||
// text on bottom
|
||||
$pdf->Cell(30, 0, 'Top-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'T', 'B');
|
||||
$pdf->Cell(30, 0, 'Center-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'B');
|
||||
$pdf->Cell(30, 0, 'Bottom-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'B', 'B');
|
||||
$pdf->Cell(30, 0, 'Ascent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'A', 'B');
|
||||
$pdf->Cell(30, 0, 'Baseline-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'L', 'B');
|
||||
$pdf->Cell(30, 0, 'Descent-Bottom', 1, $ln=0, 'C', 0, '', 0, false, 'D', 'B');
|
||||
|
||||
|
||||
// draw some reference lines
|
||||
$linestyle = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 0, 'color' => array(255, 0, 0));
|
||||
$pdf->Line(15, 50, 195, 50, $linestyle);
|
||||
$pdf->Line(15, 80, 195, 80, $linestyle);
|
||||
$pdf->Line(15, 110, 195, 110, $linestyle);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
172
tcpdf.php
172
tcpdf.php
@ -2,9 +2,9 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Begin : 2002-08-03
|
||||
// Last Update : 2010-04-06
|
||||
// Last Update : 2010-04-07
|
||||
// Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org
|
||||
// Version : 4.9.010
|
||||
// Version : 4.9.011
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l.
|
||||
@ -35,31 +35,26 @@
|
||||
//
|
||||
// Main features:
|
||||
// * no external libraries are required for the basic functions;
|
||||
// * supports all ISO page formats;
|
||||
// * supports custom page formats, margins and units of measure;
|
||||
// * supports UTF-8 Unicode and Right-To-Left languages;
|
||||
// * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
|
||||
// * supports document encryption;
|
||||
// * includes methods to publish some XHTML code, including forms;
|
||||
// * includes graphic (geometric) and transformation methods;
|
||||
// * includes Javascript and Forms support;
|
||||
// * includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
|
||||
// * includes methods to set Bookmarks and print a Table of Content;
|
||||
// * includes methods to move and delete pages;
|
||||
// * includes methods for automatic page header and footer management;
|
||||
// * supports multi-column mode;
|
||||
// * supports automatic page break;
|
||||
// * supports automatic page numbering and page groups;
|
||||
// * supports automatic line break and text justification;
|
||||
// * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
|
||||
// * supports stroke and clipping mode for text;
|
||||
// * supports clipping masks;
|
||||
// * supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
// * supports several annotations, including links, text and file attachments;
|
||||
// * supports page compression (requires zlib extension);
|
||||
// * supports text hyphenation.
|
||||
// * supports transactions to UNDO commands.
|
||||
// * supports signature certifications.
|
||||
// * all ISO page formats, custom page formats, custom margins and units of measure;
|
||||
// * UTF-8 Unicode and Right-To-Left languages;
|
||||
// * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
|
||||
// * methods to publish some XHTML code, Javascript and Forms;
|
||||
// * images, graphic (geometric figures) and transformation methods;
|
||||
// * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
|
||||
// * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
|
||||
// * Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
// * automatic page header and footer management;
|
||||
// * document encryption and digital signature certifications;
|
||||
// * transactions to UNDO commands;
|
||||
// * PDF annotations, including links, text and file attachments;
|
||||
// * text rendering modes (fill, stroke and clipping);
|
||||
// * multiple columns mode;
|
||||
// * bookmarks and table of content;
|
||||
// * text hyphenation;
|
||||
// * automatic page break, line break and text alignments including justification;
|
||||
// * automatic page numbering and page groups;
|
||||
// * move and delete pages;
|
||||
// * page compression (requires php-zlib extension);
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// THANKS TO:
|
||||
@ -97,32 +92,27 @@
|
||||
* TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
|
||||
* <h3>TCPDF main features are:</h3>
|
||||
* <ul>
|
||||
* <li>no external libraries are required for the basic functions;</li>
|
||||
* <li>supports all ISO page formats;</li>
|
||||
* <li>supports custom page formats, margins and units of measure;</li>
|
||||
* <li>supports UTF-8 Unicode and Right-To-Left languages;</li>
|
||||
* <li>supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li>
|
||||
* <li>supports document encryption;</li>
|
||||
* <li>includes methods to publish some XHTML code, including forms;</li>
|
||||
* <li>includes graphic (geometric) and transformation methods;</li>
|
||||
* <li>includes Javascript and Forms support;</li>
|
||||
* <li>includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS</li>
|
||||
* <li>includes methods to set Bookmarks and print a Table of Content;</li>
|
||||
* <li>includes methods to move and delete pages;</li>
|
||||
* <li>includes methods for automatic page header and footer management;</li>
|
||||
* <li>supports multi-column mode;</li>
|
||||
* <li>supports automatic page break;</li>
|
||||
* <li>supports automatic page numbering and page groups;</li>
|
||||
* <li>supports automatic line break and text justification;</li>
|
||||
* <li>supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)</li>
|
||||
* <li>supports stroke and clipping mode for text;</li>
|
||||
* <li>supports clipping masks;</li>
|
||||
* <li>supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;</li>
|
||||
* <li>supports several annotations, including links, text and file attachments;</li>
|
||||
* <li>supports page compression (requires zlib extension);</li>
|
||||
* <li>supports text hyphenation.</li>
|
||||
* <li>supports transactions to UNDO commands.</li>
|
||||
* <li>supports signature certifications.</li>
|
||||
* <li>no external libraries are required for the basic functions;</li>
|
||||
* <li>all ISO page formats, custom page formats, custom margins and units of measure;</li>
|
||||
* <li>UTF-8 Unicode and Right-To-Left languages;</li>
|
||||
* <li>TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li>
|
||||
* <li>methods to publish some XHTML code, Javascript and Forms;</li>
|
||||
* <li>images, graphic (geometric figures) and transformation methods;
|
||||
* <li>supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)</li>
|
||||
* <li>1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;</li>
|
||||
* <li>Grayscale, RGB, CMYK, Spot Colors and Transparencies;</li>
|
||||
* <li>automatic page header and footer management;</li>
|
||||
* <li>document encryption and digital signature certifications;</li>
|
||||
* <li>transactions to UNDO commands;</li>
|
||||
* <li>PDF annotations, including links, text and file attachments;</li>
|
||||
* <li>text rendering modes (fill, stroke and clipping);</li>
|
||||
* <li>multiple columns mode;</li>
|
||||
* <li>bookmarks and table of content;</li>
|
||||
* <li>text hyphenation;</li>
|
||||
* <li>automatic page break, line break and text alignments including justification;</li>
|
||||
* <li>automatic page numbering and page groups;</li>
|
||||
* <li>move and delete pages;</li>
|
||||
* <li>page compression (requires php-zlib extension);</li>
|
||||
* </ul>
|
||||
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||
* @package com.tecnick.tcpdf
|
||||
@ -131,7 +121,7 @@
|
||||
* @copyright 2002-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @version 4.9.010
|
||||
* @version 4.9.011
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -155,14 +145,14 @@ if (!class_exists('TCPDF', false)) {
|
||||
/**
|
||||
* define default PDF document producer
|
||||
*/
|
||||
define('PDF_PRODUCER', 'TCPDF 4.9.010 (http://www.tcpdf.org)');
|
||||
define('PDF_PRODUCER', 'TCPDF 4.9.011 (http://www.tcpdf.org)');
|
||||
|
||||
/**
|
||||
* This is a PHP class for generating PDF documents without requiring external extensions.<br>
|
||||
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
|
||||
* @name TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.9.010
|
||||
* @version 4.9.011
|
||||
* @author Nicola Asuni - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
@ -3832,7 +3822,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @param mixed $link URL or identifier returned by AddLink().
|
||||
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
|
||||
* @param boolean $ignore_min_height if true ignore automatic minimum height value.
|
||||
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li><li>B : cell bottom</li></ul>
|
||||
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>C : center</li><li>B : cell bottom</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li></ul>
|
||||
* @param string $valign text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>C : center</li><li>B : bottom</li></ul>
|
||||
* @access public
|
||||
* @since 1.0
|
||||
@ -3887,7 +3877,7 @@ if (!class_exists('TCPDF', false)) {
|
||||
* @param mixed $link URL or identifier returned by AddLink().
|
||||
* @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul>
|
||||
* @param boolean $ignore_min_height if true ignore automatic minimum height value.
|
||||
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li><li>B : cell bottom</li></ul>
|
||||
* @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>C : center</li><li>B : cell bottom</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li></ul>
|
||||
* @param string $valign text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>C : center</li><li>B : bottom</li></ul>
|
||||
* @access protected
|
||||
* @since 1.0
|
||||
@ -3909,17 +3899,68 @@ if (!class_exists('TCPDF', false)) {
|
||||
switch ($calign) {
|
||||
case 'A': {
|
||||
// font top
|
||||
$y -= (($h - $this->FontAscent - $this->FontDescent) / 2);
|
||||
switch ($valign) {
|
||||
case 'T': {
|
||||
// top
|
||||
$y -= ($this->LineWidth / 2);
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
// bottom
|
||||
$y -= ($h - $this->FontAscent - $this->FontDescent - ($this->LineWidth / 2));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case 'M': {
|
||||
// center
|
||||
$y -= (($h - $this->FontAscent - $this->FontDescent) / 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'L': {
|
||||
// font baseline
|
||||
$y -= (($h + $this->FontAscent - $this->FontDescent) / 2);
|
||||
switch ($valign) {
|
||||
case 'T': {
|
||||
// top
|
||||
$y -= ($this->FontAscent + ($this->LineWidth / 2));
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
// bottom
|
||||
$y -= ($h - $this->FontDescent - ($this->LineWidth / 2));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case 'M': {
|
||||
// center
|
||||
$y -= (($h + $this->FontAscent - $this->FontDescent) / 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'D': {
|
||||
// font bottom
|
||||
$y -= (($h + $this->FontAscent + $this->FontDescent) / 2);
|
||||
switch ($valign) {
|
||||
case 'T': {
|
||||
// top
|
||||
$y -= ($this->FontAscent + $this->FontDescent + ($this->LineWidth / 2));
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
// bottom
|
||||
$y -= ($h - ($this->LineWidth / 2));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case 'M': {
|
||||
// center
|
||||
$y -= (($h + $this->FontAscent + $this->FontDescent) / 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
@ -3927,6 +3968,11 @@ if (!class_exists('TCPDF', false)) {
|
||||
$y -= $h;
|
||||
break;
|
||||
}
|
||||
case 'C': {
|
||||
// cell center
|
||||
$y -= ($h / 2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case 'T': {
|
||||
// cell top
|
||||
@ -3937,12 +3983,12 @@ if (!class_exists('TCPDF', false)) {
|
||||
switch ($valign) {
|
||||
case 'T': {
|
||||
// top
|
||||
$basefonty = $y + $this->FontAscent + $this->LineWidth;
|
||||
$basefonty = $y + $this->FontAscent + ($this->LineWidth / 2);
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
// bottom
|
||||
$basefonty = $y + $h - $this->FontDescent - $this->LineWidth;
|
||||
$basefonty = $y + $h - $this->FontDescent - ($this->LineWidth / 2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user