diff --git a/2dbarcodes.php b/2dbarcodes.php
index 0bc24fb..5bfb9d6 100644
--- a/2dbarcodes.php
+++ b/2dbarcodes.php
@@ -2,29 +2,29 @@
//============================================================+
// File name : 2dbarcodes.php
// Begin : 2009-04-07
-// Last Update : 2009-12-15
-// Version : 1.0.001
+// Last Update : 2010-03-23
+// Version : 1.0.002
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
// ----------------------------------------------------------------------------
// Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.
-//
+//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 2.1 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-//
+//
// See LICENSE.TXT file for more information.
// ----------------------------------------------------------------------------
//
-// Description : PHP class to creates array representations for
+// Description : PHP class to creates array representations for
// 2D barcodes to be used with TCPDF.
//
// Author: Nicola Asuni
@@ -47,7 +47,7 @@
* @copyright 2008-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
- * @version 1.0.001
+ * @version 1.0.002
*/
/**
@@ -60,39 +60,39 @@
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*/
class TCPDF2DBarcode {
-
+
/**
* @var array representation of barcode.
* @access protected
*/
protected $barcode_array;
-
+
/**
- * This is the class constructor.
+ * This is the class constructor.
* Return an array representations for 2D barcodes:
* - $arrcode['code'] code to be printed on text label
* - $arrcode['num_rows'] required number of rows
* - $arrcode['num_cols'] required number of columns
* - $arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)
* @param string $code code to print
- * @param string $type type of barcode:
+ * @param string $type type of barcode: - TEST
- QRCODE : QR-CODE Low error correction
- QRCODE,L : QR-CODE Low error correction
- QRCODE,M : QR-CODE Medium error correction
- QRCODE,Q : QR-CODE Better error correction
- QRCODE,H : QR-CODE Best error correction
*/
public function __construct($code, $type) {
$this->setBarcode($code, $type);
}
-
- /**
+
+ /**
* Return an array representations of barcode.
* @return array
*/
public function getBarcodeArray() {
return $this->barcode_array;
}
-
- /**
+
+ /**
* Set the barcode.
* @param string $code code to print
- * @param string $type type of barcode:
+ * @param string $type type of barcode: - TEST
- QRCODE : QR-CODE Low error correction
- QRCODE,L : QR-CODE Low error correction
- QRCODE,M : QR-CODE Medium error correction
- QRCODE,Q : QR-CODE Better error correction
- QRCODE,H : QR-CODE Best error correction
* @return array
*/
public function setBarcode($code, $type) {
@@ -110,6 +110,15 @@ class TCPDF2DBarcode {
);
break;
}
+ case 'QRCODE': { // QR-CODE
+ require_once(dirname(__FILE__).'/qrcode.php');
+ if (!isset($mode[1]) OR (!in_array($mode[1],array('L','M','Q','H')))) {
+ $mode[1] = 'L'; // Ddefault: Low error correction
+ }
+ $qrcode = new QRcode($code, strtoupper($mode[1]));
+ $this->barcode_array = $qrcode->getBarcodeArray();
+ break;
+ }
default: {
$this->barcode_array = false;
}
@@ -118,6 +127,6 @@ class TCPDF2DBarcode {
} // end of class
//============================================================+
-// END OF FILE
+// END OF FILE
//============================================================+
?>
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index c4116f3..537b8ea 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,16 @@
+4.9.000 (2010-03-27)
+ - QR Code (2D barcode) support was added (see example n. 50).
+ - The following methods were added to print crop and registration marks (see example n. 56): colorRegistrationBar(), cropMark(), registrationMark().
+ - Limited support for CSS line-height property was added.
+ - Gradient method now supports Gray, RGB and CMYK space color.
+ - Example n. 51 was updated.
+ - Vertical alignment of font inside cell was fixed.
+ - Support for multiple Thai diacritics was added.
+ - Bug item #2974929 "Duplicate case values" was fixed.
+ - Bug item #2976729 "File attachment not working with security" was fixed.
+
+--------------------------------------------------------------------------------
+
4.8.039 (2010-03-20)
- Problems related to custom locale settings were fixed.
- Problems related to HTML on Header and Footer were fixed.
diff --git a/README.TXT b/README.TXT
index 248493d..b0dba59 100755
--- a/README.TXT
+++ b/README.TXT
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
-Version: 4.8.039
-Release date: 2010-03-20
+Version: 4.9.000
+Release date: 2010-03-27
Author: Nicola Asuni
Copyright (c) 2001-2010:
@@ -38,7 +38,7 @@ Main Features:
// * includes methods to publish some XHTML code, including forms;
// * includes graphic (geometric) and transformation methods;
// * includes Javascript and Forms support;
-// * includes a method to print various barcode formats: 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 Extention, 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;
+// * includes a method to print various barcode formats: 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 Extention, 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, QR-Code;
// * includes methods to set Bookmarks and print a Table of Content;
// * includes methods to move and delete pages;
// * includes methods for automatic page header and footer management;
diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html
index a08378d..49e6a50 100644
--- a/doc/classtrees_com-tecnick-tcpdf.html
+++ b/doc/classtrees_com-tecnick-tcpdf.html
@@ -33,11 +33,21 @@
Class Trees for Package com-tecnick-tcpdf
+
+Root class QRcode
+
+
Root class TCPDF
+
+Root class TCPDF2DBarcode
+
+
Root class TCPDFBarcode
|
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html
index e08d1ab..a433998 100644
--- a/doc/com-tecnick-tcpdf/TCPDF.html
+++ b/doc/com-tecnick-tcpdf/TCPDF.html
@@ -30,9 +30,13 @@
Files:
+
2dbarcodes.php
+
barcodes.php
htmlcolors.php
+
+
qrcode.php
tcpdf.php
@@ -45,7 +49,9 @@
Classes:
@@ -74,7 +80,7 @@ Source Location: /tcpdf.php
Version:
@@ -312,10 +318,12 @@ Source Location: /tcpdf.php
Clip
Close
closeHTMLTagHandler
+
colorRegistrationBar
ComboBox
commitTransaction
convertHTMLColorToDec
CoonsPatchMesh
+
cropMark
Curve
deletePage
Ellipse
@@ -420,6 +428,7 @@ Source Location: /tcpdf.php
RadioButton
readDiskCache
Rect
+
registrationMark
RegularPolygon
removeSHY
revstrpos
@@ -534,6 +543,7 @@ Source Location: /tcpdf.php
UTF8ArrSubString
UTF8ArrToLatin1
utf8Bidi
+
utf8StrArrRev
UTF8StringToArray
utf8StrRev
UTF8ToLatin1
@@ -626,7 +636,7 @@ Source Location: /tcpdf.php
Class Details