Skip to content

Commit

Permalink
[TASK] Update TCPDF to the latest version 6.0.080
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/formhandler/trunk@85360 735d13b6-9817-0410-8766-e36946ffe9aa
  • Loading branch information
reinhardfuehricht committed May 21, 2014
1 parent 3c976ae commit 1f8d4eb
Show file tree
Hide file tree
Showing 42 changed files with 3,409 additions and 333 deletions.
66 changes: 66 additions & 0 deletions Resources/PHP/tcpdf/CHANGELOG.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
6.0.080 (2014-05-20)
- Bug item #921 "Fatal error in hyphenateText() function" was fixed.
- Bug item #923 "Automatic Hyphenation error" was fixed.
- Patch #70 "Augument TCPDFBarcode classes with ability to return raw png image data" was applied.

6.0.079 (2014-05-19)
- Patch item #69 "Named destinations, HTML internal and external links" was merged.
- Bug item #920 "hyphenateText() should not hyphenate the content of style-tags in HTML mode" was fixed.
- Image method now trigs an error in case the cache is now writeable.
- Fixed issue with layer default status.

6.0.078 (2014-05-12)
- A warning issue in addTTFfont() method was fixed.
- Fonts were updated to include cbbox metrics.

6.0.077 (2014-05-06)
- A Datamatrix barcode bug was fixed.

6.0.076 (2014-05-06)
- A bug in Datamatrix Base256 encoding was fixed.
- Merged fix for SVG use/clip-gradient.
- Now it is possible to prefix a page number in Link methods with the * character to avoid been changed when adding/deleting/moving pages (see example_045.php).

6.0.075 (2014-05-05)
- Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed.

6.0.074 (2014-05-03)
- Part of Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed.
- Bug #915 "Problem with SVG Image using Radial Gradients" was fixed.

6.0.073 (2014-04-29)
- Bug #913 "Possible bug with line-height" was fixed.
- Bug #914 "MultiCell and FitCell" was fixed.
- Bug #915 "Problem with SVG Image using Radial Gradients" was fixed.

6.0.072 (2014-04-27)
- Deprecated curly braces substring syntax was replaced with square braces.

6.0.071 (2014-04-25)
- Bug #911 "error with buffered png pics" was fixed.

6.0.070 (2014-04-24)
- Bug #910 "An SVG image is being cut off (with clipping mask) when you use align options" was fixed.

6.0.069 (2014-04-24)
- Datamatrix Base256 encoding was fixed.

6.0.068 (2014-04-22)
- Some Datamatrix barcode bugs were fixed.

6.0.067 (2014-04-21)
- startLayer() method signature was changed to include a new "lock" parameter.

6.0.066 (2014-04-20)
- Bug #908 "Linebreak is not considered when getting length of the next string" was fixed.

6.0.065 (2014-04-10)
- Bug #905 "RGB percentage color bug in convertHTMLColorToDec()" was fixed.

6.0.064 (2014-04-07)
- Header and Footer fonts are now set by default.
- Bug #904 "PDF corrupted" was fixed.

6.0.063 (2014-04-03)
- Method TCPDF_IMAGES::_parsepng() was fixed to support transparency in Indexed images.

6.0.062 (2014-03-02)
- The method startLayer() now accepts the NULL value for the $print parameter to not set the print layer option.

Expand Down
4 changes: 2 additions & 2 deletions Resources/PHP/tcpdf/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------

Name: TCPDF
Version: 6.0.062
Release date: 2014-03-02
Version: 6.0.080
Release date: 2014-05-20
Author: Nicola Asuni

Copyright (c) 2002-2014:
Expand Down
40 changes: 0 additions & 40 deletions Resources/PHP/tcpdf/composer.json

This file was deleted.

6 changes: 3 additions & 3 deletions Resources/PHP/tcpdf/config/tcpdf_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
/**
* Default main font name.
*/
define ('PDF_FONT_NAME_MAIN', 'freesans');
define ('PDF_FONT_NAME_MAIN', 'helvetica');

/**
* Default main font size.
Expand All @@ -164,7 +164,7 @@
/**
* Default data font name.
*/
define ('PDF_FONT_NAME_DATA', 'freesans');
define ('PDF_FONT_NAME_DATA', 'helvetica');

/**
* Default data font size.
Expand All @@ -174,7 +174,7 @@
/**
* Default monospaced font name.
*/
define ('PDF_FONT_MONOSPACED', 'freemono');
define ('PDF_FONT_MONOSPACED', 'courier');

/**
* Ratio used to adjust the conversion of pixels to user units.
Expand Down
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freemono.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freemono.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freemonob.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freemonob.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freemonob.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freemonobi.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freemonobi.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freemonobi.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freemonoi.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freemonoi.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freemonoi.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freesans.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freesans.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freesans.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freesansb.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freesansb.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freesansb.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freesansbi.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freesansbi.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freesansbi.z
Binary file not shown.
Binary file modified Resources/PHP/tcpdf/fonts/freesansi.ctg.z
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/PHP/tcpdf/fonts/freesansi.php

Large diffs are not rendered by default.

Binary file modified Resources/PHP/tcpdf/fonts/freesansi.z
Binary file not shown.
69 changes: 46 additions & 23 deletions Resources/PHP/tcpdf/include/barcodes/datamatrix.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
//============================================================+
// File name : datamatrix.php
// Version : 1.0.004
// Version : 1.0.008
// Begin : 2010-06-07
// Last Update : 2013-12-12
// Last Update : 2014-05-06
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2010-2012 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2010-2014 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
Expand Down Expand Up @@ -40,7 +40,7 @@
*
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.004
* @version 1.0.008
*/

// custom definitions
Expand Down Expand Up @@ -256,14 +256,16 @@ public function __construct($code) {
return false;
} elseif ($params[11] > $nd) {
// add padding
if ($this->last_enc == ENC_EDF) {
// switch to ASCII encoding
$cw[] = 124;
++$nd;
} elseif (($this->last_enc != ENC_ASCII) AND ($this->last_enc != ENC_BASE256)) {
// switch to ASCII encoding
$cw[] = 254;
++$nd;
if ((($params[11] - $nd) > 1) AND ($cw[($nd - 1)] != 254)) {
if ($this->last_enc == ENC_EDF) {
// switch to ASCII encoding
$cw[] = 124;
++$nd;
} elseif (($this->last_enc != ENC_ASCII) AND ($this->last_enc != ENC_BASE256)) {
// switch to ASCII encoding
$cw[] = 254;
++$nd;
}
}
if ($params[11] > $nd) {
// add first pad
Expand Down Expand Up @@ -652,6 +654,9 @@ protected function getSwitchEncodingCodeword($mode) {
switch ($mode) {
case ENC_ASCII: { // ASCII character 0 to 127
$cw = 254;
if ($this->last_enc == ENC_EDF) {
$cw = 124;
}
break;
}
case ENC_C40: { // Upper-case alphanumeric
Expand Down Expand Up @@ -707,6 +712,8 @@ protected function getHighLevelEncoding($data) {
$cw_num = 0; // number of data codewords
$data_lenght = strlen($data); // number of chars
while ($pos < $data_lenght) {
// set last used encoding
$this->last_enc = $enc;
switch ($enc) {
case ENC_ASCII: { // STEP B. While in ASCII encodation
if (($data_lenght > 1) AND ($pos < ($data_lenght - 1)) AND ($this->isCharMode(ord($data[$pos]), ENC_ASCII_NUM) AND $this->isCharMode(ord($data[$pos + 1]), ENC_ASCII_NUM))) {
Expand Down Expand Up @@ -799,7 +806,13 @@ protected function getHighLevelEncoding($data) {
// 1. If the C40 encoding is at the point of starting a new double symbol character and if the look-ahead test (starting at step J) indicates another mode, switch to that mode.
$newenc = $this->lookAheadTest($data, $pos, $enc);
if ($newenc != $enc) {
// switch to new encoding
$enc = $newenc;
if ($enc != ENC_ASCII) {
// set unlatch character
$cw[] = $this->getSwitchEncodingCodeword(ENC_ASCII);
++$cw_num;
}
$cw[] = $this->getSwitchEncodingCodeword($enc);
++$cw_num;
$pos -= $p;
Expand All @@ -811,20 +824,26 @@ protected function getHighLevelEncoding($data) {
// process last data (if any)
if ($p > 0) {
// get remaining number of data symbols
$cwr = ($this->getMaxDataCodewords($cw_num + 2) - $cw_num);
$cwr = ($this->getMaxDataCodewords($cw_num) - $cw_num);
if (($cwr == 1) AND ($p == 1)) {
// d. If one symbol character remains and one C40 value (data character) remains to be encoded
$c1 = array_shift($temp_cw);
--$p;
$cw[] = ($c1 + 1);
$cw[] = ($chr + 1);
++$cw_num;
$pos = $epos;
$enc = ENC_ASCII;
$this->last_enc = $enc;
} elseif (($cwr == 2) AND ($p == 1)) {
// c. If two symbol characters remain and only one C40 value (data character) remains to be encoded
$c1 = array_shift($temp_cw);
--$p;
$cw[] = 254;
$cw[] = ($c1 + 1);
$cw[] = ($chr + 1);
$cw_num += 2;
$pos = $epos;
$enc = ENC_ASCII;
$this->last_enc = $enc;
} elseif (($cwr == 2) AND ($p == 2)) {
// b. If two symbol characters remain and two C40 values remain to be encoded
$c1 = array_shift($temp_cw);
Expand All @@ -834,12 +853,17 @@ protected function getHighLevelEncoding($data) {
$cw[] = ($tmp >> 8);
$cw[] = ($tmp % 256);
$cw_num += 2;
$pos = $epos;
$enc = ENC_ASCII;
$this->last_enc = $enc;
} else {
// switch to ASCII encoding
if ($enc != ENC_ASCII) {
$enc = ENC_ASCII;
$this->last_enc = $enc;
$cw[] = $this->getSwitchEncodingCodeword($enc);
++$cw_num;
$pos = ($epos - $p);
}
}
}
Expand All @@ -862,6 +886,8 @@ protected function getHighLevelEncoding($data) {
if (($field_lenght == 4) OR ($epos == $data_lenght) OR !$this->isCharMode($chr, ENC_EDF)) {
if (($epos == $data_lenght) AND ($field_lenght < 3)) {
$enc = ENC_ASCII;
$cw[] = $this->getSwitchEncodingCodeword($enc);
++$cw_num;
break;
}
if ($field_lenght < 4) {
Expand All @@ -873,6 +899,7 @@ protected function getHighLevelEncoding($data) {
$temp_cw[] = 0;
}
$enc = ENC_ASCII;
$this->last_enc = $enc;
}
// encodes four data characters in three codewords
$tcw = (($temp_cw[0] & 0x3F) << 2) + (($temp_cw[1] & 0x30) >> 4);
Expand Down Expand Up @@ -909,8 +936,6 @@ protected function getHighLevelEncoding($data) {
if ($newenc != $enc) {
// 1. If the look-ahead test (starting at step J) indicates another mode, switch to that mode.
$enc = $newenc;
$cw[] = $this->getSwitchEncodingCodeword($enc);
++$cw_num;
break; // exit from B256 mode
} else {
// 2. Otherwise, process the next character in Base 256 encodation.
Expand All @@ -922,25 +947,23 @@ protected function getHighLevelEncoding($data) {
}
// set field lenght
if ($field_lenght <= 249) {
$cw[] = $field_lenght;
$cw[] = $this->get255StateCodeword($field_lenght, ($cw_num + 1));
++$cw_num;
} else {
$cw[] = (floor($field_lenght / 250) + 249);
$cw[] = ($field_lenght % 250);
$cw[] = $this->get255StateCodeword((floor($field_lenght / 250) + 249), ($cw_num + 1));
$cw[] = $this->get255StateCodeword(($field_lenght % 250), ($cw_num + 2));
$cw_num += 2;
}
if (!empty($temp_cw)) {
// add B256 field
foreach ($temp_cw as $p => $cht) {
$cw[] = $this->get255StateCodeword($chr, ($cw_num + $p));
$cw[] = $this->get255StateCodeword($cht, ($cw_num + $p + 1));
}
}
break;
}
} // end of switch enc
} // end of while
// set last used encoding
$this->last_enc = $enc;
return $cw;
}

Expand Down
14 changes: 7 additions & 7 deletions Resources/PHP/tcpdf/include/barcodes/pdf417.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// File name : pdf417.php
// Version : 1.0.005
// Begin : 2010-06-03
// Last Update : 2013-09-17
// Last Update : 2014-04-25
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
Expand Down Expand Up @@ -934,12 +934,12 @@ protected function getCompaction($mode, $code, $addmode=true) {
$sublen = strlen($code);
}
if ($sublen == 6) {
$t = bcmul(''.ord($code{0}), '1099511627776');
$t = bcadd($t, bcmul(''.ord($code{1}), '4294967296'));
$t = bcadd($t, bcmul(''.ord($code{2}), '16777216'));
$t = bcadd($t, bcmul(''.ord($code{3}), '65536'));
$t = bcadd($t, bcmul(''.ord($code{4}), '256'));
$t = bcadd($t, ''.ord($code{5}));
$t = bcmul(''.ord($code[0]), '1099511627776');
$t = bcadd($t, bcmul(''.ord($code[1]), '4294967296'));
$t = bcadd($t, bcmul(''.ord($code[2]), '16777216'));
$t = bcadd($t, bcmul(''.ord($code[3]), '65536'));
$t = bcadd($t, bcmul(''.ord($code[4]), '256'));
$t = bcadd($t, ''.ord($code[5]));
// tmp array for the 6 bytes block
$cw6 = array();
do {
Expand Down
Loading

0 comments on commit 1f8d4eb

Please sign in to comment.