Skip to content

Commit a048082

Browse files
committed
6.0.030 (2013-09-17)
- Bug #835 "PDF417 and Cyrilic simbols" was fixed.
1 parent 987c4af commit a048082

File tree

7 files changed

+36
-17
lines changed

7 files changed

+36
-17
lines changed

CHANGELOG.TXT

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
6.0.030 (2013-09-17)
2+
- Bug #835 "PDF417 and Cyrilic simbols" was fixed.
3+
14
6.0.029 (2013-09-15)
25
- 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.
36
- The TCPDF_PARSER class can now be configured using the new $cfg parameter.

README.TXT

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
88
------------------------------------------------------------
99

1010
Name: TCPDF
11-
Version: 6.0.029
12-
Release date: 2013-09-15
11+
Version: 6.0.030
12+
Release date: 2013-09-17
1313
Author: Nicola Asuni
1414

1515
Copyright (c) 2002-2013:

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tecnick.com/tcpdf",
3-
"version": "6.0.029",
3+
"version": "6.0.030",
44
"homepage": "http://www.tcpdf.org/",
55
"type": "library",
66
"description": "TCPDF is a PHP class for generating PDF documents.",

include/barcodes/pdf417.php

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
//============================================================+
33
// File name : pdf417.php
4-
// Version : 1.0.004
4+
// Version : 1.0.005
55
// Begin : 2010-06-03
6-
// Last Update : 2012-02-06
6+
// Last Update : 2013-09-17
77
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
88
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
99
// -------------------------------------------------------------------
@@ -50,7 +50,7 @@
5050
* (requires PHP bcmath extension)
5151
* @package com.tecnick.tcpdf
5252
* @author Nicola Asuni
53-
* @version 1.0.003
53+
* @version 1.0.005
5454
*/
5555

5656
// definitions
@@ -940,11 +940,16 @@ protected function getCompaction($mode, $code, $addmode=true) {
940940
$t = bcadd($t, bcmul(''.ord($code{3}), '65536'));
941941
$t = bcadd($t, bcmul(''.ord($code{4}), '256'));
942942
$t = bcadd($t, ''.ord($code{5}));
943+
// tmp array for the 6 bytes block
944+
$cw6 = array();
943945
do {
944946
$d = bcmod($t, '900');
945947
$t = bcdiv($t, '900');
946-
array_unshift($cw, $d);
948+
// prepend the value to the beginning of the array
949+
array_unshift($cw6, $d);
947950
} while ($t != '0');
951+
// append the result array at the end
952+
$cw = array_merge($cw, $cw6);
948953
} else {
949954
for ($i = 0; $i < $sublen; ++$i) {
950955
$cw[] = ord($code{$i});

include/tcpdf_static.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
5555
* Current TCPDF version.
5656
* @private static
5757
*/
58-
private static $tcpdf_version = '6.0.029';
58+
private static $tcpdf_version = '6.0.030';
5959

6060
/**
6161
* String alias for total number of pages.

tcpdf.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
//============================================================+
33
// File name : tcpdf.php
4-
// Version : 6.0.029
4+
// Version : 6.0.030
55
// Begin : 2002-08-03
66
// Last Update : 2013-09-15
77
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
@@ -139,7 +139,7 @@
139139
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
140140
* @package com.tecnick.tcpdf
141141
* @author Nicola Asuni
142-
* @version 6.0.029
142+
* @version 6.0.030
143143
*/
144144

145145
// TCPDF configuration
@@ -163,7 +163,7 @@
163163
* 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>
164164
* @package com.tecnick.tcpdf
165165
* @brief PHP class for generating PDF documents without requiring external extensions.
166-
* @version 6.0.029
166+
* @version 6.0.030
167167
* @author Nicola Asuni - [email protected]
168168
*/
169169
class TCPDF {

tcpdf_import.php

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
//============================================================+
33
// File name : tcpdf_import.php
4-
// Version : 1.0.000
4+
// Version : 1.0.001
55
// Begin : 2011-05-23
6-
// Last Update : 2013-03-17
6+
// Last Update : 2013-09-17
77
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected]
88
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
99
// -------------------------------------------------------------------
@@ -39,7 +39,7 @@
3939
* This is a PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
4040
* @package com.tecnick.tcpdf
4141
* @author Nicola Asuni
42-
* @version 1.0.000
42+
* @version 1.0.001
4343
*/
4444

4545
// include the TCPDF class
@@ -53,7 +53,7 @@
5353
* PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.<br>
5454
* @package com.tecnick.tcpdf
5555
* @brief PHP class extension of the TCPDF library to import existing PDF documents.
56-
* @version 1.0.000
56+
* @version 1.0.001
5757
* @author Nicola Asuni - [email protected]
5858
*/
5959
class TCPDF_IMPORT extends TCPDF {
@@ -71,8 +71,19 @@ public function importPDF($filename) {
7171
if ($rawdata === false) {
7272
$this->Error('Unable to get the content of the file: '.$filename);
7373
}
74-
// parse PDF data
75-
$pdf = new TCPDF_PARSER($rawdata);
74+
// configuration parameters for parser
75+
$cfg = array(
76+
'die_for_errors' => false,
77+
'ignore_filter_decoding_errors' => true,
78+
'ignore_missing_filter_decoders' => true,
79+
);
80+
try {
81+
// parse PDF data
82+
$pdf = new TCPDF_PARSER($rawdata, $cfg);
83+
} catch (Exception $e) {
84+
die($e->getMessage());
85+
}
86+
// get the parsed data
7687
$data = $pdf->getParsedData();
7788
// release some memory
7889
unset($rawdata);

0 commit comments

Comments
 (0)