From 3a2c3f45d2e132b3096d009e29f84c118303e8d5 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 21 Aug 2009 17:31:00 +0200 Subject: [PATCH] 4.6.026 --- CHANGELOG.TXT | 4 + README.TXT | 4 +- doc/classtrees_com-tecnick-tcpdf.html | 2 +- doc/com-tecnick-tcpdf/TCPDF.html | 378 +++++++++--------- doc/com-tecnick-tcpdf/TCPDFBarcode.html | 2 +- doc/com-tecnick-tcpdf/_barcodes.php.html | 2 +- .../_config---tcpdf_config.php.html | 2 +- doc/com-tecnick-tcpdf/_htmlcolors.php.html | 2 +- doc/com-tecnick-tcpdf/_tcpdf.php.html | 6 +- doc/com-tecnick-tcpdf/_unicode_data.php.html | 2 +- doc/elementindex.html | 2 +- doc/elementindex_com-tecnick-tcpdf.html | 2 +- doc/errors.html | 2 +- doc/index.html | 2 +- doc/li_com-tecnick-tcpdf.html | 2 +- examples/example_052.php | 9 +- tcpdf.php | 93 +++-- 17 files changed, 284 insertions(+), 232 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 7807299..40ed206 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,7 @@ +4.6.026 (2009-08-21) + - Bug #2841693 "Problem with MultiCell and ishtml and justification" was fixed. + - Signature functions were improved but not yet fixed (tcpdf.crt and example n. 52 were updated). + 4.6.025 (2009-08-17) - Carriage returns (\r) were removed from source code. - Problem related to set_magic_quotes_runtime() depracated was fixed. diff --git a/README.TXT b/README.TXT index da7a35f..1e364cf 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 4.6.025 -Release date: 2009-08-17 +Version: 4.6.026 +Release date: 2009-08-21 Author: Nicola Asuni Copyright (c) 2001-2009: diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index 03d7fa7..9f3b543 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -45,7 +45,7 @@

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index 7efaa70..07a4833 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -74,7 +74,7 @@ Source Location: /tcpdf.php

Version:

@@ -595,7 +595,7 @@ This is a PHP class for generating PDF documents without requiring external exte author:  Nicola Asuni - info@tecnick.com - version:  4.6.025 + version:  4.6.026 link:  http://www.tcpdf.org @@ -5411,7 +5411,7 @@ $diskcache = false])
-

method addExtGState [line 9746]

+

method addExtGState [line 9779]

@@ -5504,7 +5504,7 @@ $fontfile = ''])
-

method addHtmlLink [line 7038]

+

method addHtmlLink [line 7066]

@@ -5573,7 +5573,7 @@ $style = -1])
-

method addHTMLVertSpace [line 12893]

+

method addHTMLVertSpace [line 12940]

@@ -5784,7 +5784,7 @@ $k)
-

method addTOC [line 13915]

+

method addTOC [line 13962]

@@ -5838,7 +5838,7 @@ $filler = '.'])
-

method AliasNbPages [line 9554]

+

method AliasNbPages [line 9587]

@@ -5880,7 +5880,7 @@ $alias = '{nb}'])
-

method AliasNumPage [line 9581]

+

method AliasNumPage [line 9614]

@@ -5997,7 +5997,7 @@ $spaces = 0])
-

method Arrow [line 8468]

+

method Arrow [line 8496]

@@ -6075,7 +6075,7 @@ $arm_angle = 15])
-

method arrUTF8ToUTF16BE [line 6936]

+

method arrUTF8ToUTF16BE [line 6964]

@@ -6150,7 +6150,7 @@ $setbom = true])
-

method Bookmark [line 9088]

+

method Bookmark [line 9116]

@@ -6204,7 +6204,7 @@ $page = ''])
-

method Button [line 9370]

+

method Button [line 9398]

@@ -6366,7 +6366,7 @@ $ignore_min_height = false])
-

method CheckBox [line 9350]

+

method CheckBox [line 9378]

@@ -6474,7 +6474,7 @@ $addpage = true])
-

method Circle [line 8155]

+

method Circle [line 8183]

@@ -6573,7 +6573,7 @@ $afinish:)
-

method Clip [line 10009]

+

method Clip [line 10042]

@@ -6664,7 +6664,7 @@ $h)
-

method closeHTMLTagHandler [line 12562]

+

method closeHTMLTagHandler [line 12609]

@@ -6718,7 +6718,7 @@ $dom)
-

method ComboBox [line 9331]

+

method ComboBox [line 9359]

@@ -6778,7 +6778,7 @@ $prop = array()])
-

method commitTransaction [line 14072]

+

method commitTransaction [line 14119]

@@ -6806,7 +6806,7 @@ $prop = array()])
-

method convertHTMLColorToDec [line 7071]

+

method convertHTMLColorToDec [line 7099]

@@ -6845,7 +6845,7 @@ $color = '#FFFFFF'])
-

method CoonsPatchMesh [line 9929]

+

method CoonsPatchMesh [line 9962]

@@ -6947,7 +6947,7 @@ $coords_max = 1])
-

method Curve [line 7930]

+

method Curve [line 7958]

@@ -7049,7 +7049,7 @@ $fill_color = array()])
-

method deletePage [line 13775]

+

method deletePage [line 13822]

@@ -7091,7 +7091,7 @@ $page)
-

method Ellipse [line 8051]

+

method Ellipse [line 8079]

@@ -7208,7 +7208,7 @@ $afinish:)
-

method empty_string [line 14119]

+

method empty_string [line 14166]

@@ -7345,7 +7345,7 @@ $msg)
-

method formatPageNumber [line 9658]

+

method formatPageNumber [line 9691]

@@ -7384,7 +7384,7 @@ $num)
-

method formatTOCPageNumber [line 9670]

+

method formatTOCPageNumber [line 9703]

@@ -7457,7 +7457,7 @@ $num)
-

method getAliasNbPages [line 9566]

+

method getAliasNbPages [line 9599]

@@ -7488,7 +7488,7 @@ $num)
-

method getAliasNumPage [line 9594]

+

method getAliasNumPage [line 9627]

@@ -7582,7 +7582,7 @@ $fontsize = 0])
-

method getBarcode [line 10474]

+

method getBarcode [line 10507]

@@ -7706,7 +7706,7 @@ $pagenum = ''])
-

method getBuffer [line 13461]

+

method getBuffer [line 13508]

@@ -7833,7 +7833,7 @@ $ignore_min_height = false])
-

method getCellHeightRatio [line 9832]

+

method getCellHeightRatio [line 9865]

@@ -7903,7 +7903,7 @@ $char)
-

method getFontBuffer [line 13621]

+

method getFontBuffer [line 13668]

@@ -7945,7 +7945,7 @@ $font)
-

method getFontFamily [line 10950]

+

method getFontFamily [line 10983]

@@ -7976,7 +7976,7 @@ $font)
-

method getFontSize [line 10930]

+

method getFontSize [line 10963]

@@ -8007,7 +8007,7 @@ $font)
-

method getFontSizePt [line 10940]

+

method getFontSizePt [line 10973]

@@ -8066,7 +8066,7 @@ $font)
-

method getFontStyle [line 10960]

+

method getFontStyle [line 10993]

@@ -8097,7 +8097,7 @@ $font)
-

method getFooterFont [line 6997]

+

method getFooterFont [line 7025]

@@ -8192,7 +8192,7 @@ $v)
-

method getGraphicVars [line 13329]

+

method getGraphicVars [line 13376]

@@ -8223,7 +8223,7 @@ $v)
-

method getGroupPageNo [line 9607]

+

method getGroupPageNo [line 9640]

@@ -8248,7 +8248,7 @@ $v)
-

method getGroupPageNoFormatted [line 9617]

+

method getGroupPageNoFormatted [line 9650]

@@ -8307,7 +8307,7 @@ $v)
-

method getHeaderFont [line 6977]

+

method getHeaderFont [line 7005]

@@ -8363,7 +8363,7 @@ $v)
-

method getHtmlDomArray [line 10996]

+

method getHtmlDomArray [line 11029]

@@ -8402,7 +8402,7 @@ $html)
-

method getHTMLUnitToUnits [line 13048]

+

method getHTMLUnitToUnits [line 13095]

@@ -8468,7 +8468,7 @@ $point)
-

method getImageBuffer [line 13563]

+

method getImageBuffer [line 13610]

@@ -8625,7 +8625,7 @@ $image)
-

method GetLineWidth [line 7647]

+

method GetLineWidth [line 7675]

@@ -8659,7 +8659,7 @@ $image)
-

method getMargins [line 10893]

+

method getMargins [line 10926]

@@ -8814,7 +8814,7 @@ $w = 0])
-

method getObjFilename [line 13393]

+

method getObjFilename [line 13440]

@@ -8859,7 +8859,7 @@ $prefix)
-

method getOriginalMargins [line 10916]

+

method getOriginalMargins [line 10949]

@@ -8924,7 +8924,7 @@ $prefix)
-

method getPageBuffer [line 13504]

+

method getPageBuffer [line 13551]

@@ -9011,7 +9011,7 @@ $pagenum = ''])
-

method getPageGroupAlias [line 9629]

+

method getPageGroupAlias [line 9662]

@@ -9084,7 +9084,7 @@ $pagenum = ''])
-

method getPageNumGroupAlias [line 9644]

+

method getPageNumGroupAlias [line 9677]

@@ -9157,7 +9157,7 @@ $pagenum = ''])
-

method getPDFData [line 7020]

+

method getPDFData [line 7048]

@@ -9428,7 +9428,7 @@ $fontsize = 0])
-

method Gradient [line 10032]

+

method Gradient [line 10065]

@@ -9639,7 +9639,7 @@ $fitbox = false])
-

method ImageEps [line 10204]

+

method ImageEps [line 10237]

@@ -9840,7 +9840,7 @@ $palign = ''])
-

method IncludeJS [line 9180]

+

method IncludeJS [line 9208]

@@ -9876,7 +9876,7 @@ $script)
-

method intToRoman [line 13122]

+

method intToRoman [line 13169]

@@ -9960,7 +9960,7 @@ $resetmargins = false])
-

method Line [line 7797]

+

method Line [line 7825]

@@ -10026,7 +10026,7 @@ $style = array()])
-

method LinearGradient [line 9889]

+

method LinearGradient [line 9922]

@@ -10176,7 +10176,7 @@ $spaces = 0])
-

method ListBox [line 9308]

+

method ListBox [line 9336]

@@ -10284,7 +10284,7 @@ $cell = false])
-

method MirrorH [line 7419]

+

method MirrorH [line 7447]

@@ -10326,7 +10326,7 @@ $x = ''])
-

method MirrorL [line 7455]

+

method MirrorL [line 7483]

@@ -10380,7 +10380,7 @@ $y = ''])
-

method MirrorP [line 7442]

+

method MirrorP [line 7470]

@@ -10428,7 +10428,7 @@ $y = ''])
-

method MirrorV [line 7430]

+

method MirrorV [line 7458]

@@ -10470,7 +10470,7 @@ $y = ''])
-

method movePage [line 13638]

+

method movePage [line 13685]

@@ -10644,7 +10644,7 @@ $maxh = 0])
-

method objclone [line 14108]

+

method objclone [line 14155]

@@ -10717,7 +10717,7 @@ $object)
-

method openHTMLTagHandler [line 12232]

+

method openHTMLTagHandler [line 12279]

@@ -10853,7 +10853,7 @@ $dest = 'I'])
-

method PageNoFormatted [line 9680]

+

method PageNoFormatted [line 9713]

@@ -10884,7 +10884,7 @@ $dest = 'I'])
-

method PieSector [line 10126]

+

method PieSector [line 10159]

@@ -10986,7 +10986,7 @@ $o:)
-

method pixelsToUnits [line 7124]

+

method pixelsToUnits [line 7152]

@@ -11028,7 +11028,7 @@ $px)
-

method Polycurve [line 7987]

+

method Polycurve [line 8015]

@@ -11100,7 +11100,7 @@ $fill_color = array()])
-

method Polygon [line 8180]

+

method Polygon [line 8208]

@@ -11157,7 +11157,7 @@ $fill_color = array()])
-

method putHtmlListBullet [line 13187]

+

method putHtmlListBullet [line 13234]

@@ -11208,7 +11208,7 @@ $size = 10])
-

method RadialGradient [line 9907]

+

method RadialGradient [line 9940]

@@ -11286,7 +11286,7 @@ $coords = array(0.5,0.5,0.5,0.5,1)])
-

method RadioButton [line 9290]

+

method RadioButton [line 9318]

@@ -11334,7 +11334,7 @@ $prop = array()])
-

method readDiskCache [line 13433]

+

method readDiskCache [line 13480]

@@ -11382,7 +11382,7 @@ $file)
-

method Rect [line 7832]

+

method Rect [line 7860]

@@ -11460,7 +11460,7 @@ $fill_color = array()])
-

method RegularPolygon [line 8279]

+

method RegularPolygon [line 8307]

@@ -11664,7 +11664,7 @@ $length)
-

method rollbackTransaction [line 14085]

+

method rollbackTransaction [line 14132]

@@ -11695,7 +11695,7 @@ $length)
-

method Rotate [line 7514]

+

method Rotate [line 7542]

@@ -11749,7 +11749,7 @@ $y = ''])
-

method RoundedRect [line 8383]

+

method RoundedRect [line 8411]

@@ -11836,7 +11836,7 @@ $fill_color = array()])
-

method Scale [line 7384]

+

method Scale [line 7412]

@@ -11896,7 +11896,7 @@ $y = ''])
-

method ScaleX [line 7344]

+

method ScaleX [line 7372]

@@ -11950,7 +11950,7 @@ $y = ''])
-

method ScaleXY [line 7370]

+

method ScaleXY [line 7398]

@@ -12004,7 +12004,7 @@ $y = ''])
-

method ScaleY [line 7357]

+

method ScaleY [line 7385]

@@ -12058,7 +12058,7 @@ $y = ''])
-

method setAlpha [line 9789]

+

method setAlpha [line 9822]

@@ -12190,7 +12190,7 @@ $margin = 0])
-

method setBarcode [line 10464]

+

method setBarcode [line 10497]

@@ -12226,7 +12226,7 @@ $bc = ''])
-

method SetBooklet [line 12962]

+

method SetBooklet [line 13009]

@@ -12277,7 +12277,7 @@ $outer = -1])
-

method setBuffer [line 13443]

+

method setBuffer [line 13490]

@@ -12316,7 +12316,7 @@ $data)
-

method setCellHeightRatio [line 9823]

+

method setCellHeightRatio [line 9856]

@@ -12553,7 +12553,7 @@ $font)
-

method setDefaultTableColumns [line 9813]

+

method setDefaultTableColumns [line 9846]

@@ -12790,7 +12790,7 @@ $tint = 100])
-

method setExtGState [line 9758]

+

method setExtGState [line 9791]

@@ -13036,7 +13036,7 @@ $fontfile = ''])
-

method setFontBuffer [line 13579]

+

method setFontBuffer [line 13626]

@@ -13123,7 +13123,7 @@ $size)
-

method setFontSubBuffer [line 13601]

+

method setFontSubBuffer [line 13648]

@@ -13202,7 +13202,7 @@ $data)
-

method setFooterFont [line 6987]

+

method setFooterFont [line 7015]

@@ -13277,7 +13277,7 @@ $fm = 10])
-

method setGraphicVars [line 13360]

+

method setGraphicVars [line 13407]

@@ -13398,7 +13398,7 @@ $hs = ''])
-

method setHeaderFont [line 6967]

+

method setHeaderFont [line 6995]

@@ -13473,7 +13473,7 @@ $hm = 10])
-

method setHtmlLinksStyle [line 13033]

+

method setHtmlLinksStyle [line 13080]

@@ -13518,7 +13518,7 @@ $fontstyle = 'U'])
-

method setHtmlVSpace [line 13002]

+

method setHtmlVSpace [line 13049]

@@ -13557,7 +13557,7 @@ $tagvs)
-

method setImageBuffer [line 13520]

+

method setImageBuffer [line 13567]

@@ -13644,7 +13644,7 @@ $scale)
-

method setImageSubBuffer [line 13543]

+

method setImageSubBuffer [line 13590]

@@ -13695,7 +13695,7 @@ $data)
-

method setJPEGQuality [line 9800]

+

method setJPEGQuality [line 9833]

@@ -13773,7 +13773,7 @@ $keywords)
-

method setLanguageArray [line 7007]

+

method setLanguageArray [line 7035]

@@ -13896,7 +13896,7 @@ $margin)
-

method SetLineStyle [line 7672]

+

method SetLineStyle [line 7700]

@@ -13942,7 +13942,7 @@ $style)
-

method SetLineWidth [line 7631]

+

method SetLineWidth [line 7659]

@@ -14038,7 +14038,7 @@ $page = -1])
-

method setListIndentWidth [line 13012]

+

method setListIndentWidth [line 13059]

@@ -14077,7 +14077,7 @@ $width)
-

method setLIsymbol [line 12922]

+

method setLIsymbol [line 12969]

@@ -14170,7 +14170,7 @@ $right = -1])
-

method setOpenCell [line 13022]

+

method setOpenCell [line 13069]

@@ -14257,7 +14257,7 @@ $resetmargins = false])
-

method setPageBuffer [line 13477]

+

method setPageBuffer [line 13524]

@@ -14471,7 +14471,7 @@ $unit)
-

method setPDFVersion [line 9842]

+

method setPDFVersion [line 9875]

@@ -14585,7 +14585,7 @@ $val = true])
-

method SetProtection [line 7287]

+

method SetProtection [line 7315]

@@ -14726,7 +14726,7 @@ $resetx = true])
-

method setSignature [line 9514]

+

method setSignature [line 9545]

@@ -15174,7 +15174,7 @@ $margin)
-

method setUserRights [line 9488]

+

method setUserRights [line 9519]

@@ -15234,7 +15234,7 @@ $signature = '/Modify'])
-

method setViewerPreferences [line 9872]

+

method setViewerPreferences [line 9905]

@@ -15270,7 +15270,7 @@ $preferences)
-

method setVisibility [line 9710]

+

method setVisibility [line 9743]

@@ -15483,7 +15483,7 @@ $mqr)
-

method Skew [line 7574]

+

method Skew [line 7602]

@@ -15543,7 +15543,7 @@ $y = ''])
-

method SkewX [line 7547]

+

method SkewX [line 7575]

@@ -15597,7 +15597,7 @@ $y = ''])
-

method SkewY [line 7560]

+

method SkewY [line 7588]

@@ -15651,7 +15651,7 @@ $y = ''])
-

method StarPolygon [line 8334]

+

method StarPolygon [line 8362]

@@ -15823,7 +15823,7 @@ $format = ''])
-

method startPageGroup [line 9539]

+

method startPageGroup [line 9572]

@@ -15859,7 +15859,7 @@ $page = ''])
-

method startTransaction [line 14058]

+

method startTransaction [line 14105]

@@ -15887,7 +15887,7 @@ $page = ''])
-

method StartTransform [line 7315]

+

method StartTransform [line 7343]

@@ -15918,7 +15918,7 @@ $page = ''])
-

method StopTransform [line 7328]

+

method StopTransform [line 7356]

@@ -15949,7 +15949,7 @@ $page = ''])
-

method swapMargins [line 12978]

+

method swapMargins [line 13025]

@@ -16057,7 +16057,7 @@ $clip = false])
-

method TextField [line 9277]

+

method TextField [line 9305]

@@ -16111,7 +16111,7 @@ $prop = array()])
-

method Transform [line 7607]

+

method Transform [line 7635]

@@ -16153,7 +16153,7 @@ $tm)
-

method Translate [line 7490]

+

method Translate [line 7518]

@@ -16201,7 +16201,7 @@ $t_y)
-

method TranslateX [line 7467]

+

method TranslateX [line 7495]

@@ -16243,7 +16243,7 @@ $t_x)
-

method TranslateY [line 7478]

+

method TranslateY [line 7506]

@@ -16285,7 +16285,7 @@ $t_y)
-

method unhtmlentities [line 7135]

+

method unhtmlentities [line 7163]

@@ -16516,7 +16516,7 @@ $end = ''])
-

method utf8Bidi [line 8517]

+

method utf8Bidi [line 8545]

@@ -16570,7 +16570,7 @@ $forcertl = false])
-

method UTF8StringToArray [line 6769]

+

method UTF8StringToArray [line 6797]

@@ -16636,7 +16636,7 @@ $str)
-

method utf8StrRev [line 8503]

+

method utf8StrRev [line 8531]

@@ -16690,7 +16690,7 @@ $forcertl = false])
-

method UTF8ToLatin1 [line 6876]

+

method UTF8ToLatin1 [line 6904]

@@ -16732,7 +16732,7 @@ $str)
-

method UTF8ToUTF16BE [line 6860]

+

method UTF8ToUTF16BE [line 6888]

@@ -16879,7 +16879,7 @@ $maxh = 0])
-

method write1DBarcode [line 10493]

+

method write1DBarcode [line 10526]

@@ -16969,7 +16969,7 @@ $align = ''])
-

method write2DBarcode [line 10746]

+

method write2DBarcode [line 10779]

@@ -17053,7 +17053,7 @@ $align = ''])
-

method writeBarcode [line 10696]

+

method writeBarcode [line 10729]

@@ -17143,7 +17143,7 @@ $code)
-

method writeDiskCache [line 13405]

+

method writeDiskCache [line 13452]

@@ -17200,7 +17200,7 @@ $file)
-

method writeHTML [line 11396]

+

method writeHTML [line 11429]

@@ -17266,7 +17266,7 @@ $align = ''])
-

method writeHTMLCell [line 10984]

+

method writeHTMLCell [line 11017]

@@ -17368,7 +17368,7 @@ $autopadding = true])
-

method _addfield [line 9242]

+

method _addfield [line 9270]

@@ -17440,7 +17440,7 @@ $prop)
-

method _beginpage [line 6547]

+

method _beginpage [line 6575]

@@ -17482,7 +17482,7 @@ $format = ''])
-

method _datastring [line 6659]

+

method _datastring [line 6687]

@@ -17591,7 +17591,7 @@ $preserve_objcopy = false])
-

method _dolinethrough [line 6624]

+

method _dolinethrough [line 6652]

@@ -17639,7 +17639,7 @@ $txt)
-

method _dounderline [line 6610]

+

method _dounderline [line 6638]

@@ -17687,7 +17687,7 @@ $txt)
-

method _enddoc [line 6469]

+

method _enddoc [line 6480]

@@ -17712,7 +17712,7 @@ $txt)
-

method _endpage [line 6586]

+

method _endpage [line 6614]

@@ -17737,7 +17737,7 @@ $txt)
-

method _escape [line 6648]

+

method _escape [line 6676]

@@ -17776,7 +17776,7 @@ $s)
-

method _escapetext [line 6686]

+

method _escapetext [line 6714]

@@ -17815,7 +17815,7 @@ $s)
-

method _freadint [line 6637]

+

method _freadint [line 6665]

@@ -17854,7 +17854,7 @@ $f)
-

method _generateencryptionkey [line 7255]

+

method _generateencryptionkey [line 7283]

@@ -17933,7 +17933,7 @@ $protection)
-

method _JScolor [line 9218]

+

method _JScolor [line 9246]

@@ -17969,7 +17969,7 @@ $color)
-

method _md5_16 [line 7216]

+

method _md5_16 [line 7244]

@@ -18014,7 +18014,7 @@ $str)
-

method _newobj [line 6596]

+

method _newobj [line 6624]

@@ -18042,7 +18042,7 @@ $str)
-

method _objectkey [line 7148]

+

method _objectkey [line 7176]

@@ -18081,7 +18081,7 @@ $n)
-

method _out [line 6717]

+

method _out [line 6745]

@@ -18117,7 +18117,7 @@ $s)
-

method _outarc [line 10106]

+

method _outarc [line 10139]

@@ -18189,7 +18189,7 @@ $y3)
-

method _outCurve [line 7777]

+

method _outCurve [line 7805]

@@ -18255,7 +18255,7 @@ $y3)
-

method _outLine [line 7741]

+

method _outLine [line 7769]

@@ -18297,7 +18297,7 @@ $y)
-

method _outPoint [line 7727]

+

method _outPoint [line 7755]

@@ -18339,7 +18339,7 @@ $y)
-

method _outRect [line 7758]

+

method _outRect [line 7786]

@@ -18402,7 +18402,7 @@ $op)
-

method _Ovalue [line 7229]

+

method _Ovalue [line 7257]

@@ -18573,7 +18573,7 @@ $n)
-

method _putbookmarks [line 9116]

+

method _putbookmarks [line 9144]

@@ -18598,7 +18598,7 @@ $n)
-

method _putcatalog [line 6321]

+

method _putcatalog [line 6332]

@@ -18623,7 +18623,7 @@ $n)
-

method _putcidfont0 [line 6070]

+

method _putcidfont0 [line 6081]

@@ -18696,7 +18696,7 @@ $font)
-

method _putencryption [line 7157]

+

method _putencryption [line 7185]

@@ -18724,7 +18724,7 @@ $font)
-

method _putextgstates [line 9768]

+

method _putextgstates [line 9801]

@@ -18749,7 +18749,7 @@ $font)
-

method _putfonts [line 5760]

+

method _putfonts [line 5771]

@@ -18774,7 +18774,7 @@ $font)
-

method _putfontwidths [line 5887]

+

method _putfontwidths [line 5898]

@@ -18822,7 +18822,7 @@ $cidoffset = 0])
-

method _putheader [line 6461]

+

method _putheader [line 6472]

@@ -18847,7 +18847,7 @@ $cidoffset = 0])
-

method _putimages [line 6130]

+

method _putimages [line 6141]

@@ -18872,7 +18872,7 @@ $cidoffset = 0])
-

method _putinfo [line 6287]

+

method _putinfo [line 6298]

@@ -18897,7 +18897,7 @@ $cidoffset = 0])
-

method _putjavascript [line 9190]

+

method _putjavascript [line 9218]

@@ -18922,7 +18922,7 @@ $cidoffset = 0])
-

method _putocg [line 9689]

+

method _putocg [line 9722]

@@ -18972,7 +18972,7 @@ $cidoffset = 0])
-

method _putresourcedict [line 6213]

+

method _putresourcedict [line 6224]

@@ -18997,7 +18997,7 @@ $cidoffset = 0])
-

method _putresources [line 6254]

+

method _putresources [line 6265]

@@ -19022,7 +19022,7 @@ $cidoffset = 0])
-

method _putshaders [line 10056]

+

method _putshaders [line 10089]

@@ -19053,7 +19053,7 @@ $cidoffset = 0])
-

method _putsignature [line 9437]

+

method _putsignature [line 9468]

@@ -19078,7 +19078,7 @@ $cidoffset = 0])
-

method _putspotcolors [line 6185]

+

method _putspotcolors [line 6196]

@@ -19106,7 +19106,7 @@ $cidoffset = 0])
-

method _putstream [line 6703]

+

method _putstream [line 6731]

@@ -19142,7 +19142,7 @@ $s)
-

method _puttrailer [line 6447]

+

method _puttrailer [line 6458]

@@ -19167,7 +19167,7 @@ $s)
-

method _puttruetypeunicode [line 5985]

+

method _puttruetypeunicode [line 5996]

diff --git a/examples/example_052.php b/examples/example_052.php index 9f1da93..6da03a2 100644 --- a/examples/example_052.php +++ b/examples/example_052.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_052.php // Begin : 2009-05-07 -// Last Update : 2009-05-07 +// Last Update : 2009-08-21 // // Description : Example 052 for TCPDF class // Certification Signature (experimental) @@ -70,7 +70,7 @@ $pdf->setLanguageArray($l); // --------------------------------------------------------- // set certificate file -$certificate = 'file://../tcpdf.pem'; +$certificate = 'file://../tcpdf.crt'; // set additional information $info = array( @@ -81,7 +81,7 @@ $info = array( ); // set document signature -$pdf->setSignature($certificate, $certificate, '', '', 2, $info); +$pdf->setSignature($certificate, $certificate, 'tcpdfdemo', '', 2, $info); // set font $pdf->SetFont('helvetica', '', 10); @@ -94,7 +94,8 @@ $pdf->Cell(0, 12, 'Signed Document', 1, 1, 'C'); // --------------------------------------------------------- -//Close and output PDF document +//Close and output PDF document +//echo $pdf->Output('example_052.pdf', 'S'); $pdf->Output('example_052.pdf', 'I'); //============================================================+ diff --git a/tcpdf.php b/tcpdf.php index b169296..e2a7699 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -2,9 +2,9 @@ //============================================================+ // File name : tcpdf.php // Begin : 2002-08-03 -// Last Update : 2009-08-17 +// Last Update : 2009-08-21 // Author : Nicola Asuni - info@tecnick.com - http://www.tcpdf.org -// Version : 4.6.025 +// Version : 4.6.026 // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) // ---------------------------------------------------------------------------- // Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l. @@ -126,7 +126,7 @@ * @copyright 2002-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 4.6.025 + * @version 4.6.026 */ /** @@ -150,14 +150,14 @@ if (!class_exists('TCPDF', false)) { /** * define default PDF document producer */ - define('PDF_PRODUCER', 'TCPDF 4.6.025 (http://www.tcpdf.org)'); + define('PDF_PRODUCER', 'TCPDF 4.6.026 (http://www.tcpdf.org)'); /** * This is a PHP class for generating PDF documents without requiring external extensions.
* 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.
* @name TCPDF * @package com.tecnick.tcpdf - * @version 4.6.025 + * @version 4.6.026 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL @@ -5401,8 +5401,19 @@ if (!class_exists('TCPDF', false)) { * @since 4.0.018 (2008-08-06) */ protected function _putannots($n) { + if ($this->sign AND isset($this->signature_data['cert_type']) AND $this->signature_data['cert_type'] > 0) { + // set reference for signature object + $annots = '/Annots [ *!*!*! 0 R'; + if (!isset($this->PageAnnots[$n])) { + $annots .= "\n]"; + $this->_out($annots); + return; + } + } if (isset($this->PageAnnots[$n])) { - $annots = '/Annots ['; + if (!isset($annots)) { + $annots = '/Annots ['; + } foreach ($this->PageAnnots[$n] as $key => $pl) { $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER); $a = $pl['x'] * $this->k; @@ -6330,6 +6341,19 @@ if (!class_exists('TCPDF', false)) { } elseif (!is_string($this->ZoomMode)) { $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode / 100).']'); } + // signatures + if ($this->sign AND isset($this->signature_data['cert_type'])) { + if ($this->signature_data['cert_type'] > 0) { + $this->_out('/AcroForm<<'); + $this->_out('/Fields ['.$this->sig_obj_id.' 0 R]'); + $this->_out('/NeedAppearances false'); + $this->_out('/SigFlags 3'); + $this->_out('>>'); + $this->_out('/Perms<sig_obj_id + 1).' 0 R>>'); + } else { + $this->_out('/Perms<sig_obj_id + 1).' 0 R>>'); + } + } if (isset($this->LayoutMode) AND (!$this->empty_string($this->LayoutMode))) { $this->_out('/PageLayout /'.$this->LayoutMode.''); } @@ -6353,19 +6377,6 @@ if (!class_exists('TCPDF', false)) { $v = $this->n_ocg_view.' 0 R'; $as = '<> <>'; $this->_out('/OCProperties <>>>'); - // signatures - if ($this->sign AND isset($this->signature_data['cert_type'])) { - if ($this->signature_data['cert_type'] > 0) { - $this->_out('/AcroForm<<'); - $this->_out('/Fields ['.$this->sig_obj_id.' 0 R]'); - $this->_out('/NeedAppearances false'); - $this->_out('/SigFlags 3'); - $this->_out('>>'); - $this->_out('/Perms<sig_obj_id + 1).' 0 R>>'); - } else { - $this->_out('/Perms<sig_obj_id + 1).' 0 R>>'); - } - } } /** @@ -6473,11 +6484,28 @@ if (!class_exists('TCPDF', false)) { $this->_putresources(); // Signature if ($this->sign AND isset($this->signature_data['cert_type'])) { - // widget annotation + // widget annotation for signature $this->sig_obj_id = $this->_newobj(); + // --- replace signature ID on the first page --- + // get the document content + $pdfdoc = $this->getBuffer(); + // Remove the original buffer + if (isset($this->diskcache) AND $this->diskcache) { + // remove buffer file from cache + unlink($this->buffer); + } + unset($this->buffer); + $signature_widget_ref = sprintf('/Annots [ % 6u 0 R', $this->sig_obj_id); + $pdfdoc = str_replace('/Annots [ *!*!*! 0 R', $signature_widget_ref, $pdfdoc); + $this->diskcache = false; + $this->buffer = &$pdfdoc; + $this->bufferlen = strlen($pdfdoc); + // --- $this->_out('<<'); + $this->_out('/Type /Annot /Subtype /Widget /Rect [0 0 0 0]'); + $this->_out('/P 3 0 R'); // link to first page object $this->_out('/FT /Sig'); - $this->_out('/T '.$this->_textstring('SIGNATURE')); + $this->_out('/T '.$this->_textstring('Signature')); $this->_out('/Ff 0'); $this->_out('/V '.($this->sig_obj_id + 1).' 0 R'); $this->_out('>>'); @@ -9422,6 +9450,9 @@ if (!class_exists('TCPDF', false)) { $this->_out('/Signature['.$this->ur_signature.']'); } $this->_out('>>'); + + // /Data 30 0 R + $this->_out('>>'); $this->_out(']'); } @@ -9513,6 +9544,8 @@ if (!class_exists('TCPDF', false)) { */ public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array()) { // to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.pem -out tcpdf.pem + // to convert pfx certificate to pem: openssl + // OpenSSL> pkcs12 -in -out -nodes $this->sign = true; $this->signature_data = array(); if (strlen($signing_cert) == 0) { @@ -11679,8 +11712,9 @@ if (!class_exists('TCPDF', false)) { $t_x = $this->lMargin - $this->endlinex - (($no - $ns - 1) * $this->GetStringWidth(chr(32))); } // calculate additional space to add to each space - $spacewidth = (($tw - $linew + (($no - $ns) * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1)) * $this->k; - $spacewidthu = -1000 * ($tw - $linew + ($no * $this->GetStringWidth(chr(32)))) / ($ns?$ns:1) / $this->FontSize; + $spacelen = $this->GetStringWidth(chr(32)); + $spacewidth = (($tw - $linew + (($no - $ns) * $spacelen)) / ($ns?$ns:1)) * $this->k; + $spacewidthu = -1000 * ($tw - $linew + ($no * $spacelen)) / ($ns?$ns:1) / $this->FontSize; $nsmax = $ns; $ns = 0; reset($lnstring); @@ -11689,6 +11723,19 @@ if (!class_exists('TCPDF', false)) { $prev_epsposbeg = 0; global $spacew; while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { + // check if we are inside a string section '[( ... )]' + $stroffset = strpos($pmid, '[(', $offset); + if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { + // set offset to the end of string section + $offset = strpos($pmid, ')]', $stroffset); + while (($offset !== false) AND ($pmid{($offset - 1)} == '\\')) { + $offset = strpos($pmid, ')]', ($offset + 1)); + } + if ($offset === false) { + $this->Error('HTML Justification: malformed PDF code.'); + } + continue; + } if ($this->rtl OR $this->tmprtl) { $spacew = ($spacewidth * ($nsmax - $ns)); } else {
diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index b968346..d56a2fa 100644 --- a/doc/li_com-tecnick-tcpdf.html +++ b/doc/li_com-tecnick-tcpdf.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
@@ -19209,7 +19209,7 @@ $font)
-

method _putursignature [line 9393]

+

method _putursignature [line 9421]

diff --git a/doc/index.html b/doc/index.html index b968346..d56a2fa 100644 --- a/doc/index.html +++ b/doc/index.html @@ -58,7 +58,7 @@ This documentation was generated by phpDocumentor v1.4.1

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
diff --git a/doc/errors.html b/doc/errors.html index 038fd9b..75f5284 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

- Documentation generated on Mon, 17 Aug 2009 18:00:05 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:52 +0200 by phpDocumentor 1.4.1
@@ -19234,7 +19234,7 @@ $font)
-

method _putviewerpreferences [line 6377]

+

method _putviewerpreferences [line 6388]

diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index db26c2e..a2f7ed0 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -1401,7 +1401,7 @@ top

- Documentation generated on Mon, 17 Aug 2009 17:59:53 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
diff --git a/doc/elementindex.html b/doc/elementindex.html index da72516..4c0ecb8 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -1378,7 +1378,7 @@ top

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
@@ -19265,7 +19265,7 @@ $font)
-

method _putxobjectdict [line 6202]

+

method _putxobjectdict [line 6213]

diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index da468e2..fe73d88 100644 --- a/doc/com-tecnick-tcpdf/_unicode_data.php.html +++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html @@ -237,7 +237,7 @@ Unicode Include file for TCPDF.




- Documentation generated on Mon, 17 Aug 2009 18:00:05 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:52 +0200 by phpDocumentor 1.4.1
@@ -19290,7 +19290,7 @@ $font)
-

method _RC4 [line 7176]

+

method _RC4 [line 7204]

diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index 3a472fa..2f686e0 100644 --- a/doc/com-tecnick-tcpdf/_tcpdf.php.html +++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html @@ -73,7 +73,7 @@ This is a PHP class for generating PDF documents without requiring external exte - + @@ -104,7 +104,7 @@ unicode data

diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html index a0ac428..7c39831 100644 --- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html +++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html @@ -88,7 +88,7 @@ Array of WEB safe colors.




- Documentation generated on Mon, 17 Aug 2009 17:59:55 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:47 +0200 by phpDocumentor 1.4.1
@@ -19341,7 +19341,7 @@ $text)
-

method _textstring [line 6672]

+

method _textstring [line 6700]

diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index fdeba05..85fab66 100644 --- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html +++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html @@ -507,7 +507,7 @@ Configuration file for TCPDF.




- Documentation generated on Mon, 17 Aug 2009 18:00:05 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:52 +0200 by phpDocumentor 1.4.1
diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index 1ad3e3b..ab0311c 100644 --- a/doc/com-tecnick-tcpdf/_barcodes.php.html +++ b/doc/com-tecnick-tcpdf/_barcodes.php.html @@ -96,7 +96,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
@@ -19422,7 +19422,7 @@ $file)
-

method _Uvalue [line 7242]

+

method _Uvalue [line 7270]

diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html index c07b746..5e85e6c 100644 --- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html @@ -1368,7 +1368,7 @@ $type)

- Documentation generated on Mon, 17 Aug 2009 17:59:54 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:46 +0200 by phpDocumentor 1.4.1
@@ -19459,7 +19459,7 @@ $file)

- Documentation generated on Mon, 17 Aug 2009 17:59:56 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:47 +0200 by phpDocumentor 1.4.1
author:  Nicola Asuni
version:  4.6.025version:  4.6.026
copyright:  2002-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
- PDF_PRODUCER = 'TCPDF 4.6.025 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 4.6.026 (http://www.tcpdf.org)'
@@ -115,7 +115,7 @@ unicode data


- Documentation generated on Mon, 17 Aug 2009 17:59:56 +0200 by phpDocumentor 1.4.1 + Documentation generated on Fri, 21 Aug 2009 17:30:47 +0200 by phpDocumentor 1.4.1