mirror of
https://github.com/vdm-io/tcpdf.git
synced 2024-11-25 22:07:33 +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)
|
||||
- The constant K_TCPDF_THROW_EXCEPTION_ERROR was added on configuration file to change the behavior of Error() method.
|
||||
- PDF417 barcode bug was fixed.
|
||||
|
@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 5.9.205
|
||||
Release date: 2013-02-06
|
||||
Version: 5.9.206
|
||||
Release date: 2013-02-22
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2002-2013:
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tecnick.com/tcpdf",
|
||||
"version": "5.9.205",
|
||||
"version": "5.9.206",
|
||||
"homepage": "http://www.tcpdf.org/",
|
||||
"type": "library",
|
||||
"description": "TCPDF is a PHP class for generating PDF documents.",
|
||||
|
39
tcpdf.php
39
tcpdf.php
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf.php
|
||||
// Version : 5.9.205
|
||||
// Version : 5.9.206
|
||||
// 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
|
||||
// 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>
|
||||
* @package com.tecnick.tcpdf
|
||||
* @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.
|
||||
@ -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>
|
||||
* @package com.tecnick.tcpdf
|
||||
* @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
|
||||
*/
|
||||
class TCPDF {
|
||||
@ -162,7 +162,7 @@ class TCPDF {
|
||||
* Current TCPDF version.
|
||||
* @private
|
||||
*/
|
||||
private $tcpdf_version = '5.9.205';
|
||||
private $tcpdf_version = '5.9.206';
|
||||
|
||||
// Protected properties
|
||||
|
||||
@ -5098,13 +5098,14 @@ class TCPDF {
|
||||
* @since 4.0.013 (2008-07-28)
|
||||
*/
|
||||
protected function getFontsList() {
|
||||
$fontsdir = opendir($this->_getfontpath());
|
||||
while (($file = readdir($fontsdir)) !== false) {
|
||||
if (substr($file, -4) == '.php') {
|
||||
array_push($this->fontlist, strtolower(basename($file, '.php')));
|
||||
if (($fontsdir = opendir($this->_getfontpath())) !== false) {
|
||||
while (($file = readdir($fontsdir)) !== false) {
|
||||
if (substr($file, -4) == '.php') {
|
||||
array_push($this->fontlist, strtolower(basename($file, '.php')));
|
||||
}
|
||||
}
|
||||
closedir($fontsdir);
|
||||
}
|
||||
closedir($fontsdir);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -8706,12 +8707,20 @@ class TCPDF {
|
||||
// clone image object
|
||||
$imga = $this->objclone($img);
|
||||
// extract alpha channel
|
||||
$img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE);
|
||||
$img->negateImage(true);
|
||||
if (method_exists($img, 'setImageAlphaChannel') AND defined('Imagick::ALPHACHANNEL_EXTRACT')) {
|
||||
$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->writeImage($tempfile_alpha);
|
||||
// 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->writeImage($tempfile_plain);
|
||||
} 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.
|
||||
* 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.
|
||||
* 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 $h (float) Cell minimum height. The cell extends automatically if needed.
|
||||
* @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 />
|
||||
* 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 $html (string) text to display
|
||||
* @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).
|
||||
|
Loading…
Reference in New Issue
Block a user