30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-05-31 21:30:47 +00:00

6.0.072 (2014-04-27)

- Deprecated curly braces substring syntax was replaced with square braces.
This commit is contained in:
nicolaasuni 2014-04-27 12:30:23 +01:00
parent e85569fc03
commit 6c3cfd5b16
9 changed files with 28 additions and 25 deletions

View File

@ -1,3 +1,6 @@
6.0.072 (2014-04-27)
- Deprecated curly braces substring syntax was replaced with square braces.
6.0.071 (2014-04-25) 6.0.071 (2014-04-25)
- Bug #911 "error with buffered png pics" was fixed. - Bug #911 "error with buffered png pics" was fixed.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 6.0.071 Version: 6.0.072
Release date: 2014-04-25 Release date: 2014-04-27
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2014: Copyright (c) 2002-2014:

View File

@ -1,6 +1,6 @@
{ {
"name": "tecnick.com/tcpdf", "name": "tecnick.com/tcpdf",
"version": "6.0.071", "version": "6.0.072",
"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.",

View File

@ -104,7 +104,7 @@ for ($i = 0; $i < 3; ++$i) {
$fitbox = $horizontal_alignments[$i].' '; $fitbox = $horizontal_alignments[$i].' ';
$x = 15; $x = 15;
for ($j = 0; $j < 3; ++$j) { for ($j = 0; $j < 3; ++$j) {
$fitbox{1} = $vertical_alignments[$j]; $fitbox[1] = $vertical_alignments[$j];
$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,128)); $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 $x += 32; // new column
@ -120,7 +120,7 @@ for ($i = 0; $i < 3; ++$i) {
$fitbox = $horizontal_alignments[$i].' '; $fitbox = $horizontal_alignments[$i].' ';
$x = 115; $x = 115;
for ($j = 0; $j < 3; ++$j) { for ($j = 0; $j < 3; ++$j) {
$fitbox{1} = $vertical_alignments[$j]; $fitbox[1] = $vertical_alignments[$j];
$pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,255)); $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 $x += 27; // new column

View File

@ -935,11 +935,11 @@ class PDF417 {
} }
if ($sublen == 6) { if ($sublen == 6) {
$t = bcmul(''.ord($code[0]), '1099511627776'); $t = bcmul(''.ord($code[0]), '1099511627776');
$t = bcadd($t, bcmul(''.ord($code{1}), '4294967296')); $t = bcadd($t, bcmul(''.ord($code[1]), '4294967296'));
$t = bcadd($t, bcmul(''.ord($code{2}), '16777216')); $t = bcadd($t, bcmul(''.ord($code[2]), '16777216'));
$t = bcadd($t, bcmul(''.ord($code{3}), '65536')); $t = bcadd($t, bcmul(''.ord($code[3]), '65536'));
$t = bcadd($t, bcmul(''.ord($code{4}), '256')); $t = bcadd($t, bcmul(''.ord($code[4]), '256'));
$t = bcadd($t, ''.ord($code{5})); $t = bcadd($t, ''.ord($code[5]));
// tmp array for the 6 bytes block // tmp array for the 6 bytes block
$cw6 = array(); $cw6 = array();
do { do {

View File

@ -218,7 +218,7 @@ class TCPDF_IMAGES {
if (count($icc) > 0) { if (count($icc) > 0) {
ksort($icc); ksort($icc);
$icc = implode('', $icc); $icc = implode('', $icc);
if ((ord($icc{36}) != 0x61) OR (ord($icc{37}) != 0x63) OR (ord($icc{38}) != 0x73) OR (ord($icc{39}) != 0x70)) { if ((ord($icc[36]) != 0x61) OR (ord($icc[37]) != 0x63) OR (ord($icc[38]) != 0x73) OR (ord($icc[39]) != 0x70)) {
// invalid ICC profile // invalid ICC profile
$icc = false; $icc = false;
} }
@ -300,9 +300,9 @@ class TCPDF_IMAGES {
// read transparency info // read transparency info
$t = TCPDF_STATIC::rfread($f, $n); $t = TCPDF_STATIC::rfread($f, $n);
if ($ct == 0) { // DeviceGray if ($ct == 0) { // DeviceGray
$trns = array(ord($t{1})); $trns = array(ord($t[1]));
} elseif ($ct == 2) { // DeviceRGB } elseif ($ct == 2) { // DeviceRGB
$trns = array(ord($t{1}), ord($t{3}), ord($t{5})); $trns = array(ord($t[1]), ord($t[3]), ord($t[5]));
} else { // Indexed } else { // Indexed
if ($n > 0) { if ($n > 0) {
$trns = array(); $trns = array();

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version. * Current TCPDF version.
* @private static * @private static
*/ */
private static $tcpdf_version = '6.0.071'; private static $tcpdf_version = '6.0.072';
/** /**
* String alias for total number of pages. * String alias for total number of pages.
@ -137,7 +137,7 @@ class TCPDF_STATIC {
public static function set_mqr($mqr) { public static function set_mqr($mqr) {
if (!defined('PHP_VERSION_ID')) { if (!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION; $version = PHP_VERSION;
define('PHP_VERSION_ID', (($version[0] * 10000) + ($version{2} * 100) + $version{4})); define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
} }
if (PHP_VERSION_ID < 50300) { if (PHP_VERSION_ID < 50300) {
@set_magic_quotes_runtime($mqr); @set_magic_quotes_runtime($mqr);
@ -153,7 +153,7 @@ class TCPDF_STATIC {
public static function get_mqr() { public static function get_mqr() {
if (!defined('PHP_VERSION_ID')) { if (!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION; $version = PHP_VERSION;
define('PHP_VERSION_ID', (($version[0] * 10000) + ($version{2} * 100) + $version{4})); define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
} }
if (PHP_VERSION_ID < 50300) { if (PHP_VERSION_ID < 50300) {
return @get_magic_quotes_runtime(); return @get_magic_quotes_runtime();
@ -2232,7 +2232,7 @@ class TCPDF_STATIC {
break; break;
} }
case ':': { // pseudo-class or pseudo-element case ':': { // pseudo-class or pseudo-element
if ($attrib{1} == ':') { // pseudo-element if ($attrib[1] == ':') { // pseudo-element
// pseudo-elements are not supported! // pseudo-elements are not supported!
// (::first-line, ::first-letter, ::before, ::after) // (::first-line, ::first-letter, ::before, ::after)
} else { // pseudo-class } else { // pseudo-class

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : tcpdf.php // File name : tcpdf.php
// Version : 6.0.071 // Version : 6.0.072
// Begin : 2002-08-03 // Begin : 2002-08-03
// Last Update : 2014-04-25 // Last Update : 2014-04-27
// 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.0.071 * @version 6.0.072
*/ */
// 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.0.071 * @version 6.0.072
* @author Nicola Asuni - info@tecnick.com * @author Nicola Asuni - info@tecnick.com
*/ */
class TCPDF { class TCPDF {
@ -6895,7 +6895,7 @@ class TCPDF {
// height difference // height difference
$hdiff = ($oldh - $h); $hdiff = ($oldh - $h);
// vertical alignment // vertical alignment
switch (strtoupper($fitbox{1})) { switch (strtoupper($fitbox[1])) {
case 'T': { case 'T': {
break; break;
} }

View File

@ -1445,7 +1445,7 @@ class TCPDFBarcode {
$seq = '101'; // left guard bar $seq = '101'; // left guard bar
if ($upce) { if ($upce) {
$bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
$p = $upce_parities[$code{1}][$r]; $p = $upce_parities[$code[1]][$r];
for ($i = 0; $i < 6; ++$i) { for ($i = 0; $i < 6; ++$i) {
$seq .= $codes[$p[$i]][$upce_code{$i}]; $seq .= $codes[$p[$i]][$upce_code{$i}];
} }
@ -1504,7 +1504,7 @@ class TCPDFBarcode {
if ($len == 2) { if ($len == 2) {
$r = $code % 4; $r = $code % 4;
} elseif ($len == 5) { } elseif ($len == 5) {
$r = (3 * ($code[0] + $code{2} + $code{4})) + (9 * ($code{1} + $code{3})); $r = (3 * ($code[0] + $code[2] + $code[4])) + (9 * ($code[1] + $code[3]));
$r %= 10; $r %= 10;
} else { } else {
return false; return false;
@ -2070,7 +2070,7 @@ class TCPDFBarcode {
$binary_code = bcmul($binary_code, 10); $binary_code = bcmul($binary_code, 10);
$binary_code = bcadd($binary_code, $tracking_number[0]); $binary_code = bcadd($binary_code, $tracking_number[0]);
$binary_code = bcmul($binary_code, 5); $binary_code = bcmul($binary_code, 5);
$binary_code = bcadd($binary_code, $tracking_number{1}); $binary_code = bcadd($binary_code, $tracking_number[1]);
$binary_code .= substr($tracking_number, 2, 18); $binary_code .= substr($tracking_number, 2, 18);
// convert to hexadecimal // convert to hexadecimal
$binary_code = $this->dec_to_hex($binary_code); $binary_code = $this->dec_to_hex($binary_code);