diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index a1d0595..8e376ee 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,9 @@ +6.0.013 (2013-04-) + - Add support for SVG dx and dy text/tspan attributes. + - replace require() with require_once(). + - fix some minor typos on documentation. + - fix a problem when deleting all pages. + 6.0.012 (2013-04-24) - An error condition in addHtmlLink() method was fixed (bug #799). diff --git a/README.TXT b/README.TXT index 5f0f1e7..4b0db00 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.012 -Release date: 2013-04-24 +Version: 6.0.013 +Release date: 2013-05-10 Author: Nicola Asuni Copyright (c) 2002-2013: diff --git a/composer.json b/composer.json index ad61b7b..5884b51 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.012", + "version": "6.0.013", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index a1dc2e4..c7351d6 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.012'; + private static $tcpdf_version = '6.0.013'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index bf725da..3050b1c 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @param $s (string) The string whose length is to be computed * @param $fontname (string) Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param $fontstyle (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. + * @param $fontstyle (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. * @param $fontsize (float) Font size in points. The default value is the current size. * @param $getarray (boolean) if true returns an array of characters widths, if false returns the total length. * @return mixed int total string length or array of characted widths @@ -4029,7 +4029,7 @@ class TCPDF { * Returns the string length of an array of chars in user unit or an array of characters widths. A font must be selected.
* @param $sa (string) The array of chars whose total length is to be computed * @param $fontname (string) Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param $fontstyle (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. + * @param $fontstyle (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. * @param $fontsize (float) Font size in points. The default value is the current size. * @param $getarray (boolean) if true returns an array of characters widths, if false returns the total length. * @return mixed int total string length or array of characted widths @@ -4455,7 +4455,7 @@ class TCPDF { * If you just wish to change the current font size, it is simpler to call SetFontSize(). * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
* @param $family (string) Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive): It is also possible to pass an empty string. In that case, the current family is retained. - * @param $style (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. + * @param $style (string) Font style. Possible values are (case insensitive): or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. * @param $size (float) Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 * @param $fontfile (string) The font definition file. By default, the name is built from the family and style, in lower case with no spaces. * @param $subset (mixed) if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. @@ -16508,7 +16508,7 @@ class TCPDF { // underline $dom[$key]['fontstyle'] .= 'U'; } elseif ($dec{0} == 'l') { - // line-trough + // line-through $dom[$key]['fontstyle'] .= 'D'; } elseif ($dec{0} == 'o') { // overline @@ -21017,7 +21017,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: --$newpage; return "this.addField(\'".$matches[1]."\',\'".$matches[2]."\',".$newpage."";'), $tmpjavascript); // return to last page - $this->lastPage(true); + if ($this->numpages > 0) { + $this->lastPage(true); + } return true; } @@ -23911,6 +23913,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } else { $x = 0; } + if (isset($attribs['dx'])) { + $x += $this->getHTMLUnitToUnits($attribs['dx'], 0, $this->svgunit, false); + } if (isset($attribs['y'])) { $y = $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false); } elseif ($name == 'tspan') { @@ -23918,6 +23923,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } else { $y = 0; } + if (isset($attribs['dy'])) { + $y += $this->getHTMLUnitToUnits($attribs['dy'], 0, $this->svgunit, false); + } $svgstyle['text-color'] = $svgstyle['fill']; $this->svgtext = ''; if (isset($svgstyle['text-anchor'])) {