mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-22 12:55:10 +00:00
5.9.206 (2013-02-22)
- Bug item #754 "PNG with alpha channel becomes gray scale" was fixed. - Minor documentation fixes.
This commit is contained in:
parent
6b317b4e2e
commit
a77a36e8bb
@ -1,3 +1,7 @@
|
|||||||
|
5.9.206 (2013-02-22)
|
||||||
|
- Bug item #754 "PNG with alpha channel becomes gray scale" was fixed.
|
||||||
|
- Minor documentation fixes.
|
||||||
|
|
||||||
5.9.205 (2013-02-06)
|
5.9.205 (2013-02-06)
|
||||||
- The constant K_TCPDF_THROW_EXCEPTION_ERROR was added on configuration file to change the behavior of Error() method.
|
- The constant K_TCPDF_THROW_EXCEPTION_ERROR was added on configuration file to change the behavior of Error() method.
|
||||||
- PDF417 barcode bug was fixed.
|
- PDF417 barcode bug was fixed.
|
||||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 5.9.205
|
Version: 5.9.206
|
||||||
Release date: 2013-02-06
|
Release date: 2013-02-22
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2013:
|
Copyright (c) 2002-2013:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnick.com/tcpdf",
|
||||||
"version": "5.9.205",
|
"version": "5.9.206",
|
||||||
"homepage": "http://www.tcpdf.org/",
|
"homepage": "http://www.tcpdf.org/",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||||
|
39
tcpdf.php
39
tcpdf.php
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 5.9.205
|
// Version : 5.9.206
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2013-02-06
|
// Last Update : 2013-02-22
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
|
||||||
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -139,7 +139,7 @@
|
|||||||
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 5.9.205
|
* @version 5.9.206
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
|
||||||
@ -151,7 +151,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php');
|
|||||||
* 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>
|
* 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>
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @brief PHP class for generating PDF documents without requiring external extensions.
|
* @brief PHP class for generating PDF documents without requiring external extensions.
|
||||||
* @version 5.9.205
|
* @version 5.9.206
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -162,7 +162,7 @@ class TCPDF {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private $tcpdf_version = '5.9.205';
|
private $tcpdf_version = '5.9.206';
|
||||||
|
|
||||||
// Protected properties
|
// Protected properties
|
||||||
|
|
||||||
@ -5098,13 +5098,14 @@ class TCPDF {
|
|||||||
* @since 4.0.013 (2008-07-28)
|
* @since 4.0.013 (2008-07-28)
|
||||||
*/
|
*/
|
||||||
protected function getFontsList() {
|
protected function getFontsList() {
|
||||||
$fontsdir = opendir($this->_getfontpath());
|
if (($fontsdir = opendir($this->_getfontpath())) !== false) {
|
||||||
while (($file = readdir($fontsdir)) !== false) {
|
while (($file = readdir($fontsdir)) !== false) {
|
||||||
if (substr($file, -4) == '.php') {
|
if (substr($file, -4) == '.php') {
|
||||||
array_push($this->fontlist, strtolower(basename($file, '.php')));
|
array_push($this->fontlist, strtolower(basename($file, '.php')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
closedir($fontsdir);
|
||||||
}
|
}
|
||||||
closedir($fontsdir);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -8706,12 +8707,20 @@ class TCPDF {
|
|||||||
// clone image object
|
// clone image object
|
||||||
$imga = $this->objclone($img);
|
$imga = $this->objclone($img);
|
||||||
// extract alpha channel
|
// extract alpha channel
|
||||||
$img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE);
|
if (method_exists($img, 'setImageAlphaChannel') AND defined('Imagick::ALPHACHANNEL_EXTRACT')) {
|
||||||
$img->negateImage(true);
|
$img->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT);
|
||||||
|
} else {
|
||||||
|
$img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE);
|
||||||
|
$img->negateImage(true);
|
||||||
|
}
|
||||||
$img->setImageFormat('png');
|
$img->setImageFormat('png');
|
||||||
$img->writeImage($tempfile_alpha);
|
$img->writeImage($tempfile_alpha);
|
||||||
// remove alpha channel
|
// remove alpha channel
|
||||||
$imga->separateImageChannel(39); // 39 = (imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE));
|
if (method_exists($imga, 'setImageMatte')) {
|
||||||
|
$imga->setImageMatte(false);
|
||||||
|
} else {
|
||||||
|
$imga->separateImageChannel(39); // 39 = (imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE));
|
||||||
|
}
|
||||||
$imga->setImageFormat('png');
|
$imga->setImageFormat('png');
|
||||||
$imga->writeImage($tempfile_plain);
|
$imga->writeImage($tempfile_plain);
|
||||||
} elseif (function_exists('imagecreatefrompng')) { // GD extension
|
} elseif (function_exists('imagecreatefrompng')) { // GD extension
|
||||||
@ -22336,6 +22345,9 @@ class TCPDF {
|
|||||||
* Prints a cell (rectangular area) with optional borders, background color and html text string.
|
* Prints a cell (rectangular area) with optional borders, background color and html text string.
|
||||||
* The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.<br />
|
* The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.<br />
|
||||||
* If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
|
* If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
|
||||||
|
* IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
|
||||||
|
* Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
|
||||||
|
* NOTE: all the HTML attributes must be enclosed in double-quote.
|
||||||
* @param $w (float) Cell width. If 0, the cell extends up to the right margin.
|
* @param $w (float) Cell width. If 0, the cell extends up to the right margin.
|
||||||
* @param $h (float) Cell minimum height. The cell extends automatically if needed.
|
* @param $h (float) Cell minimum height. The cell extends automatically if needed.
|
||||||
* @param $x (float) upper-left corner X coordinate
|
* @param $x (float) upper-left corner X coordinate
|
||||||
@ -22359,6 +22371,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
* Allows to preserve some HTML formatting (limited support).<br />
|
* Allows to preserve some HTML formatting (limited support).<br />
|
||||||
* IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
|
* IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting.
|
||||||
* Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
|
* Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
|
||||||
|
* NOTE: all the HTML attributes must be enclosed in double-quote.
|
||||||
* @param $html (string) text to display
|
* @param $html (string) text to display
|
||||||
* @param $ln (boolean) if true add a new line after text (default = true)
|
* @param $ln (boolean) if true add a new line after text (default = true)
|
||||||
* @param $fill (boolean) Indicates if the background must be painted (true) or transparent (false).
|
* @param $fill (boolean) Indicates if the background must be painted (true) or transparent (false).
|
||||||
|
Loading…
Reference in New Issue
Block a user