Commit 9f31cf9f authored by Sam Hemelryk's avatar Sam Hemelryk
Browse files

Merge branch 'w16_MDL-32447_m23_tcpdf' of git://github.com/skodak/moodle

parents a096a21e 585ae3d9
......@@ -67,7 +67,7 @@ define('K_PATH_URL', $CFG->wwwroot . '/lib/tcpdf/');
define('K_PATH_FONTS', K_PATH_MAIN . 'fonts/');
/** cache directory for temporary files (full path) */
define('K_PATH_CACHE', $CFG->cachedir . '/');
define('K_PATH_CACHE', $CFG->cachedir . '/tcpdf/');
/** images directory */
define('K_PATH_IMAGES', $CFG->dirroot . '/');
......@@ -99,6 +99,7 @@ class pdf extends TCPDF {
* See the parent class documentation for the parameters info.
*/
public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8') {
make_cache_directory('tcpdf');
parent::__construct($orientation, $unit, $format, $unicode, $encoding);
......
<?php
//============================================================+
// File name : 2dbarcodes.php
// Version : 1.0.012
// Version : 1.0.013
// Begin : 2009-04-07
// Last Update : 2011-09-15
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// Last Update : 2012-01-12
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2009-2011 Nicola Asuni - Tecnick.com S.r.l.
// Copyright (C) 2009-2012 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
......@@ -37,14 +37,14 @@
* PHP class to creates array representations for 2D barcodes to be used with TCPDF.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.012
* @version 1.0.013
*/
/**
* @class TCPDF2DBarcode
* PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
* @package com.tecnick.tcpdf
* @version 1.0.012
* @version 1.0.013
* @author Nicola Asuni
*/
class TCPDF2DBarcode {
......@@ -142,8 +142,7 @@ class TCPDF2DBarcode {
* @public
*/
public function getBarcodeHTML($w=10, $h=10, $color='black') {
// replace table for special characters
$html = '<div style="font-size:0;position:relative;">'."\n";
$html = '<div style="font-size:0;position:relative;width:'.($w * $this->barcode_array['num_cols']).'px;height:'.($h * $this->barcode_array['num_rows']).'px;">'."\n";
// print barcode elements
$y = 0;
// for each row
......
5.9.156 (2012-04-10)
- Bug item #3515885 "TOC and booklet: left and right page exchanged".
- SetAutoPageBreak(false) now works also in multicolumn mode.
5.9.155 (2012-04-02)
- Bug item #3512596 "font import problems" was fixed.
- Method addTTFfont() was modified to extract only specified Platform ID and Encoding ID (check the source code documentation).
- All fonts were updated.
- Bug item #3513867 "booklet and setHeaderTemplateAutoreset: header shifted left" was fixed.
- Bug item #3513749 "TCPDF Superscript/Subscript" was fixed.
5.9.154 (2012-03-29)
- A debug echo was removed.
5.9.153 (2012-03-28)
- A bug on font conversion was fixed.
- All fonts were updated.
- Method isCharDefined() was added to find if a character is defined on the selected font.
- Method replaceMissingChars() was added to automatically replace missing chars on selected font.
- SetFont() method was fixed.
5.9.152 (2012-03-23)
- The following overprint methods were added: setOverprint(), getOverprint().
- Signature of setAlpha() method was changed and method getAlpha() was added.
- stroke-opacity support was added on SVG.
- The following date methods were added: setDocCreationTimestamp(), setDocModificationTimestamp(), getDocCreationTimestamp(), getDocModificationTimestamp(), getFormattedDate(), getTimestamp().
- Signature of _datestring() method was changed.
- Method getFontBBox() was added.
- Method setPageBoxTypes() was aded.
5.9.151 (2012-03-22)
- Bug item #3509889 "Transform() distorts PDF" was fixed.
- Precision of real number were extended.
- ComboBox and ListBox methods were fixed.
- Bulgarian language file was added.
- addTOC() method was improved to include bookmark color and font style.
5.9.150 (2012-03-16)
- A bug related to form fields in PDF/A mode was fixed.
5.9.149 (2012-02-21)
- Bug item #3489933 "SVG Parser treats tspan like text" was fixed.
5.9.148 (2012-02-17)
- Bug item #3488600 "Multiple radiobutton sets get first set value" was fixed.
5.9.147 (2012-02-14)
- A problem with SVG gradients has been fixed.
5.9.146 (2012-02-12)
- Bug item #3486880 "$filehash undefine error" was fixed.
- The default font is now the one specified at PDF_FONT_NAME_MAIN constant.
5.9.145 (2012-01-28)
- Japanese language file was added.
- TCPDF license and README.TXT files were updated.
5.9.144 (2012-01-12)
- HTML output on barcode classes was improved.
5.9.143 (2012-01-08)
- Bug item #3471057 "setCreator() has no effect" was fixed.
5.9.142 (2011-12-23)
- Source code documentation was updated.
5.9.141 (2011-12-14)
- Some minor bugs were fixed.
5.9.140 (2011-12-13)
- SVG now supports embedded images encoded as base64.
5.9.139 (2011-12-11)
- Spot color methods were fixed.
5.9.138 (2011-12-10)
- cropMark() method was improved (check source code documentation).
- Example n. 56 was updated.
- Bug item #3452390 "Check Box still not ticked when set to true" was fixed.
5.9.137 (2011-12-01)
- Bug item #3447005 "Background color and border of Form Elements is printed" was fixed.
- Color support for Form elements was improved.
5.9.136 (2011-11-27)
- Bug item #3443387 "SetMargins with keep option does not work for top margin" was fixed.
5.9.135 (2011-11-04)
- Bug item #3433406 "Double keywords in description" was fixed.
5.9.134 (2011-10-29)
- The default value for $defcol parameter on convertHTMLColorToDec() method was fixed.
- Deafult HTTP headers were changed to avoid browser caching.
- Some deprecated syntax were replaced.
5.9.133 (2011-10-26)
- Bug item #3428446 "copyPage method not working when diskcache enabled" was fixed.
......
......@@ -5,9 +5,7 @@
TCPDF 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 3 of the
License, or (at your option) any later version. Additionally,
YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE
GENERATED PDF DOCUMENTS.
License, or (at your option) any later version.
**********************************************************************
**********************************************************************
......
......@@ -8,16 +8,16 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.9.133
Release date: 2011-10-26
Version: 5.9.156
Release date: 2012-04-10
Author: Nicola Asuni
Copyright (c) 2002-2011:
Copyright (c) 2002-2012:
Nicola Asuni
Tecnick.com s.r.l.
Via Della Pace, 11
09044 Quartucciu (CA)
ITALY
Tecnick.com LTD
Manor Coach House, Church Hill
Aldershot, Hants, GU12 4RQ
UK
www.tecnick.com
URLs:
......@@ -64,18 +64,16 @@ Installation (full instructions on http: www.tcpdf.org):
Source Code Documentation:
http://www.tcpdf.org
For Additional Documentation:
Additional Documentation:
http://www.tcpdf.org
License
Copyright (C) 2002-2011 Nicola Asuni - Tecnick.com S.r.l.
Copyright (C) 2002-2012 Nicola Asuni - Tecnick.com LTD
TCPDF 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 3 of the
License, or (at your option) any later version. Additionally,
YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE
GENERATED PDF DOCUMENTS.
License, or (at your option) any later version.
TCPDF is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -88,4 +86,12 @@ License
See LICENSE.TXT file for more information.
Third party fonts
This library includes third party font files released with different licenses.
These fonts are not required by TCPDF but have been included as you convenience.
The original TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
To get the original distribution archives please check the information on fonts subfolders:
- DejaVu fonts 2.33 (Bitstream) - Copyright, License and other info: fonts/dejavu-fonts-ttf-2.33
- GNU FreeFont (GNU-GPLv3) - Copyright, License and other info: fonts/freefont-20100919
============================================================
<?php
//============================================================+
// File name : barcodes.php
// Version : 1.0.021
// Version : 1.0.023
// Begin : 2008-06-09
// Last Update : 2011-09-15
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// Last Update : 2012-01-14
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2008-2011 Nicola Asuni - Tecnick.com S.r.l.
// Copyright (C) 2008-2012 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
......@@ -37,14 +37,14 @@
* PHP class to creates array representations for common 1D barcodes to be used with TCPDF.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 1.0.021
* @version 1.0.023
*/
/**
* @class TCPDFBarcode
* PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
* @package com.tecnick.tcpdf
* @version 1.0.021
* @version 1.0.023
* @author Nicola Asuni
*/
class TCPDFBarcode {
......@@ -145,8 +145,7 @@ class TCPDFBarcode {
* @public
*/
public function getBarcodeHTML($w=2, $h=30, $color='black') {
// replace table for special characters
$html = '<div style="font-size:0;position:relative;">'."\n";
$html = '<div style="font-size:0;position:relative;width:'.($this->barcode_array['maxw'] * $w).'px;height:'.($h).'px;">'."\n";
// print bars
$x = 0;
foreach ($this->barcode_array['bcode'] as $k => $v) {
......
......@@ -5,17 +5,27 @@
// Last Update : 2011-04-15
//
// Description : Configuration file for TCPDF.
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2004-2012 Nicola Asuni - Tecnick.com LTD
//
// Author: Nicola Asuni
// This file is part of TCPDF software library.
//
// (c) Copyright:
// Nicola Asuni
// Tecnick.com s.r.l.
// Via Della Pace, 11
// 09044 Quartucciu (CA)
// ITALY
// www.tecnick.com
// info@tecnick.com
// TCPDF 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 3 of the
// License, or (at your option) any later version.
//
// TCPDF 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 TCPDF. If not, see <http://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
//============================================================+
/**
......
......@@ -4,10 +4,10 @@
// Version : 1.0.001
// Begin : 2010-06-07
// Last Update : 2011-09-14
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2010-2011 Nicola Asuni - Tecnick.com S.r.l.
// Copyright (C) 2010-2012 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
......@@ -941,7 +941,7 @@ class Datamatrix {
/**
* Places "chr+bit" with appropriate wrapping within array[].
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
......@@ -967,7 +967,7 @@ class Datamatrix {
/**
* Places the 8 bits of a utah-shaped symbol character.
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
......@@ -991,7 +991,7 @@ class Datamatrix {
/**
* Places the 8 bits of the first special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
......@@ -1013,7 +1013,7 @@ class Datamatrix {
/**
* Places the 8 bits of the second special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
......@@ -1035,7 +1035,7 @@ class Datamatrix {
/**
* Places the 8 bits of the third special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
......@@ -1057,7 +1057,7 @@ class Datamatrix {
/**
* Places the 8 bits of the fourth special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr array Array of symbols.
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
......
<?php
//============================================================+
// File name : encodings_maps.php
// Version : 1.0.000
// Version : 1.0.001
// Begin : 2011-10-01
// Last Update : 2011-10-01
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// Last Update : 2011-11-15
// Author : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2008-2011 Nicola Asuni - Tecnick.com S.r.l.
// Copyright (C) 2008-2012 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
......@@ -530,40 +530,6 @@ public $encmap = array(
240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',
248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'),
// encoding map for: cp1254
'cp1254' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',
8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',
16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',
24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',
32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',
40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',
48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',
56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',
64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',
72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',
80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',
88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',
96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',
104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',
112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',
120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',
128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',
136=>'circumflex',137=>'perthousand',138=>'Scaron',139=>'guilsinglleft',140=>'OE',141=>'.notdef',142=>'.notdef',143=>'.notdef',
144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',
152=>'tilde',153=>'trademark',154=>'scaron',155=>'guilsinglright',156=>'oe',157=>'.notdef',158=>'.notdef',159=>'Ydieresis',
160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',
168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',
176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',
184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',
192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',
200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',
208=>'Gbreve',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',
216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Idotaccent',222=>'Scedilla',223=>'germandbls',
224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',
232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',
240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',
248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'),
// encoding map for: iso-8859-1
'iso-8859-1' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',
8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment