Updated TCPDF to 6.2.12
This commit is contained in:
parent
5710bcd38a
commit
5dfa9ba369
@ -28,7 +28,7 @@ php-iban 1.4.7 LGPL-3+ Yes
|
|||||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||||
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
||||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
TCPDF 6.2.12 LGPL-3+ Yes PDF generation
|
||||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||||
|
|
||||||
JS libraries:
|
JS libraries:
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
"mobiledetect/mobiledetectlib": "2.8.3",
|
"mobiledetect/mobiledetectlib": "2.8.3",
|
||||||
"phpoffice/phpexcel": "1.8.1",
|
"phpoffice/phpexcel": "1.8.1",
|
||||||
"restler/framework": "^3.0",
|
"restler/framework": "^3.0",
|
||||||
"tecnickcom/tcpdf": "6.2.6",
|
"tecnickcom/tcpdf": "6.2.12",
|
||||||
"raven/raven": "^0.12.0",
|
"raven/raven": "^0.12.0",
|
||||||
"firephp/firephp-core": "^0.4.0"
|
"firephp/firephp-core": "^0.4.0"
|
||||||
},
|
},
|
||||||
|
|||||||
21
composer.lock
generated
21
composer.lock
generated
@ -4,7 +4,8 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "335eb7bd5c2eb116fd2da80b4f48e857",
|
"hash": "e4ff9778aef8c35c239457e96b32ee5c",
|
||||||
|
"content-hash": "e98d327da132b265127ad23d79a49578",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "ccampbell/chromephp",
|
"name": "ccampbell/chromephp",
|
||||||
@ -132,12 +133,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mike42/escpos-php.git",
|
"url": "https://github.com/mike42/escpos-php.git",
|
||||||
"reference": "0564ff94de45564221eca99c4cd5ab24492894c2"
|
"reference": "63648d03d47b81e8f6c1020ac92f051a3f3b5793"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mike42/escpos-php/zipball/0564ff94de45564221eca99c4cd5ab24492894c2",
|
"url": "https://api.github.com/repos/mike42/escpos-php/zipball/63648d03d47b81e8f6c1020ac92f051a3f3b5793",
|
||||||
"reference": "0564ff94de45564221eca99c4cd5ab24492894c2",
|
"reference": "63648d03d47b81e8f6c1020ac92f051a3f3b5793",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -182,7 +183,7 @@
|
|||||||
"print",
|
"print",
|
||||||
"receipt"
|
"receipt"
|
||||||
],
|
],
|
||||||
"time": "2015-11-02 10:50:46"
|
"time": "2015-12-04 10:23:55"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mobiledetect/mobiledetectlib",
|
"name": "mobiledetect/mobiledetectlib",
|
||||||
@ -423,16 +424,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tecnickcom/tcpdf",
|
"name": "tecnickcom/tcpdf",
|
||||||
"version": "6.2.6",
|
"version": "6.2.12",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/tecnickcom/TCPDF.git",
|
"url": "https://github.com/tecnickcom/TCPDF.git",
|
||||||
"reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb"
|
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb",
|
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f",
|
||||||
"reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb",
|
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -482,7 +483,7 @@
|
|||||||
"pdf417",
|
"pdf417",
|
||||||
"qrcode"
|
"qrcode"
|
||||||
],
|
],
|
||||||
"time": "2015-01-28 18:51:40"
|
"time": "2015-09-12 10:08:34"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
@ -1,3 +1,24 @@
|
|||||||
|
6.2.12 (2015-09-12)
|
||||||
|
- fix composer package name to tecnickcom/tcpdf
|
||||||
|
|
||||||
|
6.2.11 (2015-08-02)
|
||||||
|
- Bug #1070 "PNG regression in 6.2.9 (they appear as their alpha channel)" was fixed.
|
||||||
|
- Bug #1069 "Encoded SRC URLs in <img> tags don't work anymore" was fixed.
|
||||||
|
|
||||||
|
6.2.10 (2015-07-28)
|
||||||
|
- Minor mod to PNG parsing.
|
||||||
|
- Make dependency on mcrypt optional.
|
||||||
|
|
||||||
|
6.2.8 (2015-04-29)
|
||||||
|
- Removed unwanted file.
|
||||||
|
|
||||||
|
6.2.7 (2015-04-28)
|
||||||
|
- Merged PR 17: Avoid warning when iterating a non-array variable.
|
||||||
|
- Merged PR 16: Improve MuliCell param definition.
|
||||||
|
- Improved column check (PR 15).
|
||||||
|
- Merged PR 11: Use stream_is_local instead of limit to file://.
|
||||||
|
- Merged PR 10: ImageMagick link on README.txt.
|
||||||
|
|
||||||
6.2.6 (2015-01-28)
|
6.2.6 (2015-01-28)
|
||||||
- Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed.
|
- Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed.
|
||||||
|
|
||||||
|
|||||||
@ -4,12 +4,13 @@ TCPDF - README
|
|||||||
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
|
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
|
||||||
PLEASE MAKE A DONATION:
|
PLEASE MAKE A DONATION:
|
||||||
http://sourceforge.net/donate/index.php?group_id=128076
|
http://sourceforge.net/donate/index.php?group_id=128076
|
||||||
|
or via PayPal at paypal@tecnick.com
|
||||||
|
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Name: TCPDF
|
Name: TCPDF
|
||||||
Version: 6.2.6
|
Version: 6.2.12
|
||||||
Release date: 2015-01-28
|
Release date: 2015-09-12
|
||||||
Author: Nicola Asuni
|
Author: Nicola Asuni
|
||||||
|
|
||||||
Copyright (c) 2002-2015:
|
Copyright (c) 2002-2015:
|
||||||
@ -20,6 +21,7 @@ Copyright (c) 2002-2015:
|
|||||||
URLs:
|
URLs:
|
||||||
http://www.tcpdf.org
|
http://www.tcpdf.org
|
||||||
http://www.sourceforge.net/projects/tcpdf
|
http://www.sourceforge.net/projects/tcpdf
|
||||||
|
https://github.com/tecnickcom/TCPDF
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
|
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
|
||||||
@ -34,7 +36,7 @@ Main Features:
|
|||||||
* font subsetting;
|
* font subsetting;
|
||||||
* methods to publish some XHTML + CSS code, Javascript and Forms;
|
* methods to publish some XHTML + CSS code, Javascript and Forms;
|
||||||
* images, graphic (geometric figures) and transformation methods;
|
* images, graphic (geometric figures) and transformation methods;
|
||||||
* supports JPEG, PNG and SVG 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 JPEG, PNG and SVG 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/script/formats.php)
|
||||||
* 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 Extension, 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, Datamatrix, QR-Code, PDF417;
|
* 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 Extension, 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, Datamatrix, QR-Code, PDF417;
|
||||||
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||||
* automatic page header and footer management;
|
* automatic page header and footer management;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnick.com/tcpdf",
|
"name": "tecnickcom/tcpdf",
|
||||||
"version": "6.2.6",
|
"version": "6.2.12",
|
||||||
"homepage": "http://www.tcpdf.org/",
|
"homepage": "http://www.tcpdf.org/",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||||
|
|||||||
@ -720,6 +720,7 @@ class QRcode {
|
|||||||
protected function encodeMask($mask) {
|
protected function encodeMask($mask) {
|
||||||
$spec = array(0, 0, 0, 0, 0);
|
$spec = array(0, 0, 0, 0, 0);
|
||||||
$this->datacode = $this->getByteStream($this->items);
|
$this->datacode = $this->getByteStream($this->items);
|
||||||
|
|
||||||
if (is_null($this->datacode)) {
|
if (is_null($this->datacode)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,7 +154,7 @@ class TCPDF_FONTS {
|
|||||||
$enc_target = TCPDF_FONT_DATA::$encmap[$enc];
|
$enc_target = TCPDF_FONT_DATA::$encmap[$enc];
|
||||||
$last = 0;
|
$last = 0;
|
||||||
for ($i = 32; $i <= 255; ++$i) {
|
for ($i = 32; $i <= 255; ++$i) {
|
||||||
if ($enc_target != $enc_ref[$i]) {
|
if ($enc_target[$i] != $enc_ref[$i]) {
|
||||||
if ($i != ($last + 1)) {
|
if ($i != ($last + 1)) {
|
||||||
$fmetric['diff'] .= $i.' ';
|
$fmetric['diff'] .= $i.' ';
|
||||||
}
|
}
|
||||||
@ -1490,6 +1490,171 @@ class TCPDF_FONTS {
|
|||||||
return '/W ['.$w.' ]';
|
return '/W ['.$w.' ]';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the CIDToGIDMap string with a new value.
|
||||||
|
* @param $map (string) CIDToGIDMap.
|
||||||
|
* @param $cid (int) CID value.
|
||||||
|
* @param $gid (int) GID value.
|
||||||
|
* @return (string) CIDToGIDMap.
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @since 5.9.123 (2011-09-29)
|
||||||
|
* @public static
|
||||||
|
*/
|
||||||
|
public static function updateCIDtoGIDmap($map, $cid, $gid) {
|
||||||
|
if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) {
|
||||||
|
if ($gid > 0xFFFF) {
|
||||||
|
$gid -= 0x10000;
|
||||||
|
}
|
||||||
|
$map[($cid * 2)] = chr($gid >> 8);
|
||||||
|
$map[(($cid * 2) + 1)] = chr($gid & 0xFF);
|
||||||
|
}
|
||||||
|
return $map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return fonts path
|
||||||
|
* @return string
|
||||||
|
* @public static
|
||||||
|
*/
|
||||||
|
public static function _getfontpath() {
|
||||||
|
if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) {
|
||||||
|
if (substr($fdir, -1) != '/') {
|
||||||
|
$fdir .= '/';
|
||||||
|
}
|
||||||
|
define('K_PATH_FONTS', $fdir);
|
||||||
|
}
|
||||||
|
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return font full path
|
||||||
|
* @param $file (string) Font file name.
|
||||||
|
* @param $fontdir (string) Font directory (set to false fto search on default directories)
|
||||||
|
* @return string Font full path or empty string
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @since 6.0.025
|
||||||
|
* @public static
|
||||||
|
*/
|
||||||
|
public static function getFontFullPath($file, $fontdir=false) {
|
||||||
|
$fontfile = '';
|
||||||
|
// search files on various directories
|
||||||
|
if (($fontdir !== false) AND @file_exists($fontdir.$file)) {
|
||||||
|
$fontfile = $fontdir.$file;
|
||||||
|
} elseif (@file_exists(self::_getfontpath().$file)) {
|
||||||
|
$fontfile = self::_getfontpath().$file;
|
||||||
|
} elseif (@file_exists($file)) {
|
||||||
|
$fontfile = $file;
|
||||||
|
}
|
||||||
|
return $fontfile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a reference font size.
|
||||||
|
* @param $size (string) String containing font size value.
|
||||||
|
* @param $refsize (float) Reference font size in points.
|
||||||
|
* @return float value in points
|
||||||
|
* @public static
|
||||||
|
*/
|
||||||
|
public static function getFontRefSize($size, $refsize=12) {
|
||||||
|
switch ($size) {
|
||||||
|
case 'xx-small': {
|
||||||
|
$size = ($refsize - 4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'x-small': {
|
||||||
|
$size = ($refsize - 3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'small': {
|
||||||
|
$size = ($refsize - 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'medium': {
|
||||||
|
$size = $refsize;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'large': {
|
||||||
|
$size = ($refsize + 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'x-large': {
|
||||||
|
$size = ($refsize + 4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'xx-large': {
|
||||||
|
$size = ($refsize + 6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'smaller': {
|
||||||
|
$size = ($refsize - 3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'larger': {
|
||||||
|
$size = ($refsize + 3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ====================================================================================================================
|
||||||
|
// REIMPLEMENTED
|
||||||
|
// ====================================================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unicode caracter specified by the value
|
* Returns the unicode caracter specified by the value
|
||||||
* @param $c (int) UTF-8 value
|
* @param $c (int) UTF-8 value
|
||||||
@ -1663,64 +1828,6 @@ class TCPDF_FONTS {
|
|||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the CIDToGIDMap string with a new value.
|
|
||||||
* @param $map (string) CIDToGIDMap.
|
|
||||||
* @param $cid (int) CID value.
|
|
||||||
* @param $gid (int) GID value.
|
|
||||||
* @return (string) CIDToGIDMap.
|
|
||||||
* @author Nicola Asuni
|
|
||||||
* @since 5.9.123 (2011-09-29)
|
|
||||||
* @public static
|
|
||||||
*/
|
|
||||||
public static function updateCIDtoGIDmap($map, $cid, $gid) {
|
|
||||||
if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) {
|
|
||||||
if ($gid > 0xFFFF) {
|
|
||||||
$gid -= 0x10000;
|
|
||||||
}
|
|
||||||
$map[($cid * 2)] = chr($gid >> 8);
|
|
||||||
$map[(($cid * 2) + 1)] = chr($gid & 0xFF);
|
|
||||||
}
|
|
||||||
return $map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return fonts path
|
|
||||||
* @return string
|
|
||||||
* @public static
|
|
||||||
*/
|
|
||||||
public static function _getfontpath() {
|
|
||||||
if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) {
|
|
||||||
if (substr($fdir, -1) != '/') {
|
|
||||||
$fdir .= '/';
|
|
||||||
}
|
|
||||||
define('K_PATH_FONTS', $fdir);
|
|
||||||
}
|
|
||||||
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return font full path
|
|
||||||
* @param $file (string) Font file name.
|
|
||||||
* @param $fontdir (string) Font directory (set to false fto search on default directories)
|
|
||||||
* @return string Font full path or empty string
|
|
||||||
* @author Nicola Asuni
|
|
||||||
* @since 6.0.025
|
|
||||||
* @public static
|
|
||||||
*/
|
|
||||||
public static function getFontFullPath($file, $fontdir=false) {
|
|
||||||
$fontfile = '';
|
|
||||||
// search files on various directories
|
|
||||||
if (($fontdir !== false) AND @file_exists($fontdir.$file)) {
|
|
||||||
$fontfile = $fontdir.$file;
|
|
||||||
} elseif (@file_exists(self::_getfontpath().$file)) {
|
|
||||||
$fontfile = self::_getfontpath().$file;
|
|
||||||
} elseif (@file_exists($file)) {
|
|
||||||
$fontfile = $file;
|
|
||||||
}
|
|
||||||
return $fontfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts UTF-8 characters array to array of Latin1 characters array<br>
|
* Converts UTF-8 characters array to array of Latin1 characters array<br>
|
||||||
* @param $unicode (array) array containing UTF-8 unicode values
|
* @param $unicode (array) array containing UTF-8 unicode values
|
||||||
@ -2535,55 +2642,6 @@ class TCPDF_FONTS {
|
|||||||
return $ordarray;
|
return $ordarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a reference font size.
|
|
||||||
* @param $size (string) String containing font size value.
|
|
||||||
* @param $refsize (float) Reference font size in points.
|
|
||||||
* @return float value in points
|
|
||||||
* @public static
|
|
||||||
*/
|
|
||||||
public static function getFontRefSize($size, $refsize=12) {
|
|
||||||
switch ($size) {
|
|
||||||
case 'xx-small': {
|
|
||||||
$size = ($refsize - 4);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'x-small': {
|
|
||||||
$size = ($refsize - 3);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'small': {
|
|
||||||
$size = ($refsize - 2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'medium': {
|
|
||||||
$size = $refsize;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'large': {
|
|
||||||
$size = ($refsize + 2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'x-large': {
|
|
||||||
$size = ($refsize + 4);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'xx-large': {
|
|
||||||
$size = ($refsize + 6);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'smaller': {
|
|
||||||
$size = ($refsize - 3);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'larger': {
|
|
||||||
$size = ($refsize + 3);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $size;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // END OF TCPDF_FONTS CLASS
|
} // END OF TCPDF_FONTS CLASS
|
||||||
|
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|||||||
@ -160,6 +160,14 @@ class TCPDF_IMAGES {
|
|||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function _parsejpeg($file) {
|
public static function _parsejpeg($file) {
|
||||||
|
// check if is a local file
|
||||||
|
if (!@file_exists($file)) {
|
||||||
|
// try to encode spaces on filename
|
||||||
|
$tfile = str_replace(' ', '%20', $file);
|
||||||
|
if (@file_exists($tfile)) {
|
||||||
|
$file = $tfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
$a = getimagesize($file);
|
$a = getimagesize($file);
|
||||||
if (empty($a)) {
|
if (empty($a)) {
|
||||||
//Missing or incorrect image file
|
//Missing or incorrect image file
|
||||||
@ -289,8 +297,8 @@ class TCPDF_IMAGES {
|
|||||||
$trns = '';
|
$trns = '';
|
||||||
$data = '';
|
$data = '';
|
||||||
$icc = false;
|
$icc = false;
|
||||||
|
$n = TCPDF_STATIC::_freadint($f);
|
||||||
do {
|
do {
|
||||||
$n = TCPDF_STATIC::_freadint($f);
|
|
||||||
$type = fread($f, 4);
|
$type = fread($f, 4);
|
||||||
if ($type == 'PLTE') {
|
if ($type == 'PLTE') {
|
||||||
// read palette
|
// read palette
|
||||||
@ -338,6 +346,7 @@ class TCPDF_IMAGES {
|
|||||||
} else {
|
} else {
|
||||||
TCPDF_STATIC::rfread($f, $n + 4);
|
TCPDF_STATIC::rfread($f, $n + 4);
|
||||||
}
|
}
|
||||||
|
$n = TCPDF_STATIC::_freadint($f);
|
||||||
} while ($n);
|
} while ($n);
|
||||||
if (($colspace == 'Indexed') AND (empty($pal))) {
|
if (($colspace == 'Indexed') AND (empty($pal))) {
|
||||||
// Missing palette
|
// Missing palette
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf.php
|
// File name : tcpdf.php
|
||||||
// Version : 6.2.6
|
// Version : 6.2.12
|
||||||
// Begin : 2002-08-03
|
// Begin : 2002-08-03
|
||||||
// Last Update : 2015-01-28
|
// Last Update : 2015-06-18
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -104,7 +104,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 6.2.6
|
* @version 6.2.8
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TCPDF configuration
|
// TCPDF configuration
|
||||||
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.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 6.2.6
|
* @version 6.2.8
|
||||||
* @author Nicola Asuni - info@tecnick.com
|
* @author Nicola Asuni - info@tecnick.com
|
||||||
*/
|
*/
|
||||||
class TCPDF {
|
class TCPDF {
|
||||||
@ -5748,7 +5748,7 @@ class TCPDF {
|
|||||||
* @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width.
|
* @param $autopadding (boolean) if true, uses internal padding and automatically adjust it to account for line width.
|
||||||
* @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
|
* @param $maxh (float) maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.
|
||||||
* @param $valign (string) Vertical alignment of text (requires $maxh = $h > 0). Possible values are:<ul><li>T: TOP</li><li>M: middle</li><li>B: bottom</li></ul>. This feature works only when $ishtml=false and the cell must fit in a single page.
|
* @param $valign (string) Vertical alignment of text (requires $maxh = $h > 0). Possible values are:<ul><li>T: TOP</li><li>M: middle</li><li>B: bottom</li></ul>. This feature works only when $ishtml=false and the cell must fit in a single page.
|
||||||
* @param $fitcell (boolean) if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and wqual to $h.
|
* @param $fitcell (boolean) if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and equal to $h.
|
||||||
* @return int Return the number of cells or 1 for html mode.
|
* @return int Return the number of cells or 1 for html mode.
|
||||||
* @public
|
* @public
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
@ -10362,7 +10362,7 @@ class TCPDF {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) {
|
public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) {
|
||||||
if (isset($url[1]) AND ($url[0] == '#')) {
|
if (isset($url[1]) AND ($url[0] == '#') AND is_numeric($url[1])) {
|
||||||
// convert url to internal link
|
// convert url to internal link
|
||||||
$lnkdata = explode(',', $url);
|
$lnkdata = explode(',', $url);
|
||||||
if (isset($lnkdata[0]) ) {
|
if (isset($lnkdata[0]) ) {
|
||||||
@ -10632,8 +10632,7 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected function _UEvalue() {
|
protected function _UEvalue() {
|
||||||
$hashkey = hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UKS'], true);
|
$hashkey = hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UKS'], true);
|
||||||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC));
|
return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']);
|
||||||
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10683,8 +10682,7 @@ class TCPDF {
|
|||||||
*/
|
*/
|
||||||
protected function _OEvalue() {
|
protected function _OEvalue() {
|
||||||
$hashkey = hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OKS'].$this->encryptdata['U'], true);
|
$hashkey = hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OKS'].$this->encryptdata['U'], true);
|
||||||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC));
|
return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']);
|
||||||
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10739,8 +10737,7 @@ class TCPDF {
|
|||||||
}
|
}
|
||||||
$perms .= 'adb'; // bytes 9-11
|
$perms .= 'adb'; // bytes 9-11
|
||||||
$perms .= 'nick'; // bytes 12-15
|
$perms .= 'nick'; // bytes 12-15
|
||||||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB));
|
$this->encryptdata['perms'] = TCPDF_STATIC::_AESnopad($this->encryptdata['key'], $perms);
|
||||||
$this->encryptdata['perms'] = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->encryptdata['key'], $perms, MCRYPT_MODE_ECB, $iv);
|
|
||||||
} else { // RC4-40, RC4-128, AES-128
|
} else { // RC4-40, RC4-128, AES-128
|
||||||
// Pad passwords
|
// Pad passwords
|
||||||
$this->encryptdata['user_password'] = substr($this->encryptdata['user_password'].TCPDF_STATIC::$enc_padding, 0, 32);
|
$this->encryptdata['user_password'] = substr($this->encryptdata['user_password'].TCPDF_STATIC::$enc_padding, 0, 32);
|
||||||
@ -10858,10 +10855,13 @@ class TCPDF {
|
|||||||
$this->encryptdata['StrF'] = 'StdCF';
|
$this->encryptdata['StrF'] = 'StdCF';
|
||||||
}
|
}
|
||||||
if ($mode > 1) { // AES
|
if ($mode > 1) { // AES
|
||||||
if (!extension_loaded('mcrypt')) {
|
if (!extension_loaded('openssl') && !extension_loaded('mcrypt')) {
|
||||||
$this->Error('AES encryption requires mcrypt library (http://www.php.net/manual/en/mcrypt.requirements.php).');
|
$this->Error('AES encryption requires openssl or mcrypt extension (http://www.php.net/manual/en/mcrypt.requirements.php).');
|
||||||
}
|
}
|
||||||
if (mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) {
|
if (extension_loaded('openssl') && !in_array('aes-256-cbc', openssl_get_cipher_methods())) {
|
||||||
|
$this->Error('AES encryption requires openssl/aes-256-cbc cypher.');
|
||||||
|
}
|
||||||
|
if (extension_loaded('mcrypt') && mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) {
|
||||||
$this->Error('AES encryption requires MCRYPT_RIJNDAEL_128 cypher.');
|
$this->Error('AES encryption requires MCRYPT_RIJNDAEL_128 cypher.');
|
||||||
}
|
}
|
||||||
if (($mode == 3) AND !function_exists('hash')) {
|
if (($mode == 3) AND !function_exists('hash')) {
|
||||||
@ -18649,7 +18649,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
$this->lispacer = $prev_lispacer;
|
$this->lispacer = $prev_lispacer;
|
||||||
if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) {
|
if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) {
|
||||||
$this->Ln($this->lasth);
|
$this->Ln($this->lasth);
|
||||||
if ($this->y < $maxbottomliney) {
|
if (($this->y < $maxbottomliney) AND ($startlinepage == $this->page)) {
|
||||||
$this->y = $maxbottomliney;
|
$this->y = $maxbottomliney;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -19427,8 +19427,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
$prev_page = $this->page;
|
$prev_page = $this->page;
|
||||||
$this->setPage($dom[($dom[$key]['parent'])]['endpage']);
|
$this->setPage($dom[($dom[$key]['parent'])]['endpage']);
|
||||||
if ($this->num_columns > 1) {
|
if ($this->num_columns > 1) {
|
||||||
if ((($this->current_column == 0) AND ($dom[($dom[$key]['parent'])]['endcolumn'] == ($this->num_columns - 1)))
|
if (($prev_page < $this->page)
|
||||||
OR (($this->current_column == $dom[($dom[$key]['parent'])]['endcolumn']) AND ($prev_page < $this->page))) {
|
AND ((($this->current_column == 0) AND ($dom[($dom[$key]['parent'])]['endcolumn'] == ($this->num_columns - 1)))
|
||||||
|
OR ($this->current_column == $dom[($dom[$key]['parent'])]['endcolumn']))) {
|
||||||
// page jump
|
// page jump
|
||||||
$this->selectColumn(0);
|
$this->selectColumn(0);
|
||||||
$dom[($dom[$key]['parent'])]['endcolumn'] = 0;
|
$dom[($dom[$key]['parent'])]['endcolumn'] = 0;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : tcpdf_parser.php
|
// File name : tcpdf_parser.php
|
||||||
// Version : 1.0.15
|
// Version : 1.0.16
|
||||||
// Begin : 2011-05-23
|
// Begin : 2011-05-23
|
||||||
// Last Update : 2015-01-24
|
// Last Update : 2015-04-28
|
||||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
// Author : Nicola Asuni - Tecnick.com LTD - 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
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
@ -297,6 +297,9 @@ class TCPDF_PARSER {
|
|||||||
$valid_crs = false;
|
$valid_crs = false;
|
||||||
$columns = 0;
|
$columns = 0;
|
||||||
$sarr = $xrefcrs[0][1];
|
$sarr = $xrefcrs[0][1];
|
||||||
|
if (!is_array($sarr)) {
|
||||||
|
$sarr = array();
|
||||||
|
}
|
||||||
foreach ($sarr as $k => $v) {
|
foreach ($sarr as $k => $v) {
|
||||||
if (($v[0] == '/') AND ($v[1] == 'Type') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == '/') AND ($sarr[($k +1)][1] == 'XRef'))) {
|
if (($v[0] == '/') AND ($v[1] == 'Type') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == '/') AND ($sarr[($k +1)][1] == 'XRef'))) {
|
||||||
$valid_crs = true;
|
$valid_crs = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user