6.0.030 (2013-09-17)

- Bug #835 "PDF417 and Cyrilic simbols" was fixed.
This commit is contained in:
nicolaasuni 2013-09-17 18:27:51 +01:00
parent 987c4af522
commit a048082831
7 changed files with 36 additions and 17 deletions

View File

@ -1,3 +1,6 @@
6.0.030 (2013-09-17)
- Bug #835 "PDF417 and Cyrilic simbols" was fixed.
6.0.029 (2013-09-15)
- Constants K_TCPDF_PARSER_THROW_EXCEPTION_ERROR and K_TCPDF_PARSER_IGNORE_DECODING_ERRORS where removed in favor of a new configuration array in the TCPDF_PARSER class.
- The TCPDF_PARSER class can now be configured using the new $cfg parameter.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 6.0.029
Release date: 2013-09-15
Version: 6.0.030
Release date: 2013-09-17
Author: Nicola Asuni
Copyright (c) 2002-2013:

View File

@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.0.029",
"version": "6.0.030",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.",

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : pdf417.php
// Version : 1.0.004
// Version : 1.0.005
// Begin : 2010-06-03
// Last Update : 2012-02-06
// Last Update : 2013-09-17
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -50,7 +50,7 @@
* (requires PHP bcmath extension)
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.003
* @version 1.0.005
*/
// definitions
@ -940,11 +940,16 @@ class PDF417 {
$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 {
$d = bcmod($t, '900');
$t = bcdiv($t, '900');
array_unshift($cw, $d);
// prepend the value to the beginning of the array
array_unshift($cw6, $d);
} while ($t != '0');
// append the result array at the end
$cw = array_merge($cw, $cw6);
} else {
for ($i = 0; $i < $sublen; ++$i) {
$cw[] = ord($code{$i});

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.0.029';
private static $tcpdf_version = '6.0.030';
/**
* String alias for total number of pages.

View File

@ -1,7 +1,7 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 6.0.029
// Version : 6.0.030
// Begin : 2002-08-03
// Last Update : 2013-09-15
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
@ -139,7 +139,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 6.0.029
* @version 6.0.030
*/
// TCPDF configuration
@ -163,7 +163,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>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
* @version 6.0.029
* @version 6.0.030
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf_import.php
// Version : 1.0.000
// Version : 1.0.001
// Begin : 2011-05-23
// Last Update : 2013-03-17
// Last Update : 2013-09-17
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -39,7 +39,7 @@
* This is a PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.000
* @version 1.0.001
*/
// include the TCPDF class
@ -53,7 +53,7 @@ require_once(dirname(__FILE__).'/tcpdf_parser.php');
* PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
* @package com.tecnick.tcpdf
* @brief PHP class extension of the TCPDF library to import existing PDF documents.
* @version 1.0.000
* @version 1.0.001
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF_IMPORT extends TCPDF {
@ -71,8 +71,19 @@ class TCPDF_IMPORT extends TCPDF {
if ($rawdata === false) {
$this->Error('Unable to get the content of the file: '.$filename);
}
// parse PDF data
$pdf = new TCPDF_PARSER($rawdata);
// configuration parameters for parser
$cfg = array(
'die_for_errors' => false,
'ignore_filter_decoding_errors' => true,
'ignore_missing_filter_decoders' => true,
);
try {
// parse PDF data
$pdf = new TCPDF_PARSER($rawdata, $cfg);
} catch (Exception $e) {
die($e->getMessage());
}
// get the parsed data
$data = $pdf->getParsedData();
// release some memory
unset($rawdata);