From 559e79bdc613c4d2fffbf99897963b08e3d2f4b7 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Mon, 4 Oct 2010 17:59:10 +0200 Subject: [PATCH] 5.8.035 --- CHANGELOG.TXT | 14 + README.TXT | 5 +- doc/classtrees_com-tecnick-tcpdf.html | 2 +- doc/com-tecnick-tcpdf/PDF417.html | 2 +- doc/com-tecnick-tcpdf/QRcode.html | 2 +- doc/com-tecnick-tcpdf/TCPDF.html | 2086 +++++++++++------ doc/com-tecnick-tcpdf/TCPDF2DBarcode.html | 2 +- doc/com-tecnick-tcpdf/TCPDFBarcode.html | 2 +- doc/com-tecnick-tcpdf/_2dbarcodes.php.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/_pdf417.php.html | 2 +- doc/com-tecnick-tcpdf/_qrcode.php.html | 2 +- doc/com-tecnick-tcpdf/_tcpdf.php.html | 16 +- doc/com-tecnick-tcpdf/_unicode_data.php.html | 2 +- doc/elementindex.html | 56 +- doc/elementindex_com-tecnick-tcpdf.html | 56 +- doc/errors.html | 2 +- doc/index.html | 2 +- doc/li_com-tecnick-tcpdf.html | 2 +- examples/example_005.php | 33 +- examples/example_027.php | 3 +- examples/example_057.php | 34 +- examples/index.php | 2 +- tcpdf.php | 1623 ++++++++++--- 26 files changed, 2862 insertions(+), 1096 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 90582d0..af570bd 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,17 @@ +5.9.000 (2010-10-04) + - Support for text stretching and spacing (kerning) was added, see example n. 63 and methods setFontStretching(), getFontStretching(), setFontSpacing(), getFontSpacing(). + - Support for CSS properties 'font-stretch' and 'letter-spacing' was added (see example n. 63). + - The cMargin state was replaced by cell_padding array that can be set/get using setCellPadding() and getCellPadding() methods. + - Methods getCellPaddings() and setCellPaddings() were added to fine tune cell paddings (see example n. 5). + - Methods getCellMargins() and setCellMargins() were added to fine tune cell margins (see example n. 5). + - Method write1DBarcode() was improved to permit custom labels (see example n. 27). + - Method ImagePngAlpha() now includes support for ImageMagick to improve performances. + - XObject Template support was extended to support Multicell(), writeHTML() and writeHTMLCell() methods. + - The signature of getNumLines() and getStringHeight() methods is changed. + - Example n. 57 was updated. + +// ------------------------------------------------------------------- + 5.8.034 (2010-09-27) - A bug related to SetFont on XObject templates was fixed. diff --git a/README.TXT b/README.TXT index 9ab5511..8e587e1 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.8.034 -Release date: 2010-09-27 +Version: 5.8.035 +Release date: 2010-10-02 Author: Nicola Asuni Copyright (c) 2002-2010: @@ -46,6 +46,7 @@ Main Features: * multiple columns mode; * bookmarks and table of content; * text hyphenation; + * text stretching and kerning; * automatic page break, line break and text alignments including justification; * automatic page numbering and page groups; * move and delete pages; diff --git a/doc/classtrees_com-tecnick-tcpdf.html b/doc/classtrees_com-tecnick-tcpdf.html index 1bd1719..4059ef1 100644 --- a/doc/classtrees_com-tecnick-tcpdf.html +++ b/doc/classtrees_com-tecnick-tcpdf.html @@ -60,7 +60,7 @@

- Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/PDF417.html b/doc/com-tecnick-tcpdf/PDF417.html index b86b224..970122a 100644 --- a/doc/com-tecnick-tcpdf/PDF417.html +++ b/doc/com-tecnick-tcpdf/PDF417.html @@ -1003,7 +1003,7 @@ $code)

- Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/QRcode.html b/doc/com-tecnick-tcpdf/QRcode.html index 32c6d8b..57d85f0 100644 --- a/doc/com-tecnick-tcpdf/QRcode.html +++ b/doc/com-tecnick-tcpdf/QRcode.html @@ -5551,7 +5551,7 @@ $frame)

- Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
diff --git a/doc/com-tecnick-tcpdf/TCPDF.html b/doc/com-tecnick-tcpdf/TCPDF.html index 3caaa19..f41c781 100644 --- a/doc/com-tecnick-tcpdf/TCPDF.html +++ b/doc/com-tecnick-tcpdf/TCPDF.html @@ -83,7 +83,7 @@ Source Location: /tcpdf.php

Version:

@@ -110,7 +110,8 @@ Source Location: /tcpdf.php

  • $cache_size_UTF8StringToArray
  • $cache_UTF8StringToArray
  • $cell_height_ratio
  • -
  • $cMargin
  • +
  • $cell_margin
  • +
  • $cell_padding
  • $cntmrk
  • $ColorFlag
  • $columns
  • @@ -157,6 +158,8 @@ Source Location: /tcpdf.php

  • $FontSizePt
  • $FontStyle
  • $font_obj_ids
  • +
  • $font_spacing
  • +
  • $font_stretching
  • $font_subsetting
  • $footerlen
  • $footerpos
  • @@ -331,6 +334,7 @@ Source Location: /tcpdf.php

  • AddSpotColor
  • addTOC
  • addTOCPage
  • +
  • adjustCellPadding
  • AliasNbPages
  • AliasNumPage
  • Annotation
  • @@ -383,11 +387,17 @@ Source Location: /tcpdf.php

  • getCellBorder
  • getCellCode
  • getCellHeightRatio
  • +
  • getCellMargins
  • +
  • getCellPaddings
  • GetCharWidth
  • getColumn
  • getCSSBorderDashStyle
  • getCSSBorderStyle
  • getCSSBorderWidth
  • +
  • getCSSFontSpacing
  • +
  • getCSSFontStretching
  • +
  • getCSSMargin
  • +
  • getCSSPadding
  • getEncPermissionsString
  • getFontAscent
  • getFontBuffer
  • @@ -397,6 +407,8 @@ Source Location: /tcpdf.php

  • getFontSize
  • getFontSizePt
  • getFontsList
  • +
  • getFontSpacing
  • +
  • getFontStretching
  • getFontStyle
  • getFontSubsetting
  • getFooterFont
  • @@ -436,6 +448,7 @@ Source Location: /tcpdf.php

  • getPageWidth
  • getPathPaintOperator
  • getPDFData
  • +
  • getRawCharWidth
  • getRemainingWidth
  • getRTL
  • getScaleFactor
  • @@ -497,6 +510,7 @@ Source Location: /tcpdf.php

  • RegularPolygon
  • removeSHY
  • replaceBuffer
  • +
  • resetLastH
  • revstrpos
  • rfread
  • rollbackTransaction
  • @@ -517,7 +531,9 @@ Source Location: /tcpdf.php

  • SetBooklet
  • setBuffer
  • setCellHeightRatio
  • +
  • setCellMargins
  • SetCellPadding
  • +
  • setCellPaddings
  • setColumnsArray
  • SetCompression
  • setContentMark
  • @@ -536,6 +552,8 @@ Source Location: /tcpdf.php

  • SetFont
  • setFontBuffer
  • SetFontSize
  • +
  • setFontSpacing
  • +
  • setFontStretching
  • setFontSubBuffer
  • setFontSubsetting
  • setFooter
  • @@ -739,7 +757,7 @@ Source Location: /tcpdf.php

    Class Details

    -[line 169]
    +[line 171]
    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.




    Tags:

    @@ -748,7 +766,7 @@ This is a PHP class for generating PDF documents without requiring external exte author:  Nicola Asuni - info@tecnick.com - version:  5.8.034 + version:  5.9.000 link:  http://www.tcpdf.org @@ -771,7 +789,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $AliasNbPages =  '{nb}'

    -

    [line 509]

    +

    [line 519]



    Tags:

    @@ -798,7 +816,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $AliasNumPage =  '{pnb}'

    -

    [line 515]

    +

    [line 525]



    Tags:

    @@ -825,7 +843,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $annotation_fonts = array()

    -

    [line 1376]

    +

    [line 1386]

    List of fonts used on form fields (fontname => fontkey).



    Tags:

    @@ -852,7 +870,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $author =  ''

    -

    [line 491]

    +

    [line 501]



    Tags:

    @@ -876,7 +894,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $AutoPageBreak =

    -

    [line 449]

    +

    [line 459]



    Tags:

    @@ -903,7 +921,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $barcode =  false

    -

    [line 604]

    +

    [line 614]



    Tags:

    @@ -930,7 +948,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $bgcolor =

    -

    [line 702]

    +

    [line 712]



    Tags:

    @@ -957,7 +975,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $bMargin =

    -

    [line 291]

    +

    [line 293]



    Tags:

    @@ -984,7 +1002,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $booklet =  false

    -

    [line 1066]

    +

    [line 1076]

    Booklet mode for double-sided pages



    Tags:

    @@ -1011,7 +1029,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $bordermrk = array()

    -

    [line 938]

    +

    [line 948]

    Array used to store positions inside the pages buffer.

    keys are the page numbers




    Tags:

    @@ -1038,7 +1056,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $buffer =

    -

    [line 195]

    +

    [line 197]



    Tags:

    @@ -1065,7 +1083,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $bufferlen =  0

    -

    [line 1166]

    +

    [line 1176]

    Length of the buffer in bytes.



    Tags:

    @@ -1092,7 +1110,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $byterange_string =  '/ByteRange[0 ********** ********** **********]'

    -

    [line 1313]

    +

    [line 1323]

    ByteRange placemark used during signature process.



    Tags:

    @@ -1119,7 +1137,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cache_file_length = array()

    -

    [line 1222]

    +

    [line 1232]

    Array used to store the lengths of cache files



    Tags:

    @@ -1146,7 +1164,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cache_maxsize_UTF8StringToArray =  8

    -

    [line 1250]

    +

    [line 1260]

    Maximum size of cache array used for UTF8StringToArray() method.



    Tags:

    @@ -1173,7 +1191,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cache_size_UTF8StringToArray =  0

    -

    [line 1257]

    +

    [line 1267]

    Current size of cache array used for UTF8StringToArray() method.



    Tags:

    @@ -1200,7 +1218,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cache_UTF8StringToArray = array()

    -

    [line 1243]

    +

    [line 1253]

    Cache array for UTF8StringToArray() method.



    Tags:

    @@ -1227,7 +1245,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cell_height_ratio =  K_CELL_HEIGHT_RATIO

    -

    [line 901]

    +

    [line 911]

    Default cell height ratio.



    Tags:

    @@ -1251,19 +1269,22 @@ This is a PHP class for generating PDF documents without requiring external exte


    [ Top ]

    - +

    -

    $cMargin =

    -

    [line 297]

    +

    $cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0)

    +

    [line 307]



    Tags:

    - + - + + + +
    var:  internal paddingvar:  of cell margins ('T' => top, 'R' => right, 'B' => bottom, 'L' => left)
    access:  publicsince:  5.9.000 (2010-10-04)
    access:  protected
    @@ -1273,7 +1294,37 @@ This is a PHP class for generating PDF documents without requiring external exte - + + +
    Type:  cellarray
    +


    +
    [ Top ]

    + +

    +

    $cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0)

    +

    [line 300]

    +

    +

    Tags:

    +
    + + + + + + + + + + +
    var:  of cell internal paddings ('T' => top, 'R' => right, 'B' => bottom, 'L' => left)
    since:  5.9.000 (2010-10-03)
    access:  protected
    +
    + +
    +
    + + + +
    Type:  array


    @@ -1281,7 +1332,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $cntmrk = array()

    -

    [line 954]

    +

    [line 964]

    Array used to store content positions inside the pages buffer.

    keys are the page numbers




    Tags:

    @@ -1308,7 +1359,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $ColorFlag =

    -

    [line 443]

    +

    [line 453]



    Tags:

    @@ -1335,7 +1386,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $columns = array()

    -

    [line 1425]

    +

    [line 1435]

    Array of column measures (width, space, starting Y position)



    Tags:

    @@ -1362,7 +1413,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $column_start_page =  0

    -

    [line 1446]

    +

    [line 1456]

    Starting page for columns



    Tags:

    @@ -1389,7 +1440,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $colxshift = array('x' => 0, 's' => 0, 'p' => 0)

    -

    [line 1460]

    +

    [line 1470]

    Array of: X difference between table cell x start and starting page margin, cellspacing, cellpadding



    Tags:

    @@ -1416,7 +1467,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $compress =

    -

    [line 213]

    +

    [line 215]



    Tags:

    @@ -1443,7 +1494,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $CoreFonts =

    -

    [line 327]

    +

    [line 337]



    Tags:

    @@ -1470,7 +1521,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $creator =  ''

    -

    [line 503]

    +

    [line 513]



    Tags:

    @@ -1494,7 +1545,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $CurOrientation =

    -

    [line 219]

    +

    [line 221]



    Tags:

    @@ -1521,7 +1572,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $CurrentFont =

    -

    [line 407]

    +

    [line 417]



    Tags:

    @@ -1548,7 +1599,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $current_column =  0

    -

    [line 1439]

    +

    [line 1449]

    Current column number



    Tags:

    @@ -1575,7 +1626,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $currpagegroup =

    -

    [line 859]

    +

    [line 869]

    Contains the alias of the current page group



    Tags:

    @@ -1602,7 +1653,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $customlistindent =  -1

    -

    [line 1088]

    +

    [line 1098]



    Tags:

    @@ -1632,7 +1683,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255),'strokeColor'=>array(128,128,128))

    -

    [line 1341]

    +

    [line 1351]

    Deafult Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. Annotation options can be directly specified using the 'aopt' entry.



    Tags:

    @@ -1659,7 +1710,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $default_graphic_vars = array()

    -

    [line 1515]

    +

    [line 1525]



    Tags:

    @@ -1689,7 +1740,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $default_monospaced_font =  'courier'

    -

    [line 1208]

    +

    [line 1218]

    Default monospaced font



    Tags:

    @@ -1716,7 +1767,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $default_table_columns =  4

    -

    [line 646]

    +

    [line 656]



    Tags:

    @@ -1743,7 +1794,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $diffs = array()

    -

    [line 345]

    +

    [line 355]



    Tags:

    @@ -1770,7 +1821,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $diskcache =  false

    -

    [line 1173]

    +

    [line 1183]

    If true enables disk caching.



    Tags:

    @@ -1797,7 +1848,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $dpi =  72

    -

    [line 838]

    +

    [line 848]

    Dot Per Inch Document Resolution (do not change)



    Tags:

    @@ -1824,7 +1875,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $DrawColor =

    -

    [line 425]

    +

    [line 435]



    Tags:

    @@ -1851,7 +1902,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $embeddedfiles = array()

    -

    [line 1102]

    +

    [line 1112]



    Tags:

    @@ -1881,7 +1932,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $emptypagemrk = array()

    -

    [line 946]

    +

    [line 956]

    Array used to store page positions to track empty pages.

    keys are the page numbers




    Tags:

    @@ -1908,7 +1959,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $encoding =  'UTF-8'

    -

    [line 721]

    +

    [line 731]



    Tags:

    @@ -1938,7 +1989,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $encryptdata = array()

    -

    [line 758]

    +

    [line 768]

    Array containing encryption settings



    Tags:

    @@ -1965,7 +2016,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $encrypted =

    -

    [line 751]

    +

    [line 761]

    Indicates whether document is protected



    Tags:

    @@ -1992,7 +2043,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $enc_padding =  "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A"

    -

    [line 778]

    +

    [line 788]

    Encryption padding



    Tags:

    @@ -2016,7 +2067,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $endlinex =  0

    -

    [line 982]

    +

    [line 992]

    End position of the latest inserted line



    Tags:

    @@ -2043,7 +2094,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $epsmarker =  'x#!#EPS#!#x'

    -

    [line 1045]

    +

    [line 1055]

    String used to mark the beginning and end of EPS image blocks



    Tags:

    @@ -2070,7 +2121,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $extgstates =

    -

    [line 887]

    +

    [line 897]

    Array of transparency objects and parameters.



    Tags:

    @@ -2097,7 +2148,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $feps =  0.005

    -

    [line 1073]

    +

    [line 1083]

    Epsilon value used for float calculations



    Tags:

    @@ -2124,7 +2175,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fgcolor =

    -

    [line 666]

    +

    [line 676]



    Tags:

    @@ -2151,7 +2202,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fhPt =

    -

    [line 243]

    +

    [line 245]



    Tags:

    @@ -2178,7 +2229,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $file_id =

    -

    [line 785]

    +

    [line 795]

    File ID (used on trailer)



    Tags:

    @@ -2205,7 +2256,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FillColor =

    -

    [line 431]

    +

    [line 441]



    Tags:

    @@ -2232,7 +2283,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontAscent =

    -

    [line 382]

    +

    [line 392]



    Tags:

    @@ -2262,7 +2313,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontDescent =

    -

    [line 389]

    +

    [line 399]



    Tags:

    @@ -2292,7 +2343,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontFamily =

    -

    [line 369]

    +

    [line 379]



    Tags:

    @@ -2319,7 +2370,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontFiles = array()

    -

    [line 339]

    +

    [line 349]



    Tags:

    @@ -2346,7 +2397,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fontkeys = array()

    -

    [line 1187]

    +

    [line 1197]

    Store the font keys.



    Tags:

    @@ -2373,7 +2424,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fontlist = array()

    -

    [line 660]

    +

    [line 670]



    Tags:

    @@ -2400,7 +2451,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fonts = array()

    -

    [line 333]

    +

    [line 343]



    Tags:

    @@ -2427,7 +2478,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontSize =

    -

    [line 419]

    +

    [line 429]



    Tags:

    @@ -2454,7 +2505,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontSizePt =

    -

    [line 413]

    +

    [line 423]



    Tags:

    @@ -2481,7 +2532,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $FontStyle =

    -

    [line 375]

    +

    [line 385]



    Tags:

    @@ -2508,7 +2559,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $font_obj_ids = array()

    -

    [line 1194]

    +

    [line 1204]

    Store the font object IDs.



    Tags:

    @@ -2528,6 +2579,66 @@ This is a PHP class for generating PDF documents without requiring external exte Type:   mixed + + +


    +
    [ Top ]

    + +

    +

    $font_spacing =  0

    +

    [line 1560]

    +

    +

    Tags:

    +
    + + + + + + + + + + +
    var:  or decreases the space between characters in a text by the specified amount (kerning).
    since:  5.9.000 (2010-09-29)
    access:  protected
    +
    + +
    +
    + + + + + +
    Type:  increases
    +


    +
    [ Top ]

    + +

    +

    $font_stretching =  100

    +

    [line 1553]

    +

    +

    Tags:

    +
    + + + + + + + + + + +
    var:  of character stretching
    since:  5.9.000 (2010-09-29)
    access:  protected
    +
    + +
    +
    + + + +
    Type:  percentage


    @@ -2535,7 +2646,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $font_subsetting =  true

    -

    [line 1508]

    +

    [line 1518]



    Tags:

    @@ -2565,7 +2676,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $footerlen = array()

    -

    [line 968]

    +

    [line 978]

    Array used to store footer length of each page.



    Tags:

    @@ -2592,7 +2703,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $footerpos = array()

    -

    [line 961]

    +

    [line 971]

    Array used to store footer positions of each page.



    Tags:

    @@ -2619,7 +2730,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $footer_font =

    -

    [line 592]

    +

    [line 602]



    Tags:

    @@ -2646,7 +2757,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $footer_margin =

    -

    [line 566]

    +

    [line 576]



    Tags:

    @@ -2673,7 +2784,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $form_action =  ''

    -

    [line 1355]

    +

    [line 1365]

    Current form action (used during XHTML rendering)



    Tags:

    @@ -2700,7 +2811,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $form_enctype =  'application/x-www-form-urlencoded'

    -

    [line 1362]

    +

    [line 1372]

    Current form encryption type (used during XHTML rendering)



    Tags:

    @@ -2727,7 +2838,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $form_mode =  'post'

    -

    [line 1369]

    +

    [line 1379]

    Current method to submit forms.



    Tags:

    @@ -2754,7 +2865,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $form_obj_id = array()

    -

    [line 1334]

    +

    [line 1344]

    List of form annotations IDs



    Tags:

    @@ -2781,7 +2892,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $fwPt =

    -

    [line 237]

    +

    [line 239]



    Tags:

    @@ -2808,7 +2919,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $gradients = array()

    -

    [line 922]

    +

    [line 932]

    Array for storing gradient information.



    Tags:

    @@ -2835,7 +2946,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $h =

    -

    [line 267]

    +

    [line 269]



    Tags:

    @@ -2862,7 +2973,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_font =

    -

    [line 586]

    +

    [line 596]



    Tags:

    @@ -2889,7 +3000,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_logo =  ''

    -

    [line 622]

    +

    [line 632]



    Tags:

    @@ -2916,7 +3027,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_logo_width =  30

    -

    [line 628]

    +

    [line 638]



    Tags:

    @@ -2943,7 +3054,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_margin =

    -

    [line 560]

    +

    [line 570]



    Tags:

    @@ -2970,7 +3081,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_string =  ''

    -

    [line 640]

    +

    [line 650]



    Tags:

    @@ -2997,7 +3108,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $header_title =  ''

    -

    [line 634]

    +

    [line 644]



    Tags:

    @@ -3024,7 +3135,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $hPt =

    -

    [line 255]

    +

    [line 257]



    Tags:

    @@ -3051,7 +3162,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $HREF = array()

    -

    [line 654]

    +

    [line 664]



    Tags:

    @@ -3078,7 +3189,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $htmlLinkColorArray = array(0, 0, 255)

    -

    [line 1124]

    +

    [line 1134]

    Default color for html links



    Tags:

    @@ -3105,7 +3216,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $htmlLinkFontStyle =  'U'

    -

    [line 1131]

    +

    [line 1141]

    Default font style to add to html links



    Tags:

    @@ -3132,7 +3243,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $htmlvspace =  0

    -

    [line 1024]

    +

    [line 1034]

    Count the latest inserted vertical spaces on HTML



    Tags:

    @@ -3159,7 +3270,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $imagekeys = array()

    -

    [line 1159]

    +

    [line 1169]

    Store the image keys.



    Tags:

    @@ -3186,7 +3297,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $images = array()

    -

    [line 351]

    +

    [line 361]



    Tags:

    @@ -3213,7 +3324,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $imgscale =  1

    -

    [line 539]

    +

    [line 549]



    Tags:

    @@ -3246,7 +3357,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $img_rb_x =

    -

    [line 523]

    +

    [line 533]



    Tags:

    @@ -3279,7 +3390,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $img_rb_y =

    -

    [line 531]

    +

    [line 541]



    Tags:

    @@ -3312,7 +3423,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $InFooter =  false

    -

    [line 461]

    +

    [line 471]



    Tags:

    @@ -3339,7 +3450,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $internal_encoding =

    -

    [line 728]

    +

    [line 738]



    Tags:

    @@ -3369,7 +3480,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $inthead =  false

    -

    [line 1418]

    +

    [line 1428]

    True when we are printing the thead section on a new page



    Tags:

    @@ -3396,7 +3507,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $intmrk = array()

    -

    [line 930]

    +

    [line 940]

    Array used to store positions inside the pages buffer.

    keys are the page numbers




    Tags:

    @@ -3423,7 +3534,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $inxobj =  false

    -

    [line 1529]

    +

    [line 1539]



    Tags:

    @@ -3453,7 +3564,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $isunicode =  false

    -

    [line 547]

    +

    [line 557]



    Tags:

    @@ -3486,7 +3597,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $javascript =  ''

    -

    [line 810]

    +

    [line 820]

    javascript code



    Tags:

    @@ -3513,7 +3624,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $jpeg_quality =

    -

    [line 894]

    +

    [line 904]

    Set the default JPEG compression quality (1-100)



    Tags:

    @@ -3540,7 +3651,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $js_objects = array()

    -

    [line 1348]

    +

    [line 1358]

    Javascript objects array



    Tags:

    @@ -3567,7 +3678,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $k =

    -

    [line 231]

    +

    [line 233]



    Tags:

    @@ -3594,7 +3705,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $keywords =  ''

    -

    [line 497]

    +

    [line 507]



    Tags:

    @@ -3618,7 +3729,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $l =

    -

    [line 598]

    +

    [line 608]



    Tags:

    @@ -3645,7 +3756,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $lasth =

    -

    [line 315]

    +

    [line 325]



    Tags:

    @@ -3672,7 +3783,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $last_enc_key =

    -

    [line 765]

    +

    [line 775]

    last RC4 key encrypted (cached for optimisation)



    Tags:

    @@ -3699,7 +3810,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $last_enc_key_c =

    -

    [line 772]

    +

    [line 782]

    last RC4 computed key



    Tags:

    @@ -3726,7 +3837,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $LayoutMode =

    -

    [line 473]

    +

    [line 483]



    Tags:

    @@ -3753,7 +3864,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $linestyleCap =  '0 J'

    -

    [line 996]

    +

    [line 1006]

    PDF string for last line width



    Tags:

    @@ -3780,7 +3891,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $linestyleDash =  '[] 0 d'

    -

    [line 1010]

    +

    [line 1020]

    PDF string for last line width



    Tags:

    @@ -3807,7 +3918,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $linestyleJoin =  '0 j'

    -

    [line 1003]

    +

    [line 1013]

    PDF string for last line width



    Tags:

    @@ -3834,7 +3945,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $linestyleWidth =  ''

    -

    [line 989]

    +

    [line 999]

    PDF string for last line width



    Tags:

    @@ -3861,7 +3972,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $linethrough =

    -

    [line 824]

    +

    [line 834]

    line trough state



    Tags:

    @@ -3888,7 +3999,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $LineWidth =

    -

    [line 321]

    +

    [line 331]



    Tags:

    @@ -3915,7 +4026,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $links = array()

    -

    [line 363]

    +

    [line 373]



    Tags:

    @@ -3942,7 +4053,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $lispacer =  ''

    -

    [line 714]

    +

    [line 724]



    Tags:

    @@ -3969,7 +4080,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $listcount = array()

    -

    [line 678]

    +

    [line 688]



    Tags:

    @@ -3996,7 +4107,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $listindent =  0

    -

    [line 690]

    +

    [line 700]



    Tags:

    @@ -4023,7 +4134,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $listindentlevel =  0

    -

    [line 696]

    +

    [line 706]



    Tags:

    @@ -4050,7 +4161,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $listnum =  0

    -

    [line 684]

    +

    [line 694]



    Tags:

    @@ -4077,7 +4188,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $listordered = array()

    -

    [line 672]

    +

    [line 682]



    Tags:

    @@ -4104,7 +4215,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $lisymbol =  ''

    -

    [line 1038]

    +

    [line 1048]

    Symbol used for HTML unordered list items



    Tags:

    @@ -4131,7 +4242,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $lMargin =

    -

    [line 273]

    +

    [line 275]



    Tags:

    @@ -4158,7 +4269,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $maxselcol = array('page' => 0, 'column' => 0)

    -

    [line 1453]

    +

    [line 1463]

    Maximum page and column selected



    Tags:

    @@ -4185,7 +4296,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $n =

    -

    [line 183]

    +

    [line 185]



    Tags:

    @@ -4212,7 +4323,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $newline =  true

    -

    [line 975]

    +

    [line 985]

    True if a newline is created.



    Tags:

    @@ -4239,7 +4350,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $newpagegroup = array()

    -

    [line 845]

    +

    [line 855]

    Array of page numbers were a new page group was started



    Tags:

    @@ -4266,7 +4377,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $numfonts =  0

    -

    [line 1180]

    +

    [line 1190]

    Counts the number of fonts.



    Tags:

    @@ -4293,7 +4404,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $numimages =  0

    -

    [line 1152]

    +

    [line 1162]

    Counts the number of pages.



    Tags:

    @@ -4320,7 +4431,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $numpages =  0

    -

    [line 1138]

    +

    [line 1148]

    Counts the number of pages.



    Tags:

    @@ -4347,7 +4458,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $num_columns =  1

    -

    [line 1432]

    +

    [line 1442]

    Number of colums



    Tags:

    @@ -4374,7 +4485,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $n_js =

    -

    [line 817]

    +

    [line 827]

    javascript counter



    Tags:

    @@ -4401,7 +4512,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $n_ocg_print =

    -

    [line 873]

    +

    [line 883]

    Print visibility.



    Tags:

    @@ -4428,7 +4539,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $n_ocg_view =

    -

    [line 880]

    +

    [line 890]

    View visibility.



    Tags:

    @@ -4455,7 +4566,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $objcopy =

    -

    [line 1215]

    +

    [line 1225]

    Used to store a cloned copy of the current class object



    Tags:

    @@ -4482,7 +4593,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $offsets =

    -

    [line 189]

    +

    [line 191]



    Tags:

    @@ -4509,7 +4620,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $opencell =  true

    -

    [line 1095]

    +

    [line 1105]



    Tags:

    @@ -4539,7 +4650,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $openMarkedContent =  false

    -

    [line 1017]

    +

    [line 1027]

    True if marked-content sequence is open



    Tags:

    @@ -4566,7 +4677,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $original_lMargin =

    -

    [line 573]

    +

    [line 583]



    Tags:

    @@ -4596,7 +4707,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $original_rMargin =

    -

    [line 580]

    +

    [line 590]



    Tags:

    @@ -4626,7 +4737,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $OutlineRoot =

    -

    [line 801]

    +

    [line 811]

    Outline root for bookmark



    Tags:

    @@ -4653,7 +4764,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $outlines = array()

    -

    [line 794]

    +

    [line 804]

    Outlines for bookmark



    Tags:

    @@ -4680,7 +4791,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $overline =

    -

    [line 401]

    +

    [line 411]



    Tags:

    @@ -4707,7 +4818,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $page =

    -

    [line 177]

    +

    [line 179]



    Tags:

    @@ -4734,7 +4845,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $PageAnnots = array()

    -

    [line 357]

    +

    [line 367]



    Tags:

    @@ -4761,7 +4872,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $PageBreakTrigger =

    -

    [line 455]

    +

    [line 465]



    Tags:

    @@ -4788,7 +4899,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pagedim = array()

    -

    [line 225]

    +

    [line 227]



    Tags:

    @@ -4815,7 +4926,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pagegroups =

    -

    [line 852]

    +

    [line 862]

    Contains the number of pages of the groups



    Tags:

    @@ -4842,7 +4953,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pagelen = array()

    -

    [line 1145]

    +

    [line 1155]

    Array containing page lengths in bytes.



    Tags:

    @@ -4869,7 +4980,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $PageMode =

    -

    [line 915]

    +

    [line 925]

    A name object specifying how the document should be displayed when opened.



    Tags:

    @@ -4896,7 +5007,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pageopen = array()

    -

    [line 1201]

    +

    [line 1211]

    Store the fage status (true when opened, false when closed).



    Tags:

    @@ -4923,7 +5034,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pages = array()

    -

    [line 201]

    +

    [line 203]



    Tags:

    @@ -4950,7 +5061,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $page_obj_id = array()

    -

    [line 1327]

    +

    [line 1337]

    ID of page objects



    Tags:

    @@ -4977,7 +5088,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $pdfunit =  'mm'

    -

    [line 1488]

    +

    [line 1498]



    Tags:

    @@ -5007,7 +5118,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $PDFVersion =  '1.7'

    -

    [line 554]

    +

    [line 564]



    Tags:

    @@ -5037,7 +5148,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $premode =  false

    -

    [line 1109]

    +

    [line 1119]



    Tags:

    @@ -5067,7 +5178,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $print_footer =  true

    -

    [line 616]

    +

    [line 626]



    Tags:

    @@ -5094,7 +5205,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $print_header =  true

    -

    [line 610]

    +

    [line 620]



    Tags:

    @@ -5121,7 +5232,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $radiobutton_groups = array()

    -

    [line 1383]

    +

    [line 1393]

    List of radio buttons parent objects.



    Tags:

    @@ -5148,7 +5259,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $radio_groups = array()

    -

    [line 1390]

    +

    [line 1400]

    List of radio group objects IDs



    Tags:

    @@ -5175,7 +5286,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $rasterize_vector_images =  false

    -

    [line 1501]

    +

    [line 1511]



    Tags:

    @@ -5205,7 +5316,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $re_space = array('p' => '[^\S\xa0]', 'm' => '')

    -

    [line 1299]

    +

    [line 1309]

    Array of parts $re_spaces



    Tags:

    @@ -5232,7 +5343,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $re_spaces =  '/[^\S\xa0]/'

    -

    [line 1292]

    +

    [line 1302]

    Regular expression used to find blank characters used for word-wrapping.



    Tags:

    @@ -5259,7 +5370,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $rMargin =

    -

    [line 285]

    +

    [line 287]



    Tags:

    @@ -5286,7 +5397,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $rtl =  false

    -

    [line 735]

    +

    [line 745]



    Tags:

    @@ -5316,7 +5427,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $sign =  false

    -

    [line 1264]

    +

    [line 1274]

    If true enables document signing



    Tags:

    @@ -5343,7 +5454,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $signature_appearance = array('page' => 1, 'rect' => '0 0 0 0')

    -

    [line 1285]

    +

    [line 1295]

    data for signature appearance



    Tags:

    @@ -5370,7 +5481,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $signature_data = array()

    -

    [line 1271]

    +

    [line 1281]

    Signature data



    Tags:

    @@ -5397,7 +5508,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $signature_max_length =  11742

    -

    [line 1278]

    +

    [line 1288]

    Signature max length



    Tags:

    @@ -5424,7 +5535,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $sig_annot_ref =  '***SIGANNREF*** 0 R'

    -

    [line 1320]

    +

    [line 1330]

    Placemark used during signature process.



    Tags:

    @@ -5451,7 +5562,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $sig_obj_id =  0

    -

    [line 1306]

    +

    [line 1316]

    Signature object ID



    Tags:

    @@ -5478,7 +5589,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $spot_colors = array()

    -

    [line 1031]

    +

    [line 1041]

    Array of Spot colors



    Tags:

    @@ -5505,7 +5616,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $start_transaction_page =  0

    -

    [line 1404]

    +

    [line 1414]

    Store page number when startTransaction() is called.



    Tags:

    @@ -5532,7 +5643,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $start_transaction_y =  0

    -

    [line 1411]

    +

    [line 1421]

    Store Y position when startTransaction() is called.



    Tags:

    @@ -5559,7 +5670,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $state =

    -

    [line 207]

    +

    [line 209]



    Tags:

    @@ -5586,7 +5697,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $strokecolor =

    -

    [line 1481]

    +

    [line 1491]



    Tags:

    @@ -5616,7 +5727,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $subject =  ''

    -

    [line 485]

    +

    [line 495]



    Tags:

    @@ -5640,7 +5751,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgclipid =  0

    -

    [line 1606]

    +

    [line 1630]



    Tags:

    @@ -5670,7 +5781,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgclipmode =  false

    -

    [line 1585]

    +

    [line 1609]



    Tags:

    @@ -5700,7 +5811,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgclippaths = array()

    -

    [line 1592]

    +

    [line 1616]



    Tags:

    @@ -5730,7 +5841,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgcliptm = array()

    -

    [line 1599]

    +

    [line 1623]



    Tags:

    @@ -5760,7 +5871,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgdefs = array()

    -

    [line 1578]

    +

    [line 1602]



    Tags:

    @@ -5790,7 +5901,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgdefsmode =  false

    -

    [line 1571]

    +

    [line 1595]



    Tags:

    @@ -5820,7 +5931,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgdir =  ''

    -

    [line 1543]

    +

    [line 1567]



    Tags:

    @@ -5850,7 +5961,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svggradientid =  0

    -

    [line 1564]

    +

    [line 1588]



    Tags:

    @@ -5880,7 +5991,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svggradients = array()

    -

    [line 1557]

    +

    [line 1581]



    Tags:

    @@ -5910,7 +6021,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode')

    -

    [line 1627]

    +

    [line 1651]



    Tags:

    @@ -6003,7 +6114,7 @@ This is a PHP class for generating PDF documents without requiring external exte          'writing-mode' => 'lr-tb',
             'text-color' => 'black',
             'transfmatrix' => array(1, 0, 0, 1, 0, 0))) -

    [line 1634]

    +

    [line 1658]



    Tags:

    @@ -6033,7 +6144,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgtext =  ''

    -

    [line 1613]

    +

    [line 1637]



    Tags:

    @@ -6063,7 +6174,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgtextmode = array()

    -

    [line 1620]

    +

    [line 1644]



    Tags:

    @@ -6093,7 +6204,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $svgunit =  'px'

    -

    [line 1550]

    +

    [line 1574]



    Tags:

    @@ -6123,7 +6234,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $tagvspaces = array()

    -

    [line 1080]

    +

    [line 1090]

    Array used for custom vertical spaces for HTML tags



    Tags:

    @@ -6150,7 +6261,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $tempfontsize =  10

    -

    [line 708]

    +

    [line 718]



    Tags:

    @@ -6177,7 +6288,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $TextColor =

    -

    [line 437]

    +

    [line 447]



    Tags:

    @@ -6204,7 +6315,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $textindent =  0

    -

    [line 1397]

    +

    [line 1407]

    Text indentation value (used for text-indent CSS attribute)



    Tags:

    @@ -6231,7 +6342,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $textrendermode =  0

    -

    [line 1467]

    +

    [line 1477]

    Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping.



    Tags:

    @@ -6258,7 +6369,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $textstrokewidth =  0

    -

    [line 1474]

    +

    [line 1484]

    Text stroke width in doc units



    Tags:

    @@ -6285,7 +6396,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $thead =  ''

    -

    [line 1229]

    +

    [line 1239]

    Table header content to be repeated on each new page



    Tags:

    @@ -6312,7 +6423,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $theadMargins = array()

    -

    [line 1236]

    +

    [line 1246]

    Margins used for table header.



    Tags:

    @@ -6339,7 +6450,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $title =  ''

    -

    [line 479]

    +

    [line 489]



    Tags:

    @@ -6363,7 +6474,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $tMargin =

    -

    [line 279]

    +

    [line 281]



    Tags:

    @@ -6390,7 +6501,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $tmprtl =  false

    -

    [line 742]

    +

    [line 752]



    Tags:

    @@ -6420,7 +6531,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $tocpage =  false

    -

    [line 1494]

    +

    [line 1504]



    Tags:

    @@ -6447,7 +6558,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $transfmatrix = array()

    -

    [line 1052]

    +

    [line 1062]

    Array of transformation matrix



    Tags:

    @@ -6474,7 +6585,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $transfmatrix_key =  0

    -

    [line 1059]

    +

    [line 1069]

    Current key for transformation matrix



    Tags:

    @@ -6501,7 +6612,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $transfmrk = array()

    -

    [line 1117]

    +

    [line 1127]

    Array used to store positions of graphics transformation blocks inside the page buffer.

    keys are the page numbers




    Tags:

    @@ -6528,7 +6639,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $underline =

    -

    [line 395]

    +

    [line 405]



    Tags:

    @@ -6555,7 +6666,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $ur = array()

    -

    [line 831]

    +

    [line 841]

    Array with additional document-wide usage rights for the document.



    Tags:

    @@ -6582,7 +6693,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $viewer_preferences =

    -

    [line 908]

    +

    [line 918]

    PDF viewer preferences.



    Tags:

    @@ -6609,7 +6720,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $visibility =  'all'

    -

    [line 866]

    +

    [line 876]

    Restrict the rendering of some elements to screen or printout.



    Tags:

    @@ -6636,7 +6747,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $w =

    -

    [line 261]

    +

    [line 263]



    Tags:

    @@ -6663,7 +6774,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $wPt =

    -

    [line 249]

    +

    [line 251]



    Tags:

    @@ -6690,7 +6801,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $x =

    -

    [line 303]

    +

    [line 313]



    Tags:

    @@ -6717,7 +6828,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $xobjects = array()

    -

    [line 1522]

    +

    [line 1532]



    Tags:

    @@ -6747,7 +6858,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $xobjid =  ''

    -

    [line 1536]

    +

    [line 1546]



    Tags:

    @@ -6777,7 +6888,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $y =

    -

    [line 309]

    +

    [line 319]



    Tags:

    @@ -6804,7 +6915,7 @@ This is a PHP class for generating PDF documents without requiring external exte

    $ZoomMode =

    -

    [line 467]

    +

    [line 477]



    Tags:

    @@ -6837,7 +6948,7 @@ This is a PHP class for generating PDF documents without requiring external exte
    -

    constructor __construct [line 1716]

    +

    constructor __construct [line 1740]

    @@ -6906,7 +7017,7 @@ $diskcache = false])
    -

    destructor __destruct [line 1849]

    +

    destructor __destruct [line 1876]

    @@ -6934,7 +7045,7 @@ $diskcache = false])
    -

    method AcceptPageBreak [line 4943]

    +

    method AcceptPageBreak [line 5160]

    @@ -6965,7 +7076,7 @@ $diskcache = false])
    -

    method addExtGState [line 14896]

    +

    method addExtGState [line 15261]

    @@ -7013,7 +7124,7 @@ $params)
    -

    method AddFont [line 4397]

    +

    method AddFont [line 4603]

    @@ -7076,7 +7187,7 @@ $subset = 'default'])
    -

    method addHtmlLink [line 10921]

    +

    method addHtmlLink [line 11270]

    @@ -7151,7 +7262,7 @@ $firstblock = false])
    -

    method addHTMLTOC [line 21737]

    +

    method addHTMLTOC [line 22530]

    @@ -7214,7 +7325,7 @@ $correct_align = true])
    -

    method addHTMLVertSpace [line 20190]

    +

    method addHTMLVertSpace [line 20962]

    - + @@ -7274,7 +7385,7 @@ $lasttag = false])
    -

    method addJavascriptObject [line 13492]

    +

    method addJavascriptObject [line 13857]

    @@ -7256,7 +7367,7 @@ $lasttag = false])
    boolean   $cell  if true add the default cMargin space to each new line (default false).if true add the default left (or right if RTL) padding to each new line (default false).
    boolean  
    @@ -7325,7 +7436,7 @@ $onload = false])
    -

    method AddLink [line 4739]

    +

    method AddLink [line 4956]

    @@ -7356,7 +7467,7 @@ $onload = false])
    -

    method AddPage [line 3535]

    +

    method AddPage [line 3718]

    @@ -7416,7 +7527,7 @@ $tocpage = false])
    -

    method AddSpotColor [line 4006]

    +

    method AddSpotColor [line 4189]

    @@ -7482,7 +7593,7 @@ $k)
    -

    method addTOC [line 21565]

    +

    method addTOC [line 22358]

    @@ -7545,7 +7656,7 @@ $toc_name = 'TOC'])
    -

    method addTOCPage [line 3510]

    +

    method addTOCPage [line 3693]

    @@ -7597,9 +7708,51 @@ $keepmargins = false])
    [ Top ]
    +
    + +

    method adjustCellPadding [line 3303]

    +
    +
    +
    + array adjustCellPadding( +[mixed +$brd = 0]) +
    +

    + + Adjust the internal Cell padding array to take account of the line width.



    +

    Tags:

    +
    + + + + + + + + + + +
    return:  of adjustments
    since:  5.9.000 (2010-10-03)
    access:  protected
    +
    +

    + + +

    Parameters:

    +
    + + + + + + +
    mixed  $brd  Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
    +

    +
    [ Top ]
    +

    -

    method AliasNbPages [line 14710]

    +

    method AliasNbPages [line 15075]

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

    method AliasNumPage [line 14737]

    +

    method AliasNumPage [line 15102]

    @@ -7683,7 +7836,7 @@ $alias = '{pnb}'])
    -

    method Annotation [line 4795]

    +

    method Annotation [line 5012]

    @@ -7758,7 +7911,7 @@ $spaces = 0])
    -

    method Arrow [line 12696]

    +

    method Arrow [line 13061]

    @@ -7836,7 +7989,7 @@ $arm_angle = 15])
    -

    method arrUTF8ToUTF16BE [line 10816]

    +

    method arrUTF8ToUTF16BE [line 11165]

    @@ -7911,7 +8064,7 @@ $setbom = true])
    -

    method Bookmark [line 13364]

    +

    method Bookmark [line 13729]

    @@ -7971,7 +8124,7 @@ $page = ''])
    -

    method Button [line 14368]

    +

    method Button [line 14733]

    @@ -8067,7 +8220,7 @@ $js = false])
    -

    method Cell [line 5050]

    +

    method Cell [line 5267]

    @@ -8175,7 +8328,7 @@ $valign = 'M'])
    -

    method CheckBox [line 14300]

    +

    method CheckBox [line 14665]

    @@ -8265,7 +8418,7 @@ $js = false])
    -

    method checkPageBreak [line 4970]

    +

    method checkPageBreak [line 5187]

    @@ -8319,7 +8472,7 @@ $addpage = true])
    -

    method Circle [line 12384]

    +

    method Circle [line 12749]

    @@ -8418,7 +8571,7 @@ $angend:)
    -

    method Clip [line 15357]

    +

    method Clip [line 15722]

    @@ -8478,7 +8631,7 @@ $h)
    -

    method Close [line 3388]

    +

    method Close [line 3571]

    @@ -8509,7 +8662,7 @@ $h)
    -

    method closeHTMLTagHandler [line 19689]

    +

    method closeHTMLTagHandler [line 20444]

    - + @@ -8569,7 +8722,7 @@ $dom)
    -

    method colorRegistrationBar [line 15032]

    +

    method colorRegistrationBar [line 15397]

    @@ -8551,7 +8704,7 @@ $dom)
    boolean   $cell  if true add the default cMargin space to each new line (default false).if true add the default left (or right if RTL) padding to each new line (default false).
    int  
    @@ -8647,7 +8800,7 @@ $colors = 'A,R,G,B,C,M,Y,K'])
    -

    method ComboBox [line 14243]

    +

    method ComboBox [line 14608]

    @@ -8737,7 +8890,7 @@ $js = false])
    -

    method commitTransaction [line 21861]

    +

    method commitTransaction [line 22654]

    @@ -8765,7 +8918,7 @@ $js = false])
    -

    method convertHexStringToString [line 11545]

    +

    method convertHexStringToString [line 11894]

    @@ -8807,7 +8960,7 @@ $bs)
    -

    method convertHTMLColorToDec [line 10954]

    +

    method convertHTMLColorToDec [line 11303]

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

    method convertStringToHexString [line 11567]

    +

    method convertStringToHexString [line 11916]

    @@ -8891,7 +9044,7 @@ $s)
    -

    method convertSVGtMatrix [line 23161]

    +

    method convertSVGtMatrix [line 24000]

    @@ -8933,7 +9086,7 @@ $tm)
    -

    method CoonsPatchMesh [line 15272]

    +

    method CoonsPatchMesh [line 15637]

    @@ -9041,7 +9194,7 @@ $antialias = false])
    -

    method copyPage [line 21495]

    +

    method copyPage [line 22288]

    @@ -9083,7 +9236,7 @@ $page = 0])
    -

    method cropMark [line 15130]

    +

    method cropMark [line 15495]

    @@ -9155,7 +9308,7 @@ $color = array(0,0,0)])
    -

    method Curve [line 12190]

    +

    method Curve [line 12555]

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

    method deletePage [line 21352]

    +

    method deletePage [line 22145]

    @@ -9299,7 +9452,7 @@ $page)
    -

    method drawHTMLTagBorder [line 20232]

    +

    method drawHTMLTagBorder [line 21004]

    @@ -9344,7 +9497,7 @@ $xmax)
    -

    method Ellipse [line 12254]

    +

    method Ellipse [line 12619]

    @@ -9464,7 +9617,7 @@ $afinish:)
    -

    method empty_string [line 21915]

    +

    method empty_string [line 22708]

    @@ -9506,7 +9659,7 @@ $str)
    -

    method endPage [line 3559]

    +

    method endPage [line 3742]

    @@ -9548,7 +9701,7 @@ $tocpage = false])
    -

    method endSVGElementHandler [line 24256]

    +

    method endSVGElementHandler [line 25111]

    @@ -9596,7 +9749,7 @@ $name)
    -

    method endTemplate [line 22594]

    +

    method endTemplate [line 23389]

    @@ -9633,7 +9786,7 @@ $name)
    -

    method endTOCPage [line 3520]

    +

    method endTOCPage [line 3703]

    @@ -9664,7 +9817,7 @@ $name)
    -

    method Error [line 3360]

    +

    method Error [line 3543]

    @@ -9703,7 +9856,7 @@ $msg)
    -

    method extractCSSproperties [line 16649]

    +

    method extractCSSproperties [line 17038]

    @@ -9748,7 +9901,7 @@ $cssdata)
    -

    method fitBlock [line 6618]

    +

    method fitBlock [line 6946]

    @@ -9835,7 +9988,7 @@ $y)
    -

    method Footer [line 3809]

    +

    method Footer [line 3992]

    @@ -9860,7 +10013,7 @@ $y)
    -

    method formatPageNumber [line 14814]

    +

    method formatPageNumber [line 15179]

    @@ -9899,7 +10052,7 @@ $num)
    -

    method formatTOCPageNumber [line 14826]

    +

    method formatTOCPageNumber [line 15191]

    @@ -9941,7 +10094,7 @@ $num)
    -

    method GetAbsX [line 7354]

    +

    method GetAbsX [line 7703]

    @@ -9972,7 +10125,7 @@ $num)
    -

    method getAliasNbPages [line 14722]

    +

    method getAliasNbPages [line 15087]

    @@ -10003,7 +10156,7 @@ $num)
    -

    method getAliasNumPage [line 14750]

    +

    method getAliasNumPage [line 15115]

    @@ -10034,7 +10187,7 @@ $num)
    -

    method getAnnotOptFromJSProp [line 13617]

    +

    method getAnnotOptFromJSProp [line 13982]

    @@ -10079,7 +10232,7 @@ $prop)
    -

    method GetArrStringWidth [line 4299]

    +

    method GetArrStringWidth [line 4482]

    @@ -10148,7 +10301,7 @@ $getarray = false])
    -

    method getBarcode [line 15996]

    +

    method getBarcode [line 16361]

    @@ -10176,7 +10329,7 @@ $getarray = false])
    -

    method getBorderMode [line 5928]

    +

    method getBorderMode [line 6245]

    @@ -10224,7 +10377,7 @@ $position = 'start'])
    -

    method getBorderStartPosition [line 20216]

    +

    method getBorderStartPosition [line 20988]

    @@ -10255,7 +10408,7 @@ $position = 'start'])
    -

    method getBreakMargin [line 3085]

    +

    method getBreakMargin [line 3121]

    @@ -10303,7 +10456,7 @@ $pagenum = ''])
    -

    method getBuffer [line 21028]

    +

    method getBuffer [line 21821]

    @@ -10334,7 +10487,7 @@ $pagenum = ''])
    -

    method getCellBorder [line 5455]

    +

    method getCellBorder [line 5728]

    @@ -10409,7 +10562,7 @@ $mode)
    -

    method getCellCode [line 5081]

    +

    method getCellCode [line 5303]

    @@ -10520,7 +10673,7 @@ $valign = 'M'])
    -

    method getCellHeightRatio [line 14992]

    +

    method getCellHeightRatio [line 15357]

    @@ -10547,18 +10700,87 @@ $valign = 'M'])
    [ Top ]

    - -

    method GetCharWidth [line 4335]

    + +

    method getCellMargins [line 3292]

    - int GetCharWidth( -int -$char) + array getCellMargins( +)

    - Returns the length of the char in user unit for the current font.



    + Get the internal Cell margin array.



    +

    Tags:

    +
    + + + + + + + + + + + + + +
    return:  of margin values
    see:  TCPDF::setCellMargins()
    since:  5.9.000 (2010-10-03)
    access:  public
    +
    +

    + + +
    [ Top ]
    +
    +
    + +

    method getCellPaddings [line 3256]

    +
    +
    +
    + array getCellPaddings( +) +
    +

    + + Get the internal Cell padding array.



    +

    Tags:

    +
    + + + + + + + + + + + + + +
    return:  of padding values
    see:  TCPDF::setCellPaddings(), TCPDF::SetCellPadding()
    since:  5.9.000 (2010-10-03)
    access:  public
    +
    +

    + + +
    [ Top ]
    +
    +
    + +

    method GetCharWidth [line 4519]

    +
    +
    +
    + float GetCharWidth( +int +$char, [boolean +$notlast = true]) +
    +

    + + Returns the length of the char in user unit for the current font considering current stretching and kerning.



    Tags:

    @@ -10586,6 +10808,11 @@ $char) + + + + +
    int   $char   The char code whose length is to be returned
    boolean  $notlast  set to false for the latest character on string, true otherwise (default)

    @@ -10593,7 +10820,7 @@ $char)

    -

    method getColumn [line 22066]

    +

    method getColumn [line 22859]

    @@ -10624,7 +10851,7 @@ $char)
    -

    method getCSSBorderDashStyle [line 16949]

    +

    method getCSSBorderDashStyle [line 17338]

    @@ -10666,7 +10893,7 @@ $style)
    -

    method getCSSBorderStyle [line 16985]

    +

    method getCSSBorderStyle [line 17374]

    @@ -10708,7 +10935,7 @@ $cssborder)
    -

    method getCSSBorderWidth [line 16929]

    +

    method getCSSBorderWidth [line 17318]

    @@ -10748,9 +10975,195 @@ $width)
    [ Top ]
    +
    + +

    method getCSSFontSpacing [line 17531]

    +
    +
    +
    + float getCSSFontSpacing( +string +$spacing, [float +$parent = 0]) +
    +

    + + Returns the letter-spacing value from CSS value



    +

    Tags:

    +
    + + + + + + + + + + +
    return:  quantity to increases or decreases the space between characters in a text.
    since:  5.9.000 (2010-10-02)
    access:  protected
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + +
    string  $spacing  letter-spacing value
    float  $parent  kerning value of the parent element
    +

    +
    [ Top ]
    +
    +
    + +

    method getCSSFontStretching [line 17562]

    +
    +
    +
    + float getCSSFontStretching( +string +$stretch, [float +$parent = 100]) +
    +

    + + Returns the percentage of font stretching from CSS value



    +

    Tags:

    +
    + + + + + + + + + + +
    return:  font stretching percentage
    since:  5.9.000 (2010-10-02)
    access:  protected
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + +
    string  $stretch  stretch mode
    float  $parent  stretch value of the parent element
    +

    +
    [ Top ]
    +
    +
    + +

    method getCSSMargin [line 17477]

    +
    +
    +
    + void getCSSMargin( +string +$cssmargin, [float +$width = 0]) +
    +

    + + Get the internal Cell margin from CSS attribute.



    +

    Tags:

    +
    + + + + + + + +
    since:  5.9.000 (2010-10-04)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + +
    string  $cssmargin  margin properties
    float  $width  width of the containing element
    +

    +
    [ Top ]
    +
    +
    + +

    method getCSSPadding [line 17424]

    +
    +
    +
    + void getCSSPadding( +string +$csspadding, [float +$width = 0]) +
    +

    + + Get the internal Cell padding from CSS attribute.



    +

    Tags:

    +
    + + + + + + + +
    since:  5.9.000 (2010-10-04)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + +
    string  $csspadding  padding properties
    float  $width  width of the containing element
    +

    +
    [ Top ]
    +

    -

    method getEncPermissionsString [line 11584]

    +

    method getEncPermissionsString [line 11933]

    @@ -10792,7 +11205,7 @@ $protection)
    -

    method getFontAscent [line 4709]

    +

    method getFontAscent [line 4928]

    @@ -10849,7 +11262,7 @@ $size = 0])
    -

    method getFontBuffer [line 21192]

    +

    method getFontBuffer [line 21985]

    @@ -10891,7 +11304,7 @@ $font)
    -

    method getFontDescent [line 4686]

    +

    method getFontDescent [line 4907]

    @@ -10948,7 +11361,7 @@ $size = 0])
    -

    method getFontFamily [line 16627]

    +

    method getFontFamily [line 17016]

    @@ -10979,7 +11392,7 @@ $size = 0])
    -

    method getFontFamilyName [line 22496]

    +

    method getFontFamilyName [line 23289]

    @@ -11024,7 +11437,7 @@ $fontfamily)
    -

    method getFontSize [line 16607]

    +

    method getFontSize [line 16996]

    @@ -11055,7 +11468,7 @@ $fontfamily)
    -

    method getFontSizePt [line 16617]

    +

    method getFontSizePt [line 17006]

    @@ -11086,7 +11499,7 @@ $fontfamily)
    -

    method getFontsList [line 4374]

    +

    method getFontsList [line 4580]

    @@ -11110,11 +11523,79 @@ $fontfamily)

    +
    [ Top ]
    + +
    + +

    method getFontSpacing [line 23573]

    +
    +
    +
    + int getFontSpacing( +) +
    +

    + + Get the amount to increase or decrease the space between characters in a text.



    +

    Tags:

    +
    + + + + + + + + + + + + + +
    return:  kerning value
    author:  Nicola Asuni
    since:  5.9.000 (2010-09-29)
    access:  public
    +
    +

    + + +
    [ Top ]
    +
    +
    + +

    method getFontStretching [line 23551]

    +
    +
    +
    + float getFontStretching( +) +
    +

    + + Get the percentage of character stretching.



    +

    Tags:

    +
    + + + + + + + + + + + + + +
    return:  stretching value
    author:  Nicola Asuni
    since:  5.9.000 (2010-09-29)
    access:  public
    +
    +

    + +
    [ Top ]

    -

    method getFontStyle [line 16637]

    +

    method getFontStyle [line 17026]

    @@ -11145,7 +11626,7 @@ $fontfamily)
    -

    method getFontSubsetting [line 22432]

    +

    method getFontSubsetting [line 23225]

    @@ -11179,7 +11660,7 @@ $fontfamily)
    -

    method getFooterFont [line 10879]

    +

    method getFooterFont [line 11228]

    @@ -11207,7 +11688,7 @@ $fontfamily)
    -

    method getFooterMargin [line 3723]

    +

    method getFooterMargin [line 3906]

    @@ -11235,7 +11716,7 @@ $fontfamily)
    -

    method getFormDefaultProp [line 13992]

    +

    method getFormDefaultProp [line 14357]

    @@ -11269,7 +11750,7 @@ $fontfamily)
    -

    method getGDgamma [line 7294]

    +

    method getGDgamma [line 7639]

    @@ -11308,7 +11789,7 @@ $v)
    -

    method getGraphicVars [line 20825]

    +

    method getGraphicVars [line 21612]

    @@ -11339,7 +11820,7 @@ $v)
    -

    method getGroupPageNo [line 14763]

    +

    method getGroupPageNo [line 15128]

    @@ -11370,7 +11851,7 @@ $v)
    -

    method getGroupPageNoFormatted [line 14773]

    +

    method getGroupPageNoFormatted [line 15138]

    @@ -11401,7 +11882,7 @@ $v)
    -

    method getHeaderData [line 3678]

    +

    method getHeaderData [line 3861]

    @@ -11429,7 +11910,7 @@ $v)
    -

    method getHeaderFont [line 10859]

    +

    method getHeaderFont [line 11208]

    @@ -11457,7 +11938,7 @@ $v)
    -

    method getHeaderMargin [line 3703]

    +

    method getHeaderMargin [line 3886]

    @@ -11485,7 +11966,7 @@ $v)
    -

    method getHtmlDomArray [line 17036]

    +

    method getHtmlDomArray [line 17632]

    @@ -11495,7 +11976,7 @@ $html)

    - Returns the HTML DOM array.

    • $dom[$key]['tag'] = true if tag, false otherwise;
    • $dom[$key]['value'] = tag name or text;
    • $dom[$key]['opening'] = true if opening tag, false otherwise;
    • $dom[$key]['attribute'] = array of attributes (attribute name is the key);
    • $dom[$key]['style'] = array of style attributes (attribute name is the key);
    • $dom[$key]['parent'] = id of parent element;
    • $dom[$key]['fontname'] = font family name;
    • $dom[$key]['fontstyle'] = font style;
    • $dom[$key]['fontsize'] = font size in points;
    • $dom[$key]['bgcolor'] = RGB array of background color;
    • $dom[$key]['fgcolor'] = RGB array of foreground color;
    • $dom[$key]['width'] = width in pixels;
    • $dom[$key]['height'] = height in pixels;
    • $dom[$key]['align'] = text alignment;
    • $dom[$key]['cols'] = number of colums in table;
    • $dom[$key]['rows'] = number of rows in table;




    + Returns the HTML DOM array.



    Tags:

    @@ -11524,7 +12005,7 @@ $html)
    -

    method getHTMLUnitToUnits [line 20536]

    +

    method getHTMLUnitToUnits [line 21323]

    @@ -11590,7 +12071,7 @@ $point)
    -

    method getHyphenPatternsFromTEX [line 22232]

    +

    method getHyphenPatternsFromTEX [line 23025]

    @@ -11635,7 +12116,7 @@ $file)
    -

    method getImageBuffer [line 21130]

    +

    method getImageBuffer [line 21923]

    @@ -11677,7 +12158,7 @@ $image)
    -

    method getImageFileType [line 6588]

    +

    method getImageFileType [line 6916]

    @@ -11725,7 +12206,7 @@ $iminfo = array()])
    -

    method getImageRBX [line 3749]

    +

    method getImageRBX [line 3932]

    @@ -11750,7 +12231,7 @@ $iminfo = array()])
    -

    method getImageRBY [line 3758]

    +

    method getImageRBY [line 3941]

    @@ -11775,7 +12256,7 @@ $iminfo = array()])
    -

    method getImageScale [line 3024]

    +

    method getImageScale [line 3060]

    @@ -11809,7 +12290,7 @@ $iminfo = array()])
    -

    method getLastH [line 3002]

    +

    method getLastH [line 3038]

    @@ -11840,7 +12321,7 @@ $iminfo = array()])
    -

    method GetLineWidth [line 11930]

    +

    method GetLineWidth [line 12295]

    @@ -11874,7 +12355,7 @@ $iminfo = array()])
    -

    method getMargins [line 16570]

    +

    method getMargins [line 16955]

    @@ -11905,7 +12386,7 @@ $iminfo = array()])
    -

    method getNumberOfColumns [line 22076]

    +

    method getNumberOfColumns [line 22869]

    @@ -11936,7 +12417,7 @@ $iminfo = array()])
    -

    method GetNumChars [line 4362]

    +

    method GetNumChars [line 4568]

    @@ -11978,7 +12459,7 @@ $s)
    -

    method getNumLines [line 6006]

    +

    method getNumLines [line 6323]

    @@ -11988,12 +12469,12 @@ $txt, [float $w = 0], [boolean $reseth = false], [boolean $autopadding = true], [float -$cellMargin = ''], [float -$lineWidth = '']) +$cellpadding = ''], [mixed +$border = 0])

    - This method return the estimated number of lines for print a simple text string in Multicell() method.



    + This method return the estimated number of lines for print a simple text string using Multicell() method.



    Tags:

    @@ -12039,13 +12520,13 @@ $lineWidth = '']) - - + + - - - + + +
    float  $cellMargin  Internal cell margin, if empty or <= 0, extended up to current pdf cell margin (default '').$cellpadding  Internal cell padding, if empty uses default cell padding.
    float  $lineWidth  Line width, if empty or <= 0, extended up to current pdf line width (default '').mixed  $border  Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))

    @@ -12053,7 +12534,7 @@ $lineWidth = ''])

    -

    method getNumPages [line 3498]

    +

    method getNumPages [line 3681]

    @@ -12087,7 +12568,7 @@ $lineWidth = ''])
    -

    method getObjFilename [line 20942]

    +

    method getObjFilename [line 21735]

    @@ -12132,7 +12613,7 @@ $prefix)
    -

    method getOriginalMargins [line 16593]

    +

    method getOriginalMargins [line 16982]

    @@ -12163,7 +12644,7 @@ $prefix)
    -

    method getPage [line 3487]

    +

    method getPage [line 3670]

    @@ -12197,7 +12678,7 @@ $prefix)
    -

    method getPageBuffer [line 21071]

    +

    method getPageBuffer [line 21864]

    @@ -12239,7 +12720,7 @@ $page)
    -

    method getPageDimensions [line 3037]

    +

    method getPageDimensions [line 3073]

    @@ -12284,7 +12765,7 @@ $pagenum = ''])
    -

    method getPageGroupAlias [line 14785]

    +

    method getPageGroupAlias [line 15150]

    @@ -12315,7 +12796,7 @@ $pagenum = ''])
    -

    method getPageHeight [line 3069]

    +

    method getPageHeight [line 3105]

    @@ -12363,7 +12844,7 @@ $pagenum = ''])
    -

    method getPageNumGroupAlias [line 14800]

    +

    method getPageNumGroupAlias [line 15165]

    @@ -12394,7 +12875,7 @@ $pagenum = ''])
    -

    method getPageSizeFromFormat [line 2215]

    +

    method getPageSizeFromFormat [line 2242]

    @@ -12436,7 +12917,7 @@ $format)
    -

    method getPageWidth [line 3053]

    +

    method getPageWidth [line 3089]

    @@ -12484,7 +12965,7 @@ $pagenum = ''])
    -

    method getPathPaintOperator [line 22344]

    +

    method getPathPaintOperator [line 23137]

    @@ -12538,7 +13019,7 @@ $mode)
    -

    method getPDFData [line 10902]

    +

    method getPDFData [line 11251]

    @@ -12561,9 +13042,54 @@ $mode)
    [ Top ]
    +
    + +

    method getRawCharWidth [line 4541]

    +
    +
    +
    + float getRawCharWidth( +int +$char) +
    +

    + + Returns the length of the char in user unit for the current font.



    +

    Tags:

    +
    + + + + + + + + + + + + + +
    return:  char width
    author:  Nicola Asuni
    since:  5.9.000 (2010-09-28)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + +
    int  $char  The char code whose length is to be returned
    +

    +
    [ Top ]
    +

    -

    method getRemainingWidth [line 6489]

    +

    method getRemainingWidth [line 6817]

    @@ -12591,7 +13117,7 @@ $mode)
    -

    method getRTL [line 2937]

    +

    method getRTL [line 2964]

    @@ -12619,7 +13145,7 @@ $mode)
    -

    method getScaleFactor [line 3099]

    +

    method getScaleFactor [line 3135]

    @@ -12653,7 +13179,7 @@ $mode)
    -

    method getSpaceString [line 17758]

    +

    method getSpaceString [line 18390]

    - - + + - - - + + +
    @@ -12684,7 +13210,7 @@ $mode)
    -

    method getStringHeight [line 6107]

    +

    method getStringHeight [line 6422]

    @@ -12694,8 +13220,8 @@ $w, string $txt, [boolean $reseth = false], [boolean $autopadding = true], [float -$cellMargin = ''], [float -$lineWidth = '']) +$cellpadding = ''], [mixed +$border = 0])

    @@ -12773,13 +13299,13 @@ $lineWidth = ''])
    float  $cellMargin  Internal cell margin, if empty or <= 0, extended up to current pdf cell margin (default '').$cellpadding  Internal cell padding, if empty uses default cell padding.
    float  $lineWidth  Line width, if empty or <= 0, extended up to current pdf line width (default '').mixed  $border  Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))

    @@ -12787,7 +13313,7 @@ $lineWidth = ''])
    -

    method GetStringWidth [line 4283]

    +

    method GetStringWidth [line 4466]

    @@ -12856,7 +13382,7 @@ $getarray = false])
    -

    method getSVGTransformMatrix [line 23047]

    +

    method getSVGTransformMatrix [line 23886]

    @@ -12901,7 +13427,7 @@ $attribute)
    -

    method getTagStyleFromCSS [line 16901]

    +

    method getTagStyleFromCSS [line 17290]

    @@ -12955,7 +13481,7 @@ $css)
    -

    method getTransformationMatrixProduct [line 23143]

    +

    method getTransformationMatrixProduct [line 23982]

    @@ -13006,7 +13532,7 @@ $tb)
    -

    method getUserPermissionCode [line 11424]

    +

    method getUserPermissionCode [line 11773]

    @@ -13054,7 +13580,7 @@ $mode = 0])
    -

    method getVectorsAngle [line 23775]

    +

    method getVectorsAngle [line 24630]

    @@ -13114,7 +13640,7 @@ $y2)
    -

    method GetX [line 7338]

    +

    method GetX [line 7687]

    @@ -13145,7 +13671,7 @@ $y2)
    -

    method GetY [line 7365]

    +

    method GetY [line 7714]

    @@ -13176,7 +13702,7 @@ $y2)
    -

    method get_mqr [line 7010]

    +

    method get_mqr [line 7338]

    @@ -13207,7 +13733,7 @@ $y2)
    -

    method Gradient [line 15381]

    +

    method Gradient [line 15746]

    @@ -13273,7 +13799,7 @@ $antialias = false])
    -

    method Header [line 3767]

    +

    method Header [line 3950]

    @@ -13298,7 +13824,7 @@ $antialias = false])
    -

    method hyphenateText [line 22271]

    +

    method hyphenateText [line 23064]

    @@ -13379,7 +13905,7 @@ $charmax = 8])
    -

    method hyphenateWord [line 22162]

    +

    method hyphenateWord [line 22955]

    @@ -13460,7 +13986,7 @@ $charmax = 8])
    -

    method Image [line 6695]

    +

    method Image [line 7023]

    @@ -13598,7 +14124,7 @@ $fitonpage = false])
    -

    method ImageEps [line 15729]

    +

    method ImageEps [line 16094]

    @@ -13700,7 +14226,7 @@ $fitonpage = false])
    -

    method ImagePngAlpha [line 7250]

    +

    method ImagePngAlpha [line 7578]

    @@ -13727,7 +14253,7 @@ $palign)
    - + @@ -13817,7 +14343,7 @@ $palign)
    -

    method ImageSVG [line 22759]

    +

    method ImageSVG [line 23598]

    author:  Valentin Schmidt, Nicola Asuniauthor:  Nicola Asuni
    see:  TCPDF::Image()
    @@ -13913,7 +14439,7 @@ $fitonpage = false])
    -

    method IncludeJS [line 13479]

    +

    method IncludeJS [line 13844]

    @@ -13955,7 +14481,7 @@ $script)
    -

    method intToRoman [line 20615]

    +

    method intToRoman [line 21402]

    @@ -13997,7 +14523,7 @@ $number)
    -

    method isRTLTextDir [line 2981]

    +

    method isRTLTextDir [line 3008]

    @@ -14025,7 +14551,7 @@ $number)
    -

    method isUnicodeFont [line 22484]

    +

    method isUnicodeFont [line 23277]

    @@ -14059,7 +14585,7 @@ $number)
    -

    method isValidCSSSelectorForTag [line 16741]

    +

    method isValidCSSSelectorForTag [line 17130]

    @@ -14113,7 +14639,7 @@ $selector)
    -

    method lastPage [line 3476]

    +

    method lastPage [line 3659]

    @@ -14155,7 +14681,7 @@ $resetmargins = false])
    -

    method Line [line 12107]

    +

    method Line [line 12472]

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

    method LinearGradient [line 15231]

    +

    method LinearGradient [line 15596]

    @@ -14299,7 +14825,7 @@ $coords = array(0,0,1,0)])
    -

    method Link [line 4778]

    +

    method Link [line 4995]

    @@ -14371,7 +14897,7 @@ $spaces = 0])
    -

    method ListBox [line 14187]

    +

    method ListBox [line 14552]

    @@ -14461,7 +14987,7 @@ $js = false])
    -

    method Ln [line 7307]

    +

    method Ln [line 7652]

    - +
    @@ -14501,7 +15027,7 @@ $cell = false])
    boolean   $cell  if true add a cMargin to the x coordinateif true add the current left (or right o for RTL) padding to the X coordinate

    @@ -14509,7 +15035,7 @@ $cell = false])
    -

    method MirrorH [line 11710]

    +

    method MirrorH [line 12069]

    @@ -14551,7 +15077,7 @@ $x = ''])
    -

    method MirrorL [line 11746]

    +

    method MirrorL [line 12105]

    @@ -14605,7 +15131,7 @@ $y = ''])
    -

    method MirrorP [line 11733]

    +

    method MirrorP [line 12092]

    @@ -14653,7 +15179,7 @@ $y = ''])
    -

    method MirrorV [line 11721]

    +

    method MirrorV [line 12080]

    @@ -14695,7 +15221,7 @@ $y = ''])
    -

    method movePage [line 21209]

    +

    method movePage [line 22002]

    @@ -14743,7 +15269,7 @@ $topage)
    -

    method MultiCell [line 5658]

    +

    method MultiCell [line 5931]

    @@ -14881,7 +15407,7 @@ $fitcell = false])
    -

    method objclone [line 21904]

    +

    method objclone [line 22697]

    @@ -14923,7 +15449,7 @@ $object)
    -

    method Open [line 3375]

    +

    method Open [line 3558]

    @@ -14954,7 +15480,7 @@ $object)
    -

    method openHTMLTagHandler [line 19088]

    +

    method openHTMLTagHandler [line 19842]

    - + @@ -15008,7 +15534,7 @@ $dom)
    -

    method Output [line 7457]

    +

    method Output [line 7806]

    @@ -14995,7 +15521,7 @@ $dom)
    boolean   $cell  if true add the default cMargin space to each new line (default false).if true add the default left (or right if RTL) padding to each new line (default false).
      
    @@ -15056,7 +15582,7 @@ $dest = 'I'])
    -

    method PageNo [line 3990]

    +

    method PageNo [line 4173]

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

    method PageNoFormatted [line 14836]

    +

    method PageNoFormatted [line 15201]

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

    method PieSector [line 15668]

    +

    method PieSector [line 16033]

    @@ -15217,7 +15743,7 @@ $o:)
    -

    method PieSectorXY [line 15689]

    +

    method PieSectorXY [line 16054]

    @@ -15325,7 +15851,7 @@ $o:)
    -

    method pixelsToUnits [line 11021]

    +

    method pixelsToUnits [line 11370]

    @@ -15367,7 +15893,7 @@ $px)
    -

    method Polycurve [line 12217]

    +

    method Polycurve [line 12582]

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

    method Polygon [line 12422]

    +

    method Polygon [line 12787]

    @@ -15502,7 +16028,7 @@ $closed = true])
    -

    method PolyLine [line 12403]

    +

    method PolyLine [line 12768]

    @@ -15565,7 +16091,7 @@ $closed)
    -

    method printTemplate [line 22623]

    +

    method printTemplate [line 23418]

    @@ -15652,7 +16178,7 @@ $fitonpage = false])
    -

    method putHtmlListBullet [line 20680]

    +

    method putHtmlListBullet [line 21467]

    @@ -15703,7 +16229,7 @@ $size = 10])
    -

    method RadialGradient [line 15249]

    +

    method RadialGradient [line 15614]

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

    method RadioButton [line 14097]

    +

    method RadioButton [line 14462]

    @@ -15871,7 +16397,7 @@ $js = false])
    -

    method readDiskCache [line 20982]

    +

    method readDiskCache [line 21775]

    @@ -15919,7 +16445,7 @@ $file)
    -

    method Rect [line 12135]

    +

    method Rect [line 12500]

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

    method registrationMark [line 15200]

    +

    method registrationMark [line 15565]

    @@ -16069,7 +16595,7 @@ $colb = array(255,255,255)])
    -

    method RegularPolygon [line 12520]

    +

    method RegularPolygon [line 12885]

    @@ -16180,7 +16706,7 @@ $r:)
    -

    method removeSHY [line 5023]

    +

    method removeSHY [line 5240]

    @@ -16222,7 +16748,7 @@ $txt = ''])
    -

    method replaceBuffer [line 21010]

    +

    method replaceBuffer [line 21803]

    @@ -16259,9 +16785,37 @@ $data)
    [ Top ]
    +
    + +

    method resetLastH [line 3028]

    +
    +
    +
    + void resetLastH( +) +
    +

    + + Reset the last cell height.



    +

    Tags:

    +
    + + + + + + + +
    since:  5.9.000 (2010-10-03)
    access:  public
    +
    +

    + + +
    [ Top ]
    +

    -

    method revstrpos [line 21928]

    +

    method revstrpos [line 22721]

    @@ -16315,7 +16869,7 @@ $offset = 0])
    -

    method rfread [line 7218]

    +

    method rfread [line 7546]

    @@ -16366,7 +16920,7 @@ $length)
    -

    method rollbackTransaction [line 21875]

    +

    method rollbackTransaction [line 22668]

    @@ -16408,7 +16962,7 @@ $self = false])
    -

    method Rotate [line 11803]

    +

    method Rotate [line 12162]

    @@ -16462,7 +17016,7 @@ $y = ''])
    -

    method RoundedRect [line 12610]

    +

    method RoundedRect [line 12975]

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

    method RoundedRectXY [line 12629]

    +

    method RoundedRectXY [line 12994]

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

    method Scale [line 11677]

    +

    method Scale [line 12036]

    @@ -16702,7 +17256,7 @@ $y = ''])
    -

    method ScaleX [line 11637]

    +

    method ScaleX [line 11996]

    @@ -16756,7 +17310,7 @@ $y = ''])
    -

    method ScaleXY [line 11663]

    +

    method ScaleXY [line 12022]

    @@ -16810,7 +17364,7 @@ $y = ''])
    -

    method ScaleY [line 11650]

    +

    method ScaleY [line 12009]

    @@ -16864,7 +17418,7 @@ $y = ''])
    -

    method segSVGContentHandler [line 24325]

    +

    method segSVGContentHandler [line 25180]

    @@ -16912,7 +17466,7 @@ $data)
    -

    method selectColumn [line 21991]

    +

    method selectColumn [line 22784]

    @@ -16951,7 +17505,7 @@ $col = ''])
    -

    method serializeTCPDFtagParameters [line 22087]

    +

    method serializeTCPDFtagParameters [line 22880]

    @@ -16993,7 +17547,7 @@ $pararray)
    -

    method setAlpha [line 14949]

    +

    method setAlpha [line 15314]

    @@ -17038,7 +17592,7 @@ $bm = 'Normal'])
    -

    method SetAuthor [line 3324]

    +

    method SetAuthor [line 3507]

    @@ -17080,7 +17634,7 @@ $author)
    -

    method SetAutoPageBreak [line 3191]

    +

    method SetAutoPageBreak [line 3374]

    @@ -17128,7 +17682,7 @@ $margin = 0])
    -

    method setBarcode [line 15986]

    +

    method setBarcode [line 16351]

    @@ -17164,7 +17718,7 @@ $bc = ''])
    -

    method SetBooklet [line 20450]

    +

    method SetBooklet [line 21237]

    @@ -17215,7 +17769,7 @@ $outer = -1])
    -

    method setBuffer [line 20992]

    +

    method setBuffer [line 21785]

    @@ -17254,7 +17808,7 @@ $data)
    -

    method setCellHeightRatio [line 14983]

    +

    method setCellHeightRatio [line 15348]

    @@ -17291,9 +17845,69 @@ $h)
    [ Top ]
    +
    + +

    method setCellMargins [line 3270]

    +
    +
    +
    + void setCellMargins( +[float +$left = ''], [float +$top = ''], [float +$right = ''], [float +$bottom = '']) +
    +

    + + Set the internal Cell margins.



    +

    Tags:

    +
    + + + + + + + + + + +
    see:  TCPDF::getCellMargins()
    since:  5.9.000 (2010-10-03)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + + + + + + + + + + + +
    float  $left  left margin
    float  $top  top margin
    float  $right  right margin
    float  $bottom  bottom margin
    +

    +
    [ Top ]
    +

    -

    method SetCellPadding [line 3179]

    +

    method SetCellPadding [line 3215]

    @@ -17303,12 +17917,12 @@ $pad)

    - Set the internal Cell padding.



    + Set the same internal Cell padding for top, right, bottom, left-



    Tags:

    - + @@ -17333,9 +17947,69 @@ $pad)
    [ Top ]
    +
    + +

    method setCellPaddings [line 3234]

    +
    +
    see:  TCPDF::Cell(), TCPDF::SetLeftMargin(), TCPDF::SetTopMargin(), TCPDF::SetAutoPageBreak(), TCPDF::SetMargins()see:  TCPDF::getCellPaddings(), TCPDF::setCellPaddings()
    since:  2.1.000 (2008-01-09)
    +
    + void setCellPaddings( +[float +$left = ''], [float +$top = ''], [float +$right = ''], [float +$bottom = '']) +
    +

    + + Set the internal Cell paddings.



    +

    Tags:

    +
    + + + + + + + + + + +
    see:  TCPDF::getCellPaddings(), TCPDF::SetCellPadding()
    since:  5.9.000 (2010-10-03)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + + + + + + + + + + + + + + + + +
    float  $left  left padding
    float  $top  top padding
    float  $right  right padding
    float  $bottom  bottom padding
    +

    +
    [ Top ]
    +

    -

    method setColumnsArray [line 21978]

    +

    method setColumnsArray [line 22771]

    @@ -17374,7 +18048,7 @@ $columns)
    -

    method SetCompression [line 3284]

    +

    method SetCompression [line 3467]

    @@ -17413,7 +18087,7 @@ $compress)
    -

    method setContentMark [line 3645]

    +

    method setContentMark [line 3828]

    @@ -17452,7 +18126,7 @@ $page = 0])
    -

    method SetCreator [line 3348]

    +

    method SetCreator [line 3531]

    @@ -17494,7 +18168,7 @@ $creator)
    -

    method SetDefaultMonospacedFont [line 4728]

    +

    method SetDefaultMonospacedFont [line 4945]

    @@ -17533,7 +18207,7 @@ $font)
    -

    method setDefaultTableColumns [line 14973]

    +

    method setDefaultTableColumns [line 15338]

    @@ -17572,7 +18246,7 @@ $cols = 4])
    -

    method SetDisplayMode [line 3206]

    +

    method SetDisplayMode [line 3389]

    @@ -17623,7 +18297,7 @@ $mode = 'UseNone'])
    -

    method SetDrawColor [line 4050]

    +

    method SetDrawColor [line 4233]

    @@ -17692,7 +18366,7 @@ $ret = false])
    -

    method SetDrawColorArray [line 4024]

    +

    method SetDrawColorArray [line 4207]

    @@ -17743,7 +18417,7 @@ $ret = false])
    -

    method SetDrawSpotColor [line 4095]

    +

    method SetDrawSpotColor [line 4278]

    @@ -17791,7 +18465,7 @@ $tint = 100])
    -

    method setEqualColumns [line 21945]

    +

    method setEqualColumns [line 22738]

    @@ -17842,7 +18516,7 @@ $y = ''])
    -

    method setExtGState [line 14915]

    +

    method setExtGState [line 15280]

    @@ -17881,7 +18555,7 @@ $gs)
    -

    method SetFillColor [line 4137]

    +

    method SetFillColor [line 4320]

    @@ -17941,7 +18615,7 @@ $col4 = -1])
    -

    method SetFillColorArray [line 4114]

    +

    method SetFillColorArray [line 4297]

    @@ -17983,7 +18657,7 @@ $color)
    -

    method SetFillSpotColor [line 4179]

    +

    method SetFillSpotColor [line 4362]

    @@ -18031,7 +18705,7 @@ $tint = 100])
    -

    method SetFont [line 4636]

    +

    method SetFont [line 4842]

    @@ -18100,7 +18774,7 @@ $subset = 'default'])
    -

    method setFontBuffer [line 21146]

    +

    method setFontBuffer [line 21939]

    @@ -18145,7 +18819,7 @@ $data)
    -

    method SetFontSize [line 4657]

    +

    method SetFontSize [line 4863]

    @@ -18191,9 +18865,93 @@ $out = true])
    [ Top ]
    +
    + +

    method setFontSpacing [line 23562]

    +
    +
    +
    + void setFontSpacing( +[float +$spacing = 0]) +
    +

    + + Set the amount to increase or decrease the space between characters in a text.



    +

    Tags:

    +
    + + + + + + + + + + +
    author:  Nicola Asuni
    since:  5.9.000 (2010-09-29)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + +
    float  $spacing  amount to increase or decrease the space between characters in a text (0 = default spacing)
    +

    +
    [ Top ]
    +
    +
    + +

    method setFontStretching [line 23540]

    +
    +
    +
    + void setFontStretching( +[int +$perc = 100]) +
    +

    + + Set the percentage of character stretching.



    +

    Tags:

    +
    + + + + + + + + + + +
    author:  Nicola Asuni
    since:  5.9.000 (2010-09-29)
    access:  public
    +
    +

    + + +

    Parameters:

    +
    + + + + + + +
    int  $perc  percentage of stretching (100 = no stretching)
    +

    +
    [ Top ]
    +

    -

    method setFontSubBuffer [line 21172]

    +

    method setFontSubBuffer [line 21965]

    @@ -18244,7 +19002,7 @@ $data)
    -

    method setFontSubsetting [line 22421]

    +

    method setFontSubsetting [line 23214]

    @@ -18286,7 +19044,7 @@ $enable = true])
    -

    method setFooter [line 3893]

    +

    method setFooter [line 4076]

    @@ -18314,7 +19072,7 @@ $enable = true])
    -

    method setFooterFont [line 10869]

    +

    method setFooterFont [line 11218]

    @@ -18353,7 +19111,7 @@ $font)
    -

    method setFooterMargin [line 3713]

    +

    method setFooterMargin [line 3896]

    @@ -18389,7 +19147,7 @@ $fm = 10])
    -

    method setFormDefaultProp [line 13981]

    +

    method setFormDefaultProp [line 14346]

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

    method setGraphicVars [line 20882]

    +

    method setGraphicVars [line 21672]

    @@ -18476,7 +19234,7 @@ $extended = false])
    -

    method setHeader [line 3856]

    +

    method setHeader [line 4039]

    @@ -18504,7 +19262,7 @@ $extended = false])
    -

    method setHeaderData [line 3664]

    +

    method setHeaderData [line 3847]

    @@ -18558,7 +19316,7 @@ $hs = ''])
    -

    method setHeaderFont [line 10849]

    +

    method setHeaderFont [line 11198]

    @@ -18597,7 +19355,7 @@ $font)
    -

    method setHeaderMargin [line 3693]

    +

    method setHeaderMargin [line 3876]

    @@ -18633,7 +19391,7 @@ $hm = 10])
    -

    method setHtmlLinksStyle [line 20521]

    +

    method setHtmlLinksStyle [line 21308]

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

    method setHtmlVSpace [line 20490]

    +

    method setHtmlVSpace [line 21277]

    @@ -18717,7 +19475,7 @@ $tagvs)
    -

    method setImageBuffer [line 21087]

    +

    method setImageBuffer [line 21880]

    @@ -18762,7 +19520,7 @@ $data)
    -

    method setImageScale [line 3013]

    +

    method setImageScale [line 3049]

    @@ -18804,7 +19562,7 @@ $scale)
    -

    method setImageSubBuffer [line 21110]

    +

    method setImageSubBuffer [line 21903]

    @@ -18855,7 +19613,7 @@ $data)
    -

    method setJPEGQuality [line 14960]

    +

    method setJPEGQuality [line 15325]

    @@ -18894,7 +19652,7 @@ $quality)
    -

    method SetKeywords [line 3336]

    +

    method SetKeywords [line 3519]

    @@ -18936,7 +19694,7 @@ $keywords)
    -

    method setLanguageArray [line 10889]

    +

    method setLanguageArray [line 11238]

    @@ -18975,7 +19733,7 @@ $language)
    -

    method setLastH [line 2992]

    +

    method setLastH [line 3019]

    @@ -19017,7 +19775,7 @@ $h)
    -

    method SetLeftMargin [line 3135]

    +

    method SetLeftMargin [line 3171]

    @@ -19059,7 +19817,7 @@ $margin)
    -

    method SetLineStyle [line 11957]

    +

    method SetLineStyle [line 12322]

    @@ -19114,7 +19872,7 @@ $ret = false])
    -

    method SetLineWidth [line 11914]

    +

    method SetLineWidth [line 12279]

    @@ -19156,7 +19914,7 @@ $width)
    -

    method SetLink [line 4755]

    +

    method SetLink [line 4972]

    @@ -19210,7 +19968,7 @@ $page = -1])
    -

    method setListIndentWidth [line 20500]

    +

    method setListIndentWidth [line 21287]

    @@ -19249,7 +20007,7 @@ $width)
    -

    method setLIsymbol [line 20411]

    +

    method setLIsymbol [line 21198]

    @@ -19288,7 +20046,7 @@ $symbol = '!'])
    -

    method SetMargins [line 3113]

    +

    method SetMargins [line 3149]

    @@ -19348,7 +20106,7 @@ $keepmargins = false])
    -

    method setOpenCell [line 20510]

    +

    method setOpenCell [line 21297]

    @@ -19387,7 +20145,7 @@ $isopen)
    -

    method setPage [line 3429]

    +

    method setPage [line 3612]

    @@ -19435,7 +20193,7 @@ $resetmargins = false])
    -

    method setPageBoxes [line 2742]

    +

    method setPageBoxes [line 2769]

    @@ -19510,7 +20268,7 @@ $points = false])
    -

    method setPageBuffer [line 21044]

    +

    method setPageBuffer [line 21837]

    @@ -19561,7 +20319,7 @@ $append = false])
    -

    method setPageFormat [line 2624]

    +

    method setPageFormat [line 2651]

    @@ -19609,7 +20367,7 @@ $orientation = 'P'])
    -

    method setPageMark [line 3632]

    +

    method setPageMark [line 3815]

    @@ -19637,7 +20395,7 @@ $orientation = 'P'])
    -

    method setPageOrientation [line 2791]

    +

    method setPageOrientation [line 2818]

    @@ -19688,7 +20446,7 @@ $bottommargin = ''])
    -

    method setPageUnit [line 1864]

    +

    method setPageUnit [line 1891]

    @@ -19727,7 +20485,7 @@ $unit)
    -

    method setPDFVersion [line 15002]

    +

    method setPDFVersion [line 15367]

    @@ -19766,7 +20524,7 @@ $version = '1.7'])
    -

    method setPrintFooter [line 3740]

    +

    method setPrintFooter [line 3923]

    @@ -19808,7 +20566,7 @@ $value)
    -

    method setPrintHeader [line 3731]

    +

    method setPrintHeader [line 3914]

    @@ -19844,7 +20602,7 @@ $val = true])
    -

    method SetProtection [line 11468]

    +

    method SetProtection [line 11817]

    @@ -19910,7 +20668,7 @@ $pubkeys = null])
    -

    method setRasterizeVectorImages [line 22318]

    +

    method setRasterizeVectorImages [line 23111]

    @@ -19949,7 +20707,7 @@ $mode)
    -

    method SetRightMargin [line 3165]

    +

    method SetRightMargin [line 3201]

    @@ -19991,7 +20749,7 @@ $margin)
    -

    method setRTL [line 2921]

    +

    method setRTL [line 2948]

    @@ -20036,7 +20794,7 @@ $resetx = true])
    -

    method setSignature [line 14639]

    +

    method setSignature [line 15004]

    @@ -20108,7 +20866,7 @@ $info = array()])
    -

    method setSignatureAppearance [line 14675]

    +

    method setSignatureAppearance [line 15040]

    @@ -20174,7 +20932,7 @@ $page = -1])
    -

    method setSpacesRE [line 2896]

    +

    method setSpacesRE [line 2923]

    @@ -20219,7 +20977,7 @@ $re = '/[^\S\xa0]/'])
    -

    method SetSubject [line 3312]

    +

    method SetSubject [line 3495]

    @@ -20261,7 +21019,7 @@ $subject)
    -

    method setSVGStyles [line 23200]

    +

    method setSVGStyles [line 24039]

    @@ -20345,7 +21103,7 @@ $clip_params = array()])
    -

    method setTableHeader [line 3944]

    +

    method setTableHeader [line 4127]

    @@ -20373,7 +21131,7 @@ $clip_params = array()])
    -

    method setTempRTL [line 2947]

    +

    method setTempRTL [line 2974]

    @@ -20412,7 +21170,7 @@ $mode)
    -

    method SetTextColor [line 4221]

    +

    method SetTextColor [line 4404]

    @@ -20472,7 +21230,7 @@ $col4 = -1])
    -

    method SetTextColorArray [line 4198]

    +

    method SetTextColorArray [line 4381]

    @@ -20514,7 +21272,7 @@ $color)
    -

    method setTextRenderingMode [line 22099]

    +

    method setTextRenderingMode [line 22892]

    @@ -20565,7 +21323,7 @@ $clip = false])
    -

    method SetTextSpotColor [line 4260]

    +

    method SetTextSpotColor [line 4443]

    @@ -20613,7 +21371,7 @@ $tint = 100])
    -

    method SetTitle [line 3300]

    +

    method SetTitle [line 3483]

    @@ -20655,7 +21413,7 @@ $title)
    -

    method SetTopMargin [line 3150]

    +

    method SetTopMargin [line 3186]

    @@ -20697,7 +21455,7 @@ $margin)
    -

    method setUserRights [line 14603]

    +

    method setUserRights [line 14968]

    @@ -20775,7 +21533,7 @@ $formex = ''])
    -

    method setViewerPreferences [line 15015]

    +

    method setViewerPreferences [line 15380]

    @@ -20817,7 +21575,7 @@ $preferences)
    -

    method setVisibility [line 14860]

    +

    method setVisibility [line 15225]

    @@ -20856,7 +21614,7 @@ $v)
    -

    method SetX [line 7378]

    +

    method SetX [line 7727]

    @@ -20904,7 +21662,7 @@ $rtloff = false])
    -

    method SetXY [line 7442]

    +

    method SetXY [line 7791]

    @@ -20958,7 +21716,7 @@ $rtloff = false])
    -

    method SetY [line 7410]

    +

    method SetY [line 7759]

    @@ -21012,7 +21770,7 @@ $rtloff = false])
    -

    method set_mqr [line 6995]

    +

    method set_mqr [line 7323]

    @@ -21051,7 +21809,7 @@ $mqr)
    -

    method Skew [line 11860]

    +

    method Skew [line 12219]

    @@ -21111,7 +21869,7 @@ $y = ''])
    -

    method SkewX [line 11833]

    +

    method SkewX [line 12192]

    @@ -21165,7 +21923,7 @@ $y = ''])
    -

    method SkewY [line 11846]

    +

    method SkewY [line 12205]

    @@ -21219,7 +21977,7 @@ $y = ''])
    -

    method StarPolygon [line 12568]

    +

    method StarPolygon [line 12933]

    @@ -21343,7 +22101,7 @@ $draw_circle:)
    -

    method startPage [line 3586]

    +

    method startPage [line 3769]

    @@ -21397,7 +22155,7 @@ $tocpage = false])
    -

    method startPageGroup [line 14695]

    +

    method startPageGroup [line 15060]

    @@ -21436,7 +22194,7 @@ $page = ''])
    -

    method startSVGElementHandler [line 23799]

    +

    method startSVGElementHandler [line 24654]

    @@ -21496,7 +22254,7 @@ $ctm = array()])
    -

    method startTemplate [line 22538]

    +

    method startTemplate [line 23331]

    @@ -21550,7 +22308,7 @@ $h = 0])
    -

    method startTransaction [line 21844]

    +

    method startTransaction [line 22637]

    @@ -21578,7 +22336,7 @@ $h = 0])
    -

    method StartTransform [line 11605]

    +

    method StartTransform [line 11954]

    @@ -21609,7 +22367,7 @@ $h = 0])
    -

    method StopTransform [line 11620]

    +

    method StopTransform [line 11974]

    @@ -21640,7 +22398,7 @@ $h = 0])
    -

    method stringLeftTrim [line 22445]

    +

    method stringLeftTrim [line 23238]

    @@ -21691,7 +22449,7 @@ $replace = ''])
    -

    method stringRightTrim [line 22458]

    +

    method stringRightTrim [line 23251]

    @@ -21742,7 +22500,7 @@ $replace = ''])
    -

    method stringTrim [line 22471]

    +

    method stringTrim [line 23264]

    @@ -21793,7 +22551,7 @@ $replace = ''])
    -

    method SVGPath [line 23455]

    +

    method SVGPath [line 24310]

    @@ -21844,7 +22602,7 @@ $style = ''])
    -

    method SVGTransform [line 23181]

    +

    method SVGTransform [line 24020]

    @@ -21883,7 +22641,7 @@ $tm)
    -

    method swapMargins [line 20466]

    +

    method swapMargins [line 21253]

    @@ -21922,7 +22680,7 @@ $reverse = true])
    -

    method swapPageBoxCoordinates [line 2768]

    +

    method swapPageBoxCoordinates [line 2795]

    @@ -21961,7 +22719,7 @@ $page)
    -

    method Text [line 4923]

    +

    method Text [line 5140]

    @@ -22093,7 +22851,7 @@ $rtloff = false])
    -

    method TextField [line 14010]

    +

    method TextField [line 14375]

    @@ -22177,7 +22935,7 @@ $js = false])
    -

    method Transform [line 11891]

    +

    method Transform [line 12250]

    @@ -22219,7 +22977,7 @@ $tm)
    -

    method Translate [line 11781]

    +

    method Translate [line 12140]

    @@ -22267,7 +23025,7 @@ $t_y)
    -

    method TranslateX [line 11758]

    +

    method TranslateX [line 12117]

    @@ -22309,7 +23067,7 @@ $t_x)
    -

    method TranslateY [line 11769]

    +

    method TranslateY [line 12128]

    @@ -22351,7 +23109,7 @@ $t_y)
    -

    method unhtmlentities [line 11032]

    +

    method unhtmlentities [line 11381]

    @@ -22390,7 +23148,7 @@ $text_to_convert)
    -

    method UniArrSubString [line 6528]

    +

    method UniArrSubString [line 6856]

    @@ -22444,7 +23202,7 @@ $end = ''])
    -

    method unichr [line 6561]

    +

    method unichr [line 6889]

    @@ -22489,7 +23247,7 @@ $c)
    -

    method UTF8ArrayToUniArray [line 6549]

    +

    method UTF8ArrayToUniArray [line 6877]

    @@ -22531,7 +23289,7 @@ $ta)
    -

    method UTF8ArrSubString [line 6505]

    +

    method UTF8ArrSubString [line 6833]

    @@ -22582,7 +23340,7 @@ $end = ''])
    -

    method UTF8ArrToLatin1 [line 10757]

    +

    method UTF8ArrToLatin1 [line 11106]

    @@ -22624,7 +23382,7 @@ $unicode)
    -

    method utf8Bidi [line 12790]

    +

    method utf8Bidi [line 13155]

    @@ -22681,7 +23439,7 @@ $forcertl = false])
    -

    method utf8StrArrRev [line 12776]

    +

    method utf8StrArrRev [line 13141]

    @@ -22741,7 +23499,7 @@ $forcertl = false])
    -

    method UTF8StringToArray [line 10592]

    +

    method UTF8StringToArray [line 10941]

    @@ -22807,7 +23565,7 @@ $str)
    -

    method utf8StrRev [line 12761]

    +

    method utf8StrRev [line 13126]

    @@ -22861,7 +23619,7 @@ $forcertl = false])
    -

    method UTF8ToLatin1 [line 10727]

    +

    method UTF8ToLatin1 [line 11076]

    @@ -22903,7 +23661,7 @@ $str)
    -

    method UTF8ToUTF16BE [line 10711]

    +

    method UTF8ToUTF16BE [line 11060]

    + + + + +
    @@ -22954,7 +23712,7 @@ $setbom = true])
    -

    method Write [line 6148]

    +

    method Write [line 6459]

    @@ -22970,7 +23728,8 @@ $stretch = 0], [boolean $firstline = false], [boolean $firstblock = false], [float $maxh = 0], [float -$wadj = 0]) +$wadj = 0], [array +$margin = ''])

    @@ -23049,6 +23808,11 @@ $wadj = 0])
    float   $wadj   first line width will be reduced by this amount (used in HTML mode).
    array  $margin  margin array of the parent container

    @@ -23056,7 +23820,7 @@ $wadj = 0])
    -

    method write1DBarcode [line 16017]

    +

    method write1DBarcode [line 16393]

    @@ -23146,7 +23910,7 @@ $align = ''])
    -

    method write2DBarcode [line 16353]

    +

    method write2DBarcode [line 16734]

    @@ -23236,7 +24000,7 @@ $distort = false])
    -

    method writeBarcode [line 16298]

    +

    method writeBarcode [line 16679]

    @@ -23326,7 +24090,7 @@ $code)
    -

    method writeDiskCache [line 20954]

    +

    method writeDiskCache [line 21747]

    @@ -23383,7 +24147,7 @@ $file)
    -

    method writeHTML [line 17802]

    +

    method writeHTML [line 18434]

    - + @@ -23449,7 +24213,7 @@ $align = ''])
    -

    method writeHTMLCell [line 17786]

    +

    method writeHTMLCell [line 18418]

    @@ -23436,7 +24200,7 @@ $align = ''])
    boolean   $cell  if true add the default cMargin space to each Write (default false).if true add the current left (or right for RTL) padding to each Write (default false).
    string  
    @@ -23551,7 +24315,7 @@ $autopadding = true])
    -

    method _addfield [line 13582]

    +

    method _addfield [line 13947]

    @@ -23629,7 +24393,7 @@ $prop)
    -

    method _AES [line 11256]

    +

    method _AES [line 11605]

    @@ -23680,7 +24444,7 @@ $text)
    -

    method _beginpage [line 10258]

    +

    method _beginpage [line 10607]

    @@ -23725,7 +24489,7 @@ $format = ''])
    -

    method _datastring [line 10439]

    +

    method _datastring [line 10788]

    @@ -23770,7 +24534,7 @@ $n = 0])
    -

    method _datestring [line 10454]

    +

    method _datestring [line 10803]

    @@ -23812,7 +24576,7 @@ $n = 0])
    -

    method _destroy [line 7651]

    +

    method _destroy [line 8000]

    @@ -23857,7 +24621,7 @@ $preserve_objcopy = false])
    -

    method _dochecks [line 7679]

    +

    method _dochecks [line 8028]

    @@ -23882,7 +24646,7 @@ $preserve_objcopy = false])
    -

    method _dolinethrough [line 10365]

    +

    method _dolinethrough [line 10714]

    @@ -23930,7 +24694,7 @@ $txt)
    -

    method _dolinethroughw [line 10378]

    +

    method _dolinethroughw [line 10727]

    @@ -23987,7 +24751,7 @@ $txt)
    -

    method _dooverline [line 10391]

    +

    method _dooverline [line 10740]

    @@ -24038,7 +24802,7 @@ $txt)
    -

    method _dooverlinew [line 10404]

    +

    method _dooverlinew [line 10753]

    @@ -24089,7 +24853,7 @@ $w)
    -

    method _dounderline [line 10340]

    +

    method _dounderline [line 10689]

    @@ -24137,7 +24901,7 @@ $txt)
    -

    method _dounderlinew [line 10353]

    +

    method _dounderlinew [line 10702]

    @@ -24188,7 +24952,7 @@ $w)
    -

    method _encrypt_data [line 11065]

    +

    method _encrypt_data [line 11414]

    @@ -24236,7 +25000,7 @@ $s)
    -

    method _enddoc [line 10186]

    +

    method _enddoc [line 10535]

    @@ -24261,7 +25025,7 @@ $s)
    -

    method _endpage [line 10302]

    +

    method _endpage [line 10651]

    @@ -24286,7 +25050,7 @@ $s)
    -

    method _escape [line 10427]

    +

    method _escape [line 10776]

    @@ -24325,7 +25089,7 @@ $s)
    -

    method _escapetext [line 10482]

    +

    method _escapetext [line 10831]

    @@ -24367,7 +25131,7 @@ $s)
    -

    method _freadint [line 10416]

    +

    method _freadint [line 10765]

    @@ -24406,7 +25170,7 @@ $f)
    -

    method _generateencryptionkey [line 11343]

    +

    method _generateencryptionkey [line 11692]

    @@ -24460,7 +25224,7 @@ $protection)
    -

    method _getannotsrefs [line 7927]

    +

    method _getannotsrefs [line 8276]

    @@ -24502,7 +25266,7 @@ $n)
    -

    method _getBYTE [line 8661]

    +

    method _getBYTE [line 9010]

    @@ -24565,7 +25329,7 @@ $offset)
    -

    method _getfontpath [line 7695]

    +

    method _getfontpath [line 8044]

    @@ -24590,7 +25354,7 @@ $offset)
    -

    method _getobj [line 10324]

    +

    method _getobj [line 10673]

    @@ -24632,7 +25396,7 @@ $objid = ''])
    -

    method _getrawstream [line 10502]

    +

    method _getrawstream [line 10851]

    @@ -24680,7 +25444,7 @@ $n = 0])
    -

    method _getSHORT [line 8646]

    +

    method _getSHORT [line 8995]

    @@ -24743,7 +25507,7 @@ $offset)
    -

    method _getstream [line 10517]

    +

    method _getstream [line 10866]

    @@ -24788,7 +25552,7 @@ $n = 0])
    -

    method _getTrueTypeFontSubset [line 8676]

    +

    method _getTrueTypeFontSubset [line 9025]

    @@ -24839,7 +25603,7 @@ $subsetchars)
    -

    method _getTTFtableChecksum [line 9007]

    +

    method _getTTFtableChecksum [line 9356]

    @@ -24890,7 +25654,7 @@ $length)
    -

    method _getULONG [line 8616]

    +

    method _getULONG [line 8965]

    @@ -24953,7 +25717,7 @@ $offset)
    -

    method _getUSHORT [line 8631]

    +

    method _getUSHORT [line 8980]

    @@ -25016,7 +25780,7 @@ $offset)
    -

    method _getxobjectdict [line 9872]

    +

    method _getxobjectdict [line 10221]

    @@ -25047,7 +25811,7 @@ $offset)
    -

    method _JScolor [line 13558]

    +

    method _JScolor [line 13923]

    @@ -25089,7 +25853,7 @@ $color)
    -

    method _md5_16 [line 11274]

    +

    method _md5_16 [line 11623]

    @@ -25134,7 +25898,7 @@ $str)
    -

    method _newobj [line 10312]

    +

    method _newobj [line 10661]

    @@ -25162,7 +25926,7 @@ $str)
    -

    method _objectkey [line 11046]

    +

    method _objectkey [line 11395]

    @@ -25204,7 +25968,7 @@ $n)
    -

    method _out [line 10537]

    +

    method _out [line 10886]

    @@ -25240,7 +26004,7 @@ $s)
    -

    method _outCurve [line 12062]

    +

    method _outCurve [line 12427]

    @@ -25309,7 +26073,7 @@ $y3)
    -

    method _outCurveV [line 12076]

    +

    method _outCurveV [line 12441]

    @@ -25366,7 +26130,7 @@ $y3)
    -

    method _outCurveY [line 12092]

    +

    method _outCurveY [line 12457]

    @@ -25435,7 +26199,7 @@ $y2)
    -

    method _outellipticalarc [line 12288]

    +

    method _outellipticalarc [line 12653]

    @@ -25543,7 +26307,7 @@ $angf:)
    -

    method _outLine [line 12032]

    +

    method _outLine [line 12397]

    @@ -25588,7 +26352,7 @@ $y)
    -

    method _outPoint [line 12020]

    +

    method _outPoint [line 12385]

    @@ -25633,7 +26397,7 @@ $y)
    -

    method _outRect [line 12046]

    +

    method _outRect [line 12411]

    @@ -25696,7 +26460,7 @@ $op)
    -

    method _Ovalue [line 11287]

    +

    method _Ovalue [line 11636]

    @@ -25747,7 +26511,7 @@ $owner_pass)
    -

    method _parsejpeg [line 7087]

    +

    method _parsejpeg [line 7415]

    @@ -25786,7 +26550,7 @@ $file)
    -

    method _parsepng [line 7113]

    +

    method _parsepng [line 7441]

    @@ -25825,7 +26589,7 @@ $file)
    -

    method _putannotsobjs [line 7963]

    +

    method _putannotsobjs [line 8312]

    @@ -25856,7 +26620,7 @@ $file)
    -

    method _putannotsrefs [line 7915]

    +

    method _putannotsrefs [line 8264]

    @@ -25901,7 +26665,7 @@ $n)
    -

    method _putAPXObject [line 8575]

    +

    method _putAPXObject [line 8924]

    @@ -25955,7 +26719,7 @@ $stream = ''])
    -

    method _putbookmarks [line 13395]

    +

    method _putbookmarks [line 13760]

    @@ -25986,7 +26750,7 @@ $stream = ''])
    -

    method _putcatalog [line 10011]

    +

    method _putcatalog [line 10360]

    @@ -26014,7 +26778,7 @@ $stream = ''])
    -

    method _putcidfont0 [line 9671]

    +

    method _putcidfont0 [line 10020]

    @@ -26056,7 +26820,7 @@ $font)
    -

    method _putEmbeddedFiles [line 4881]

    +

    method _putEmbeddedFiles [line 5098]

    @@ -26087,7 +26851,7 @@ $font)
    -

    method _putencryption [line 11089]

    +

    method _putencryption [line 11438]

    @@ -26118,7 +26882,7 @@ $font)
    -

    method _putextgstates [line 14925]

    +

    method _putextgstates [line 15290]

    @@ -26157,7 +26921,7 @@ $gs)
    -

    method _putfonts [line 9128]

    +

    method _putfonts [line 9477]

    @@ -26185,7 +26949,7 @@ $gs)
    -

    method _putfontwidths [line 9029]

    +

    method _putfontwidths [line 9378]

    @@ -26236,7 +27000,7 @@ $cidoffset = 0])
    -

    method _putheader [line 10178]

    +

    method _putheader [line 10527]

    @@ -26261,7 +27025,7 @@ $cidoffset = 0])
    -

    method _putimages [line 9741]

    +

    method _putimages [line 10090]

    @@ -26286,7 +27050,7 @@ $cidoffset = 0])
    -

    method _putinfo [line 9964]

    +

    method _putinfo [line 10313]

    @@ -26314,7 +27078,7 @@ $cidoffset = 0])
    -

    method _putjavascript [line 13504]

    +

    method _putjavascript [line 13869]

    @@ -26345,7 +27109,7 @@ $cidoffset = 0])
    -

    method _putocg [line 14845]

    +

    method _putocg [line 15210]

    @@ -26373,7 +27137,7 @@ $cidoffset = 0])
    -

    method _putpages [line 7706]

    +

    method _putpages [line 8055]

    @@ -26398,7 +27162,7 @@ $cidoffset = 0])
    -

    method _putresourcedict [line 9884]

    +

    method _putresourcedict [line 10233]

    @@ -26423,7 +27187,7 @@ $cidoffset = 0])
    -

    method _putresources [line 9942]

    +

    method _putresources [line 10291]

    @@ -26448,7 +27212,7 @@ $cidoffset = 0])
    -

    method _putshaders [line 15479]

    +

    method _putshaders [line 15844]

    @@ -26479,7 +27243,7 @@ $cidoffset = 0])
    -

    method _putsignature [line 14518]

    +

    method _putsignature [line 14883]

    @@ -26510,7 +27274,7 @@ $cidoffset = 0])
    -

    method _putspotcolors [line 9852]

    +

    method _putspotcolors [line 10201]

    @@ -26538,7 +27302,7 @@ $cidoffset = 0])
    -

    method _putstream [line 10528]

    +

    method _putstream [line 10877]

    @@ -26583,7 +27347,7 @@ $n = 0])
    -

    method _puttruetypeunicode [line 9284]

    +

    method _puttruetypeunicode [line 9633]

    diff --git a/examples/example_005.php b/examples/example_005.php index 6aebe62..3e494de 100755 --- a/examples/example_005.php +++ b/examples/example_005.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_005.php // Begin : 2008-03-04 -// Last Update : 2010-08-08 +// Last Update : 2010-10-04 // // Description : Example 005 for TCPDF class // Multicell @@ -75,6 +75,12 @@ $pdf->SetFont('times', '', 10); // add a page $pdf->AddPage(); +// set cell padding +$pdf->setCellPaddings(1, 1, 1, 1); + +// set cell margins +$pdf->setCellMargins(1, 1, 1, 1); + // set color for background $pdf->SetFillColor(255, 255, 127); @@ -102,6 +108,8 @@ $pdf->MultiCell(55, 40, '[VERTICAL ALIGNMENT - BOTTOM] '.$txt, 1, 'J', 1, 1, '', $pdf->Ln(4); +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // set color for background $pdf->SetFillColor(215, 235, 255); @@ -113,11 +121,32 @@ Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, // print a blox of text using multicell() $pdf->MultiCell(80, 5, $txt."\n", 1, 'J', 1, 1, '' ,'', true); +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +// AUTO-FITTING + // set color for background $pdf->SetFillColor(255, 235, 235); // Fit text on cell by reducing font size -$pdf->MultiCell(55, 60, '[FIT CELL] '.$txt."\n", 1, 'J', 1, 1, 125, 135, true, 0, false, true, 60, 'M', true); +$pdf->MultiCell(55, 60, '[FIT CELL] '.$txt."\n", 1, 'J', 1, 1, 125, 145, true, 0, false, true, 60, 'M', true); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +// CUSTOM PADDING + +// set color for background +$pdf->SetFillColor(255, 255, 215); + +// set font +$pdf->SetFont('helvetica', '', 8); + +// set cell padding +$pdf->setCellPaddings(2, 4, 6, 8); + +$txt = "CUSTOM PADDING:\nLeft=2, Top=4, Right=6, Bottom=8\nLorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue.\n"; + +$pdf->MultiCell(55, 5, $txt, 1, 'J', 1, 2, 125, 210, true); // move pointer to last page $pdf->lastPage(); diff --git a/examples/example_027.php b/examples/example_027.php index 7720912..857e1c6 100755 --- a/examples/example_027.php +++ b/examples/example_027.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_027.php // Begin : 2008-03-04 -// Last Update : 2010-08-23 +// Last Update : 2010-10-01 // // Description : Example 027 for TCPDF class // 1D Barcodes @@ -383,6 +383,7 @@ $style = array( 'fgcolor' => array(0,0,128), 'bgcolor' => array(255,255,128), 'text' => true, + 'label' => 'CUSTOM LABEL', 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4 diff --git a/examples/example_057.php b/examples/example_057.php index dc76d72..5467cc7 100644 --- a/examples/example_057.php +++ b/examples/example_057.php @@ -2,7 +2,7 @@ //============================================================+ // File name : example_057.php // Begin : 2010-04-03 -// Last Update : 2010-08-08 +// Last Update : 2010-10-04 // // Description : Example 057 for TCPDF class // Cell vertical alignments @@ -128,6 +128,33 @@ $pdf->Line(15, 120, 195, 120, $linestyle); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Print an image to explain cell measures + +$pdf->Image('../images/tcpdf_cell.png', 15, 160, 100, 0, 'PNG', '', '', false, 300, '', false, false, 0, false, false, false); +$legend = 'LEGEND: + +X: cell X origin (top-left, top-right for RTL) +Y: cell Y origin (top-left, top-right for RTL) +CW: cell width +CH: cell height +LW: line width +ML: margin left +MR: margin right +MT: margin top +MB: margin bottom +PL: padding left +PR: padding right +PT: padding top +PB: padding bottom +TW: text width +FA: font ascent +FD: font descent'; +$pdf->SetFont('helvetica', '', 10); +$pdf->setCellHeightRatio(1.25); +$pdf->MultiCell(0, 0, $legend, 0, 'L', false, 1, 125, 160, true, 0, false, true, 0, 'T', false); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // CELL BORDERS // add a page @@ -140,7 +167,7 @@ $pdf->Write(0, 'Example of borders for Cell()', '', 0, 'L', true, 0, false, fals $pdf->SetFont('helvetica', '', 11); // set border width -$pdf->SetLineWidth(1); +$pdf->SetLineWidth(0.508); // set color for cell border $pdf->SetDrawColor(0,128,255); @@ -148,6 +175,9 @@ $pdf->SetDrawColor(0,128,255); // set filling color $pdf->SetFillColor(255,255,128); +// set cell height ratio +$pdf->setCellHeightRatio(3); + $pdf->Cell(30, 0, '1', 1, 1, 'C', 1, '', 0, false, 'T', 'C'); $pdf->Ln(2); $pdf->Cell(30, 0, 'LTRB', 'LTRB', 1, 'C', 1, '', 0, false, 'T', 'C'); diff --git a/examples/index.php b/examples/index.php index 39144f8..2d0f8ea 100644 --- a/examples/index.php +++ b/examples/index.php @@ -8,7 +8,6 @@ echo '<'.'?'.'xml version="1.0" encoding="UTF-8"'.'?'.'>'; TCPDF Examples - @@ -81,6 +80,7 @@ echo '<'.'?'.'xml version="1.0" encoding="UTF-8"'.'?'.'>';
  • Advanced page settings: [PDF]
  • XHTML + CSS: [PDF]
  • XObject Templates: [PDF]
  • +
  • Text stretching and spacing (kerning): [PDF]
  • diff --git a/tcpdf.php b/tcpdf.php index 0f78bc8..11d434f 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ multiple columns mode; *
  • bookmarks and table of content;
  • *
  • text hyphenation;
  • + *
  • font stretching and spacing (kerning);
  • *
  • automatic page break, line break and text alignments including justification;
  • *
  • automatic page numbering and page groups;
  • *
  • move and delete pages;
  • @@ -130,7 +132,7 @@ * @copyright 2002-2010 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 5.8.034 + * @version 5.9.000 */ /** @@ -154,21 +156,21 @@ if (!class_exists('TCPDF', false)) { /** * define default PDF document producer */ - define('PDF_PRODUCER', 'TCPDF 5.8.034 (http://www.tcpdf.org)'); + define('PDF_PRODUCER', 'TCPDF 5.9.000 (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 5.8.034 + * @version 5.9.000 * @author Nicola Asuni - info@tecnick.com * @link http://www.tcpdf.org * @license http://www.gnu.org/copyleft/lesser.html LGPL */ class TCPDF { - // protected or Protected properties + // Protected properties /** * @var current page number @@ -291,10 +293,18 @@ if (!class_exists('TCPDF', false)) { protected $bMargin; /** - * @var cell internal padding + * @var array of cell internal paddings ('T' => top, 'R' => right, 'B' => bottom, 'L' => left) + * @since 5.9.000 (2010-10-03) * @access protected */ - public $cMargin; + protected $cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); + + /** + * @var array of cell margins ('T' => top, 'R' => right, 'B' => bottom, 'L' => left) + * @since 5.9.000 (2010-10-04) + * @access protected + */ + protected $cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); /** * @var current horizontal position in user unit for cell positioning @@ -1535,6 +1545,20 @@ if (!class_exists('TCPDF', false)) { */ protected $xobjid = ''; + /** + * @var percentage of character stretching + * @access protected + * @since 5.9.000 (2010-09-29) + */ + protected $font_stretching = 100; + + /** + * @var increases or decreases the space between characters in a text by the specified amount (kerning). + * @access protected + * @since 5.9.000 (2010-09-29) + */ + protected $font_spacing = 0; + /** * @var directory used for the last SVG image * @access protected @@ -1727,9 +1751,9 @@ if (!class_exists('TCPDF', false)) { // set language direction $this->rtl = false; $this->tmprtl = false; - //Some checks + // some checks $this->_dochecks(); - //Initialization of properties + // initialization of properties $this->isunicode = $unicode; $this->page = 0; $this->transfmrk[0] = array(); @@ -1759,7 +1783,7 @@ if (!class_exists('TCPDF', false)) { // encryption values $this->encrypted = false; $this->last_enc_key = ''; - //Standard Unicode fonts + // standard Unicode fonts $this->CoreFonts = array( 'courier'=>'Courier', 'courierB'=>'Courier-Bold', @@ -1776,28 +1800,31 @@ if (!class_exists('TCPDF', false)) { 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats' ); - //Set scale factor + // set scale factor $this->setPageUnit($unit); // set page format and orientation $this->setPageFormat($format, $orientation); - //Page margins (1 cm) + // page margins (1 cm) $margin = 28.35 / $this->k; $this->SetMargins($margin, $margin); - //Interior cell margin - $this->cMargin = $margin / 10; - //Line width (0.2 mm) + // internal cell padding + $cpadding = $margin / 10; + $this->setCellPaddings($cpadding, 0, $cpadding, 0); + // cell margins + $this->setCellMargins(0, 0, 0, 0); + // line width (0.2 mm) $this->LineWidth = 0.57 / $this->k; $this->linestyleWidth = sprintf('%.2F w', ($this->LineWidth * $this->k)); $this->linestyleCap = '0 J'; $this->linestyleJoin = '0 j'; $this->linestyleDash = '[] 0 d'; - //Automatic page break + // automatic page break $this->SetAutoPageBreak(true, (2 * $margin)); - //Full width display mode + // full width display mode $this->SetDisplayMode('fullwidth'); - //Compression + // compression $this->SetCompression(true); - //Set default PDF version number + // set default PDF version number $this->PDFVersion = '1.7'; $this->encoding = $encoding; $this->HREF = array(); @@ -2993,6 +3020,15 @@ if (!class_exists('TCPDF', false)) { $this->lasth = $h; } + /** + * Reset the last cell height. + * @access public + * @since 5.9.000 (2010-10-03) + */ + public function resetLastH() { + $this->lasth = ($this->FontSize * $this->cell_height_ratio) + $this->cell_padding['T'] + $this->cell_padding['B']; + } + /** * Get the last cell height. * @return last cell height @@ -3170,14 +3206,161 @@ if (!class_exists('TCPDF', false)) { } /** - * Set the internal Cell padding. + * Set the same internal Cell padding for top, right, bottom, left- * @param float $pad internal padding. * @access public * @since 2.1.000 (2008-01-09) - * @see Cell(), SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins() + * @see getCellPaddings(), setCellPaddings() */ public function SetCellPadding($pad) { - $this->cMargin = $pad; + if ($pad >= 0) { + $this->cell_padding['L'] = $pad; + $this->cell_padding['T'] = $pad; + $this->cell_padding['R'] = $pad; + $this->cell_padding['B'] = $pad; + } + } + + /** + * Set the internal Cell paddings. + * @param float $left left padding + * @param float $top top padding + * @param float $right right padding + * @param float $bottom bottom padding + * @access public + * @since 5.9.000 (2010-10-03) + * @see getCellPaddings(), SetCellPadding() + */ + public function setCellPaddings($left='', $top='', $right='', $bottom='') { + if (($left !== '') AND ($left >= 0)) { + $this->cell_padding['L'] = $left; + } + if (($top !== '') AND ($top >= 0)) { + $this->cell_padding['T'] = $top; + } + if (($right !== '') AND ($right >= 0)) { + $this->cell_padding['R'] = $right; + } + if (($bottom !== '') AND ($bottom >= 0)) { + $this->cell_padding['B'] = $bottom; + } + } + + /** + * Get the internal Cell padding array. + * @return array of padding values + * @access public + * @since 5.9.000 (2010-10-03) + * @see setCellPaddings(), SetCellPadding() + */ + public function getCellPaddings() { + return $this->cell_padding; + } + + /** + * Set the internal Cell margins. + * @param float $left left margin + * @param float $top top margin + * @param float $right right margin + * @param float $bottom bottom margin + * @access public + * @since 5.9.000 (2010-10-03) + * @see getCellMargins() + */ + public function setCellMargins($left='', $top='', $right='', $bottom='') { + if (($left !== '') AND ($left >= 0)) { + $this->cell_margin['L'] = $left; + } + if (($top !== '') AND ($top >= 0)) { + $this->cell_margin['T'] = $top; + } + if (($right !== '') AND ($right >= 0)) { + $this->cell_margin['R'] = $right; + } + if (($bottom !== '') AND ($bottom >= 0)) { + $this->cell_margin['B'] = $bottom; + } + } + + /** + * Get the internal Cell margin array. + * @return array of margin values + * @access public + * @since 5.9.000 (2010-10-03) + * @see setCellMargins() + */ + public function getCellMargins() { + return $this->cell_margin; + } + + /** + * Adjust the internal Cell padding array to take account of the line width. + * @param mixed $brd Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) + * @return array of adjustments + * @access public + * @since 5.9.000 (2010-10-03) + */ + protected function adjustCellPadding($brd=0) { + if (empty($brd)) { + return; + } + // current cell padding + $cp = $this->cell_padding; + if ($brd === 1) { + $brd = array('LRTB' => true); + } + if (is_string($brd)) { + // convert string to array + $slen = strlen($brd); + $newbrd = array(); + for ($i = 0; $i < $slen; ++$i) { + $newbrd[$brd{$i}] = true; + } + $brd = $newbrd; + } + if (isset($brd['mode'])) { + $mode = $brd['mode']; + unset($brd['mode']); + } else { + $mode = 'normal'; + } + foreach ($brd as $border => $style) { + $line_width = $this->LineWidth; + if (is_array($style) AND isset($style['width'])) { + // get border width + $line_width = $style['width']; + } + $adj = 0; // line width inside the cell + switch ($mode) { + case 'ext': { + $adj = 0; + break; + } + case 'int': { + $adj = $line_width; + break; + } + case 'normal': + default: { + $adj = ($line_width / 2); + break; + } + } + // correct internal cell padding if required to avoid overlap between text and lines + if ((strpos($border,'T') !== false) AND ($this->cell_padding['T'] < $adj)) { + $this->cell_padding['T'] = $adj; + } + if ((strpos($border,'R') !== false) AND ($this->cell_padding['R'] < $adj)) { + $this->cell_padding['R'] = $adj; + } + if ((strpos($border,'B') !== false) AND ($this->cell_padding['B'] < $adj)) { + $this->cell_padding['B'] = $adj; + } + if ((strpos($border,'L') !== false) AND ($this->cell_padding['L'] < $adj)) { + $this->cell_padding['L'] = $adj; + } + } + return array('T' => ($this->cell_padding['T'] - $cp['T']), 'R' => ($this->cell_padding['R'] - $cp['R']), 'B' => ($this->cell_padding['B'] - $cp['B']), 'L' => ($this->cell_padding['L'] - $cp['L'])); } /** @@ -3862,7 +4045,7 @@ if (!class_exists('TCPDF', false)) { $this->_out('q'); $this->rMargin = $this->original_rMargin; $this->lMargin = $this->original_lMargin; - $this->cMargin = 0; + $this->SetCellPadding(0); //set current position if ($this->rtl) { $this->SetXY($this->original_rMargin, $this->header_margin); @@ -3907,7 +4090,7 @@ if (!class_exists('TCPDF', false)) { $this->_out('q'); $this->rMargin = $this->original_rMargin; $this->lMargin = $this->original_lMargin; - $this->cMargin = 0; + $this->SetCellPadding(0); //set current position $footer_y = $this->h - $this->footer_margin; if ($this->rtl) { @@ -3956,10 +4139,10 @@ if (!class_exists('TCPDF', false)) { // set margins $prev_lMargin = $this->lMargin; $prev_rMargin = $this->rMargin; - $prev_cMargin = $this->cMargin; + $prev_cell_padding = $this->cell_padding; $this->lMargin = $this->theadMargins['lmargin'] + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$this->theadMargins['page']]['olm']); $this->rMargin = $this->theadMargins['rmargin'] + ($this->pagedim[$this->page]['orm'] - $this->pagedim[$this->theadMargins['page']]['orm']); - $this->cMargin = $this->theadMargins['cmargin']; + $this->cell_padding = $this->theadMargins['cell_padding']; if ($this->rtl) { $this->x = $this->w - $this->rMargin; } else { @@ -3976,7 +4159,7 @@ if (!class_exists('TCPDF', false)) { $this->lasth = 0; $this->lMargin = $prev_lMargin; $this->rMargin = $prev_rMargin; - $this->cMargin = $prev_cMargin; + $this->cell_padding = $prev_cell_padding; } } @@ -4308,9 +4491,9 @@ if (!class_exists('TCPDF', false)) { $sa = $this->UTF8ArrToLatin1($sa); $w = 0; // total width $wa = array(); // array of characters widths - foreach ($sa as $char) { + foreach ($sa as $ck => $char) { // character width - $cw = $this->GetCharWidth($char); + $cw = $this->GetCharWidth($char, isset($sa[($ck + 1)])); $wa[] = $cw; $w += $cw; } @@ -4325,14 +4508,37 @@ if (!class_exists('TCPDF', false)) { } /** - * Returns the length of the char in user unit for the current font. + * Returns the length of the char in user unit for the current font considering current stretching and kerning. * @param int $char The char code whose length is to be returned - * @return int char width + * @param boolean $notlast set to false for the latest character on string, true otherwise (default) + * @return float char width * @author Nicola Asuni * @access public * @since 2.4.000 (2008-03-06) */ - public function GetCharWidth($char) { + public function GetCharWidth($char, $notlast=true) { + // get raw width + $chw = $this->getRawCharWidth($char); + if (($this->font_spacing != 0) AND $notlast) { + // increase/decrease font spacing + $chw += $this->font_spacing; + } + if ($this->font_stretching != 100) { + // fixed stretching mode + $chw *= ($this->font_stretching / 100); + } + return $chw; + } + + /** + * Returns the length of the char in user unit for the current font. + * @param int $char The char code whose length is to be returned + * @return float char width + * @author Nicola Asuni + * @access public + * @since 5.9.000 (2010-09-28) + */ + public function getRawCharWidth($char) { if ($char == 173) { // SHY character will not be printed return (0); @@ -4655,19 +4861,34 @@ if (!class_exists('TCPDF', false)) { * @see SetFont() */ public function SetFontSize($size, $out=true) { - //Set font size in points + // font size in points $this->FontSizePt = $size; + // font size in user units $this->FontSize = $size / $this->k; - if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) { - $this->FontAscent = $this->CurrentFont['desc']['Ascent'] * $this->FontSize / 1000; + // calculate some font metrics + if (isset($this->CurrentFont['desc']['FontBBox'])) { + $bbox = explode(' ', substr($this->CurrentFont['desc']['FontBBox'], 1, -1)); + $font_height = ((intval($bbox[3]) - intval($bbox[1])) * $size / 1000); } else { - $this->FontAscent = 0.85 * $this->FontSize; + $font_height = $size * 1.219; + } + if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) { + $font_ascent = ($this->CurrentFont['desc']['Ascent'] * $size / 1000); } if (isset($this->CurrentFont['desc']['Descent']) AND ($this->CurrentFont['desc']['Descent'] <= 0)) { - $this->FontDescent = - $this->CurrentFont['desc']['Descent'] * $this->FontSize / 1000; - } else { - $this->FontDescent = 0.15 * $this->FontSize; + $font_descent = (- $this->CurrentFont['desc']['Descent'] * $size / 1000); } + if (!isset($font_ascent) AND !isset($font_descent)) { + // core font + $font_ascent = 0.76 * $font_height; + $font_descent = $font_height - $font_ascent; + } elseif (!isset($font_descent)) { + $font_descent = $font_height - $font_ascent; + } elseif (!isset($font_ascent)) { + $font_ascent = $font_height - $font_descent; + } + $this->FontAscent = $font_ascent / $this->k; + $this->FontDescent = $font_descent / $this->k; if ($out AND ($this->page > 0) AND (isset($this->CurrentFont['i']))) { $this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); } @@ -4684,16 +4905,14 @@ if (!class_exists('TCPDF', false)) { * @since 4.9.003 (2010-03-30) */ public function getFontDescent($font, $style='', $size=0) { - //Set font size in points - $sizek = $size / $this->k; $fontdata = $this->AddFont($font, $style); $fontinfo = $this->getFontBuffer($fontdata['fontkey']); if (isset($fontinfo['desc']['Descent']) AND ($fontinfo['desc']['Descent'] <= 0)) { - $descent = - $fontinfo['desc']['Descent'] * $sizek / 1000; + $descent = (- $fontinfo['desc']['Descent'] * $size / 1000); } else { - $descent = 0.15 * $sizek; + $descent = 1.219 * 0.24 * $size; } - return $descent; + return ($descent / $this->k); } /** @@ -4707,16 +4926,14 @@ if (!class_exists('TCPDF', false)) { * @since 4.9.003 (2010-03-30) */ public function getFontAscent($font, $style='', $size=0) { - //Set font size in points - $sizek = $size / $this->k; $fontdata = $this->AddFont($font, $style); $fontinfo = $this->getFontBuffer($fontdata['fontkey']); if (isset($fontinfo['desc']['Ascent']) AND ($fontinfo['desc']['Ascent'] > 0)) { - $ascent = $fontinfo['desc']['Ascent'] * $sizek / 1000; + $ascent = ($fontinfo['desc']['Ascent'] * $size / 1000); } else { - $ascent = 0.85 * $sizek; + $ascent = 1.219 * 0.76 * $size; } - return $ascent; + return ($ascent / $this->k); } /** @@ -5048,14 +5265,19 @@ if (!class_exists('TCPDF', false)) { * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak() */ public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { + $prev_cell_margin = $this->cell_margin; + $prev_cell_padding = $this->cell_padding; + $this->adjustCellPadding($border); if (!$ignore_min_height) { - $min_cell_height = $this->FontSize * $this->cell_height_ratio; + $min_cell_height = ($this->FontSize * $this->cell_height_ratio) + $this->cell_padding['T'] + $this->cell_padding['B']; if ($h < $min_cell_height) { $h = $min_cell_height; } } - $this->checkPageBreak($h); - $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height, $calign, $valign)); + $this->checkPageBreak($h + $this->cell_margin['T'] + $this->cell_margin['B']); + $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, true, $calign, $valign)); + $this->cell_padding = $prev_cell_padding; + $this->cell_margin = $prev_cell_margin; } /** @@ -5079,17 +5301,26 @@ if (!class_exists('TCPDF', false)) { * @see Cell() */ protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { + $prev_cell_margin = $this->cell_margin; + $prev_cell_padding = $this->cell_padding; $txt = $this->removeSHY($txt); $rs = ''; //string to be returned + $this->adjustCellPadding($border); if (!$ignore_min_height) { - $min_cell_height = $this->FontSize * $this->cell_height_ratio; + $min_cell_height = ($this->FontSize * $this->cell_height_ratio) + $this->cell_padding['T'] + $this->cell_padding['B']; if ($h < $min_cell_height) { $h = $min_cell_height; } } $k = $this->k; - $x = $this->x; - $y = $this->y; + if ($this->rtl) { + $x = $this->x - $this->cell_margin['R']; + } else { + $x = $this->x + $this->cell_margin['L']; + } + $y = $this->y + $this->cell_margin['T']; + $prev_font_stretching = $this->font_stretching; + $prev_font_spacing = $this->font_spacing; // cell vertical alignment switch ($calign) { case 'A': { @@ -5097,12 +5328,12 @@ if (!class_exists('TCPDF', false)) { switch ($valign) { case 'T': { // top - $y -= ($this->LineWidth / 2); + $y -= $this->cell_padding['T']; break; } case 'B': { // bottom - $y -= ($h - $this->FontAscent - $this->FontDescent - $this->cMargin - ($this->LineWidth / 2)); + $y -= ($h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent); break; } default: @@ -5120,12 +5351,12 @@ if (!class_exists('TCPDF', false)) { switch ($valign) { case 'T': { // top - $y -= ($this->FontAscent + ($this->LineWidth / 2)); + $y -= ($this->cell_padding['T'] + $this->FontAscent); break; } case 'B': { // bottom - $y -= ($h - $this->FontDescent- $this->cMargin - ($this->LineWidth / 2)); + $y -= ($h - $this->cell_padding['B'] - $this->FontDescent); break; } default: @@ -5143,19 +5374,19 @@ if (!class_exists('TCPDF', false)) { switch ($valign) { case 'T': { // top - $y -= ($this->FontAscent + $this->FontDescent + $this->cMargin + ($this->LineWidth / 2)); + $y -= ($this->cell_padding['T'] + $this->FontAscent + $this->FontDescent); break; } case 'B': { // bottom - $y -= ($h - ($this->LineWidth / 2)); + $y -= ($h - $this->cell_padding['B']); break; } default: case 'C': case 'M': { // center - $y -= (($h + $this->FontAscent + $this->FontDescent) / 2) + $this->cMargin; + $y -= (($h + $this->FontAscent + $this->FontDescent) / 2); break; } } @@ -5166,7 +5397,8 @@ if (!class_exists('TCPDF', false)) { $y -= $h; break; } - case 'C': { + case 'C': + case 'M': { // cell center $y -= ($h / 2); break; @@ -5181,25 +5413,23 @@ if (!class_exists('TCPDF', false)) { switch ($valign) { case 'T': { // top - $basefonty = $y + $this->FontAscent + ($this->LineWidth / 2); - $yt = $y + ($this->LineWidth / 2); + $yt = $y + $this->cell_padding['T']; break; } case 'B': { // bottom - $basefonty = $y + $h - $this->FontDescent - $this->cMargin - ($this->LineWidth / 2); - $yt = $y + $h - $this->FontSize - $this->cMargin - ($this->LineWidth / 2); + $yt = $y + $h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent; break; } default: case 'C': case 'M': { // center - $basefonty = $y + (($h + $this->FontAscent - $this->FontDescent) / 2); - $yt = $y + (($h - $this->FontSize) / 2); + $yt = $y + (($h - $this->FontAscent - $this->FontDescent) / 2); break; } } + $basefonty = $yt + $this->FontAscent; if ($this->empty_string($w) OR ($w <= 0)) { if ($this->rtl) { $w = $x - $this->lMargin; @@ -5220,9 +5450,9 @@ if (!class_exists('TCPDF', false)) { $op = 'S'; } if ($this->rtl) { - $xk = (($this->x - $w) * $k); + $xk = (($x - $w) * $k); } else { - $xk = ($this->x * $k); + $xk = ($x * $k); } $s .= sprintf('%.2F %.2F %.2F %.2F re %s ', $xk, (($this->h - $y) * $k), ($w * $k), (-$h * $k), $op); } @@ -5268,34 +5498,50 @@ if (!class_exists('TCPDF', false)) { } } $txt2 = $this->_escape($txt2); - // text length - $txwidth = $this->GetStringWidth($txt); - $width = $txwidth; - // ratio between cell length and text length - if ($width <= 0) { - $ratio = 1; - } else { - $ratio = ($w - (2 * $this->cMargin)) / $width; - } - // stretch text if required - if (($stretch > 0) AND (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0)))) { - if ($stretch > 2) { - // spacing - //Calculate character spacing in points - $char_space = (($w - $width - (2 * $this->cMargin)) * $this->k) / max($this->GetNumChars($txt)-1,1); - //Set character spacing - $rs .= sprintf('BT %.2F Tc ET ', $char_space); + if ($stretch > 0) { + $this->font_stretching = 100; + $this->font_spacing = 0; + // text length + $txwidth = $this->GetStringWidth($txt); + $width = $txwidth; + // ratio between cell length and text length + if ($width <= 0) { + $ratio = 1; } else { - // scaling - //Calculate horizontal scaling - $horiz_scale = $ratio * 100.0; - //Set horizontal scaling - $rs .= sprintf('BT %.2F Tz ET ', $horiz_scale); + $ratio = ($w - $this->cell_padding['L'] - $this->cell_padding['R']) / $width; + } + // stretch text if required + if (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0))) { + if ($stretch > 2) { + // spacing + // calculate character spacing in points + $char_space = (($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) * $this->k) / max(($this->GetNumChars($txt) - 1), 1); + // set character spacing + $rs .= sprintf('BT %.2F Tc ET ', $char_space); + } else { + // scaling + // calculate horizontal scaling + $horiz_scale = $ratio * 100.0; + // set horizontal scaling + $rs .= sprintf('BT %.2F Tz ET ', $horiz_scale); + } + $align = ''; + $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; + } else { + $stretch == 0; } - $align = ''; - $width = $w - (2 * $this->cMargin); } else { - $stretch == 0; + // text length + $txwidth = $this->GetStringWidth($txt); + $width = $txwidth; + if ($this->font_stretching != 100) { + // fixed stretching mode + $rs .= sprintf('BT %.2F Tz ET ', $this->font_stretching); + } + if ($this->font_spacing != 0) { + // increase/decrease font spacing + $rs .= sprintf('BT %.2F Tc ET ', ($this->font_spacing * $this->k)); + } } if ($this->ColorFlag) { $s .= 'q '.$this->TextColor.' '; @@ -5303,7 +5549,7 @@ if (!class_exists('TCPDF', false)) { // rendering mode $s .= sprintf('BT %d Tr %.2F w ET ', $this->textrendermode, $this->textstrokewidth); // count number of spaces - $ns = substr_count($txt, ' '); + $ns = substr_count($txt, chr(32)); // Justification $spacewidth = 0; if (($align == 'J') AND ($ns > 0)) { @@ -5311,18 +5557,27 @@ if (!class_exists('TCPDF', false)) { // get string width without spaces $width = $this->GetStringWidth(str_replace(' ', '', $txt)); // calculate average space width - $spacewidth = -1000 * ($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1) / $this->FontSize; + $spacewidth = -1000 * ($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1) / $this->FontSize; + if ($this->font_stretching != 100) { + // word spacing is affected by stretching + $spacewidth /= ($this->font_stretching / 100); + } // set word position to be used with TJ operator $txt2 = str_replace(chr(0).chr(32), ') '.sprintf('%.3F', $spacewidth).' (', $txt2); $unicode_justification = true; } else { // get string width $width = $txwidth; - $spacewidth = (($w - $width - (2 * $this->cMargin)) / ($ns?$ns:1)) * $this->k; + // new space width + $spacewidth = (($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)) * $this->k; + if ($this->font_stretching != 100) { + // word spacing (Tw) is affected by stretching + $spacewidth /= ($this->font_stretching / 100); + } // set word spacing $rs .= sprintf('BT %.3F Tw ET ', $spacewidth); } - $width = $w - (2 * $this->cMargin); + $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; } // replace carriage return characters $txt2 = str_replace("\r", ' ', $txt2); @@ -5333,30 +5588,34 @@ if (!class_exists('TCPDF', false)) { } case 'R': { if ($this->rtl) { - $dx = $this->cMargin; + $dx = $this->cell_padding['R']; } else { - $dx = $w - $width - $this->cMargin; + $dx = $w - $width - $this->cell_padding['R']; } break; } case 'L': { if ($this->rtl) { - $dx = $w - $width - $this->cMargin; + $dx = $w - $width - $this->cell_padding['L']; } else { - $dx = $this->cMargin; + $dx = $this->cell_padding['L']; } break; } case 'J': default: { - $dx = $this->cMargin; + if ($this->rtl) { + $dx = $this->cell_padding['R']; + } else { + $dx = $this->cell_padding['L']; + } break; } } if ($this->rtl) { - $xdx = $this->x - $dx - $width; + $xdx = $x - $dx - $width; } else { - $xdx = $this->x + $dx; + $xdx = $x + $dx; } $xdk = $xdx * $k; // print text @@ -5365,7 +5624,7 @@ if (!class_exists('TCPDF', false)) { // print overlapping characters as separate string $xshift = 0; // horizontal shift $ty = (($this->h - $basefonty + (0.2 * $this->FontSize)) * $k); - $spw = (($w - $txwidth - (2 * $this->cMargin)) / ($ns?$ns:1)); + $spw = (($w - $txwidth - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)); foreach ($uniblock as $uk => $uniarr) { if (($uk % 2) == 0) { // x space to skip @@ -5395,7 +5654,7 @@ if (!class_exists('TCPDF', false)) { $s .= ' Q'; } if ($link) { - $this->Link($xdx, $yt, $width, ($this->FontSize + $this->cMargin), $link, $ns); + $this->Link($xdx, $yt, $width, ($this->FontAscent + $this->FontDescent), $link, $ns); } } // output cell @@ -5404,21 +5663,33 @@ if (!class_exists('TCPDF', false)) { $rs .= $s; // reset text stretching if ($stretch > 2) { - //Reset character horizontal spacing + // reset character horizontal spacing $rs .= ' BT 0 Tc ET'; } elseif ($stretch > 0) { - //Reset character horizontal scaling + // reset character horizontal scaling $rs .= ' BT 100 Tz ET'; + } else { + if ($this->font_spacing != 0) { + // reset fixed kerning mode + $rs .= ' BT 0 Tc ET'; + } + if ($this->font_stretching != 100) { + // reset fixed stretching mode + $rs .= ' BT 100 Tz ET'; + } } } // reset word spacing if (!$this->isUnicodeFont() AND ($align == 'J')) { $rs .= ' BT 0 Tw ET'; } + // reset stretching and spacing + $this->font_stretching = $prev_font_stretching; + $this->font_spacing = $prev_font_spacing; $this->lasth = $h; if ($ln > 0) { //Go to the beginning of the next line - $this->y = $y + $h; + $this->y = $y + $h + $this->cell_margin['B']; if ($ln == 1) { if ($this->rtl) { $this->x = $this->w - $this->rMargin; @@ -5429,13 +5700,15 @@ if (!class_exists('TCPDF', false)) { } else { // go left or right by case if ($this->rtl) { - $this->x -= $w; + $this->x = $x - $w - $this->cell_margin['L']; } else { - $this->x += $w; + $this->x = $x + $w + $this->cell_margin['R']; } } $gstyles = ''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor."\n"; $rs = $gstyles.$rs; + $this->cell_padding = $prev_cell_padding; + $this->cell_margin = $prev_cell_margin; return $rs; } @@ -5656,9 +5929,18 @@ if (!class_exists('TCPDF', false)) { * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak() */ public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false) { + $prev_cell_margin = $this->cell_margin; + $prev_cell_padding = $this->cell_padding; + // adjust internal padding + $this->adjustCellPadding($border); + $mc_padding = $this->cell_padding; + $mc_margin = $this->cell_margin; + $this->cell_padding['T'] = 0; + $this->cell_padding['B'] = 0; + $this->setCellMargins(0, 0, 0, 0); if ($this->empty_string($this->lasth) OR $reseth) { - //set row height - $this->lasth = $this->FontSize * $this->cell_height_ratio; + // reset row height + $this->resetLastH(); } if (!$this->empty_string($y)) { $this->SetY($y); @@ -5666,7 +5948,7 @@ if (!class_exists('TCPDF', false)) { $y = $this->GetY(); } $resth = 0; - if ((!$this->InFooter) AND (($y + $h) > $this->PageBreakTrigger)) { + if ((!$this->InFooter) AND (($y + $h + $mc_margin['T'] + $mc_margin['B']) > $this->PageBreakTrigger)) { // spit cell in more pages/columns $newh = $this->PageBreakTrigger - $y; $resth = $h - $newh; // cell to be printed on the next page/column @@ -5681,35 +5963,36 @@ if (!class_exists('TCPDF', false)) { } else { $x = $this->GetX(); } + // apply margins + $oy = $y + $mc_margin['T']; + if ($this->rtl) { + $ox = $x - $mc_margin['R']; + } else { + $ox = $x + $mc_margin['L']; + } + $this->x = $ox; + $this->y = $oy; + // set width if ($this->empty_string($w) OR ($w <= 0)) { if ($this->rtl) { - $w = $this->x - $this->lMargin; + $w = $this->x - $this->lMargin - $mc_margin['L']; } else { - $w = $this->w - $this->rMargin - $this->x; + $w = $this->w - $this->x - $this->rMargin - $mc_margin['R']; } } // store original margin values $lMargin = $this->lMargin; $rMargin = $this->rMargin; if ($this->rtl) { - $this->SetRightMargin($this->w - $this->x); - $this->SetLeftMargin($this->x - $w); + $this->rMargin = $this->w - $this->x; + $this->lMargin = $this->x - $w; } else { - $this->SetLeftMargin($this->x); - $this->SetRightMargin($this->w - $this->x - $w); + $this->lMargin = $this->x; + $this->rMargin = $this->w - $this->x - $w; } - $starty = $this->y; if ($autopadding) { - // Adjust internal padding - if ($this->cMargin < ($this->LineWidth / 2)) { - $this->cMargin = ($this->LineWidth / 2); - } - // Add top space if needed - if (($this->lasth - $this->FontSize) < $this->LineWidth) { - $this->y += $this->LineWidth / 2; - } // add top padding - $this->y += $this->cMargin; + $this->y += $mc_padding['T']; } if ($ishtml) { // ******* Write HTML text $this->writeHTML($txt, true, 0, $reseth, true, $align); @@ -5718,7 +6001,7 @@ if (!class_exists('TCPDF', false)) { // vertical alignment if ($maxh > 0) { // get text height - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, '', ''); + $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); if ($fitcell) { $prev_FontSizePt = $this->FontSizePt; // try to reduce font size to fit text on cell (use a quick search algorithm) @@ -5729,7 +6012,8 @@ if (!class_exists('TCPDF', false)) { while ($maxit > 0) { $fmid = (($fmax + $fmin) / 2); $this->SetFontSize($fmid, false); - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, '', ''); + $this->lasth = $this->FontSize * $this->cell_height_ratio; + $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); if (($text_height == $maxh) OR (($text_height < $maxh) AND ($fmin >= ($fmax - 0.01)))) { break; } elseif ($text_height < $maxh) { @@ -5743,7 +6027,7 @@ if (!class_exists('TCPDF', false)) { } if ($text_height < $maxh) { if ($valign == 'M') { - // text vertically aligned on middle + // text vertically centered $this->y += (($maxh - $text_height) / 2); } elseif ($valign == 'B') { // text vertically aligned on bottom @@ -5751,7 +6035,7 @@ if (!class_exists('TCPDF', false)) { } } } - $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, true, $maxh); + $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, true, $maxh, 0, $mc_margin); if ($fitcell) { // restore font size $this->SetFontSize($prev_FontSizePt); @@ -5759,11 +6043,7 @@ if (!class_exists('TCPDF', false)) { } if ($autopadding) { // add bottom padding - $this->y += $this->cMargin; - // Add bottom space if needed - if (($this->lasth - $this->FontSize) < $this->LineWidth) { - $this->y += $this->LineWidth / 2; - } + $this->y += $mc_padding['B']; } // Get end-of-text Y position $currentY = $this->y; @@ -5817,13 +6097,18 @@ if (!class_exists('TCPDF', false)) { // single page for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column $this->selectColumn($column); + if ($this->rtl) { + $this->x -= $mc_margin['R']; + } else { + $this->x += $mc_margin['L']; + } if ($startcolumn == $endcolumn) { // single column $cborder = $border; - $h = max($h, ($currentY - $y)); - $this->y = $y; + $h = max($h, ($currentY - $oy)); + $this->y = $oy; } elseif ($column == $startcolumn) { // first column $cborder = $border_start; - $this->y = $starty; + $this->y = $oy; $h = $this->h - $this->y - $this->bMargin; } elseif ($column == $endcolumn) { // end column $cborder = $border_end; @@ -5841,9 +6126,14 @@ if (!class_exists('TCPDF', false)) { } elseif ($page == $startpage) { // first page for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column $this->selectColumn($column); + if ($this->rtl) { + $this->x -= $mc_margin['R']; + } else { + $this->x += $mc_margin['L']; + } if ($column == $startcolumn) { // first column $cborder = $border_start; - $this->y = $starty; + $this->y = $oy; $h = $this->h - $this->y - $this->bMargin; } else { // middle column $cborder = $border_middle; @@ -5855,6 +6145,11 @@ if (!class_exists('TCPDF', false)) { } elseif ($page == $endpage) { // last page for ($column = 0; $column <= $endcolumn; ++$column) { // for each column $this->selectColumn($column); + if ($this->rtl) { + $this->x -= $mc_margin['R']; + } else { + $this->x += $mc_margin['L']; + } if ($column == $endcolumn) { // end column $cborder = $border_end; @@ -5873,6 +6168,11 @@ if (!class_exists('TCPDF', false)) { } else { // middle page for ($column = 0; $column < $this->num_columns; ++$column) { // for each column $this->selectColumn($column); + if ($this->rtl) { + $this->x -= $mc_margin['R']; + } else { + $this->x += $mc_margin['L']; + } $cborder = $border_middle; $h = $this->h - $this->y - $this->bMargin; $resth -= $h; @@ -5881,19 +6181,34 @@ if (!class_exists('TCPDF', false)) { } if ($cborder OR $fill) { // draw border and fill - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = &$this->footerpos[$this->page]; + if ($this->inxobj) { + // we are inside an XObject template + if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { + $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); + $pagemark = &$this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; + } else { + $pagemark = &$this->xobjects[$this->xobjid]['intmrk']; + } + $pagebuff = $this->xobjects[$this->xobjid]['outdata']; + $pstart = substr($pagebuff, 0, $pagemark); + $pend = substr($pagebuff, $pagemark); + $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; + $pagemark += strlen($ccode); } else { - $pagemark = &$this->intmrk[$this->page]; + if (end($this->transfmrk[$this->page]) !== false) { + $pagemarkkey = key($this->transfmrk[$this->page]); + $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; + } elseif ($this->InFooter) { + $pagemark = &$this->footerpos[$this->page]; + } else { + $pagemark = &$this->intmrk[$this->page]; + } + $pagebuff = $this->getPageBuffer($this->page); + $pstart = substr($pagebuff, 0, $pagemark); + $pend = substr($pagebuff, $pagemark); + $this->setPageBuffer($this->page, $pstart.$ccode.$pend); + $pagemark += strlen($ccode); } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - $pagemark += strlen($ccode); } } // end for each page // Get end-of-cell Y position @@ -5903,17 +6218,19 @@ if (!class_exists('TCPDF', false)) { $this->SetRightMargin($rMargin); if ($ln > 0) { //Go to the beginning of the next line - $this->SetY($currentY); + $this->SetY($currentY + $mc_margin['B']); if ($ln == 2) { - $this->SetX($x + $w); + $this->SetX($x + $w + $mc_margin['L'] + $mc_margin['R']); } } else { // go left or right by case $this->setPage($startpage); $this->y = $y; - $this->SetX($x + $w); + $this->SetX($x + $w + $mc_margin['L'] + $mc_margin['R']); } $this->setContentMark(); + $this->cell_padding = $prev_cell_padding; + $this->cell_margin = $prev_cell_margin; return $nl; } @@ -5991,19 +6308,26 @@ if (!class_exists('TCPDF', false)) { } /** - * This method return the estimated number of lines for print a simple text string in Multicell() method. + * This method return the estimated number of lines for print a simple text string using Multicell() method. * @param string $txt String for calculating his height * @param float $w Width of cells. If 0, they extend up to the right margin of the page. * @param boolean $reseth if true reset the last cell height (default false). * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param float $cellMargin Internal cell margin, if empty or <= 0, extended up to current pdf cell margin (default ''). - * @param float $lineWidth Line width, if empty or <= 0, extended up to current pdf line width (default ''). + * @param float $cellpadding Internal cell padding, if empty uses default cell padding. + * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. * @author Alexander Escalona Fernández, Nicola Asuni * @access public * @since 4.5.011 */ - public function getNumLines($txt, $w=0, $reseth=false, $autopadding=true, $cellMargin='', $lineWidth='') { + public function getNumLines($txt, $w=0, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { + // adjust internal padding + $prev_cell_padding = $this->cell_padding; + $prev_lasth = $this->lasth; + if (is_array($cellpadding)) { + $this->cell_padding = $cellpadding; + } + $this->adjustCellPadding($border); if ($this->empty_string($w) OR ($w <= 0)) { if ($this->rtl) { $w = $this->x - $this->lMargin; @@ -6011,21 +6335,10 @@ if (!class_exists('TCPDF', false)) { $w = $this->w - $this->rMargin - $this->x; } } - if ($this->empty_string($cellMargin) OR ($cellMargin <= 0)) { - $cellMargin = $this->cMargin; - } - if ($this->empty_string($lineWidth) OR ($lineWidth <= 0)) { - $lineWidth = $this->LineWidth; - } - if ($autopadding) { - // adjust internal padding - if ($cellMargin < ($lineWidth/2)) { - $cellMargin = ($lineWidth/2); - } - } - $wmax = $w - (2 * $cellMargin); + $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; if ($reseth) { - $this->lasth = $this->FontSize * $this->cell_height_ratio; + // reset row height + $this->resetLastH(); } $lines = 1; $sum = 0; @@ -6054,6 +6367,8 @@ if (!class_exists('TCPDF', false)) { if ($chars[($length - 1)] == 10) { --$lines; } + $this->cell_padding = $prev_cell_padding; + $this->lasth = $prev_lasth; return $lines; } @@ -6098,33 +6413,28 @@ if (!class_exists('TCPDF', false)) { * @param string $txt String for calculating his height * @param boolean $reseth if true reset the last cell height (default false). * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param float $cellMargin Internal cell margin, if empty or <= 0, extended up to current pdf cell margin (default ''). - * @param float $lineWidth Line width, if empty or <= 0, extended up to current pdf line width (default ''). + * @param float $cellpadding Internal cell padding, if empty uses default cell padding. + * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. * @author Nicola Asuni, Alexander Escalona Fernández * @access public */ - public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellMargin='', $lineWidth='') { - $lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellMargin, $lineWidth); + public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { + // adjust internal padding + $prev_cell_padding = $this->cell_padding; + $prev_lasth = $this->lasth; + if (is_array($cellpadding)) { + $this->cell_padding = $cellpadding; + } + $this->adjustCellPadding($border); + $lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border); $height = $lines * ($this->FontSize * $this->cell_height_ratio); if ($autopadding) { - if ($this->empty_string($cellMargin) OR ($cellMargin <= 0)) { - $cellMargin = $this->cMargin; - } - if ($this->empty_string($lineWidth) OR ($lineWidth <= 0)) { - $lineWidth = $this->LineWidth; - } - // adjust internal padding - if ($cellMargin < ($lineWidth/2)) { - $cellMargin = ($lineWidth/2); - } - // add top and bottom space if needed - if (($this->lasth - $this->FontSize) < $lineWidth) { - $height += $lineWidth; - } // add top and bottom padding - $height += (2 * $cellMargin); + $height += ($this->cell_padding['T'] + $this->cell_padding['B']); } + $this->cell_padding = $prev_cell_padding; + $this->lasth = $prev_lasth; return $height; } @@ -6141,14 +6451,18 @@ if (!class_exists('TCPDF', false)) { * @param boolean $firstblock if true the string is the starting of a line. * @param float $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. * @param float $wadj first line width will be reduced by this amount (used in HTML mode). + * @param array $margin margin array of the parent container * @return mixed Return the number of cells or the remaining string if $firstline = true. * @access public * @since 1.5 */ - public function Write($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0) { + public function Write($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0, $margin='') { if (strlen($txt) == 0) { $txt = ' '; } + if ($margin === '') { + $margin = $this->cell_margin; + } // remove carriage returns $s = str_replace("\r", '', $txt); // check if string contains arabic text @@ -6177,7 +6491,7 @@ if (!class_exists('TCPDF', false)) { // widht for SHY replacement $shy_replacement_width = $this->GetCharWidth($shy_replacement); // max Y - $maxy = $this->y + $maxh - $h - (2 * $this->cMargin); + $maxy = $this->y + $maxh - $h - $this->cell_padding['T'] - $this->cell_padding['B']; // calculate remaining line width ($w) if ($this->rtl) { $w = $this->x - $this->lMargin; @@ -6185,7 +6499,7 @@ if (!class_exists('TCPDF', false)) { $w = $this->w - $this->rMargin - $this->x; } // max column width - $wmax = $w - (2 * $this->cMargin) - $wadj; + $wmax = $w - $wadj - $this->cell_padding['L'] - $this->cell_padding['R']; if ((!$firstline) AND (($chrwidth > $wmax) OR ($this->GetCharWidth($chars[0]) > $wmax))) { // a single character do not fit on column return ''; @@ -6234,9 +6548,9 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $startx + $linew; } $w = $linew; - $tmpcmargin = $this->cMargin; + $tmpcellpadding = $this->cell_padding; if ($maxh == 0) { - $this->cMargin = 0; + $this->SetCellPadding(0); } } if ($firstblock AND $this->isRTLTextDir()) { @@ -6248,7 +6562,7 @@ if (!class_exists('TCPDF', false)) { } unset($tmpstr); if ($firstline) { - $this->cMargin = $tmpcmargin; + $this->cell_padding = $tmpcellpadding; return ($this->UniArrSubString($uchars, $i)); } ++$nl; @@ -6259,9 +6573,16 @@ if (!class_exists('TCPDF', false)) { // account for margin changes if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) { $this->AcceptPageBreak(); + if ($this->rtl) { + $this->x -= $margin['R']; + } else { + $this->x += $margin['L']; + } + $this->lMargin += $margin['L']; + $this->rMargin += $margin['R']; } $w = $this->getRemainingWidth(); - $wmax = $w - (2 * $this->cMargin); + $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; } else { // 160 is the non-breaking space. // 173 is SHY (Soft Hypen). @@ -6322,9 +6643,9 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $startx + $linew; } $w = $linew; - $tmpcmargin = $this->cMargin; + $tmpcellpadding = $this->cell_padding; if ($maxh == 0) { - $this->cMargin = 0; + $this->SetCellPadding(0); } } if ($firstblock AND $this->isRTLTextDir()) { @@ -6333,7 +6654,7 @@ if (!class_exists('TCPDF', false)) { $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch); unset($tmpstr); if ($firstline) { - $this->cMargin = $tmpcmargin; + $this->cell_padding = $tmpcellpadding; return ($this->UniArrSubString($uchars, $i)); } $j = $i; @@ -6376,9 +6697,9 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $startx + $linew + $shy_width; } $w = $linew; - $tmpcmargin = $this->cMargin; + $tmpcellpadding = $this->cell_padding; if ($maxh == 0) { - $this->cMargin = 0; + $this->SetCellPadding(0); } } // print the line @@ -6389,7 +6710,7 @@ if (!class_exists('TCPDF', false)) { unset($tmpstr); if ($firstline) { // return the remaining text - $this->cMargin = $tmpcmargin; + $this->cell_padding = $tmpcellpadding; return ($this->UniArrSubString($uchars, ($sep + $endspace))); } $i = $sep; @@ -6400,9 +6721,16 @@ if (!class_exists('TCPDF', false)) { // account for margin changes if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND (!$this->InFooter)) { $this->AcceptPageBreak(); + if ($this->rtl) { + $this->x -= $margin['R']; + } else { + $this->x += $margin['L']; + } + $this->lMargin += $margin['L']; + $this->rMargin += $margin['R']; } $w = $this->getRemainingWidth(); - $wmax = $w - (2 * $this->cMargin); + $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; if ($linebreak) { $linebreak = false; } else { @@ -6459,9 +6787,9 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $startx + $linew; } $w = $linew; - $tmpcmargin = $this->cMargin; + $tmpcellpadding = $this->cell_padding; if ($maxh == 0) { - $this->cMargin = 0; + $this->SetCellPadding(0); } } if ($firstblock AND $this->isRTLTextDir()) { @@ -6470,7 +6798,7 @@ if (!class_exists('TCPDF', false)) { $this->Cell($w, $h, $tmpstr, 0, $ln, $align, $fill, $link, $stretch); unset($tmpstr); if ($firstline) { - $this->cMargin = $tmpcmargin; + $this->cell_padding = $tmpcellpadding; return ($this->UniArrSubString($uchars, $nb)); } ++$nl; @@ -7242,40 +7570,57 @@ if (!class_exists('TCPDF', false)) { * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library). * @param int $dpi dot-per-inch resolution used on resize * @param string $palign Allows to center or align the image on the current line. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @author Valentin Schmidt, Nicola Asuni + * @author Nicola Asuni * @access protected * @since 4.3.007 (2008-12-04) * @see Image() */ protected function ImagePngAlpha($file, $x, $y, $wpx, $hpx, $w, $h, $type, $link, $align, $resize, $dpi, $palign) { - // generate images - $img = imagecreatefrompng($file); - $imgalpha = imagecreate($wpx, $hpx); - // generate gray scale palette (0 -> 255) - for ($c = 0; $c < 256; ++$c) { - ImageColorAllocate($imgalpha, $c, $c, $c); - } - // extract alpha channel - for ($xpx = 0; $xpx < $wpx; ++$xpx) { - for ($ypx = 0; $ypx < $hpx; ++$ypx) { - $color = imagecolorat($img, $xpx, $ypx); - $alpha = ($color >> 24); // shifts off the first 24 bits (where 8x3 are used for each color), and returns the remaining 7 allocated bits (commonly used for alpha) - $alpha = (((127 - $alpha) / 127) * 255); // GD alpha is only 7 bit (0 -> 127) - $alpha = $this->getGDgamma($alpha); // correct gamma - imagesetpixel($imgalpha, $xpx, $ypx, $alpha); - } - } + // create temp image file (without alpha channel) + $tempfile_plain = tempnam(K_PATH_CACHE, 'mskp_'); // create temp alpha file $tempfile_alpha = tempnam(K_PATH_CACHE, 'mska_'); - imagepng($imgalpha, $tempfile_alpha); - imagedestroy($imgalpha); - // extract image without alpha channel - $imgplain = imagecreatetruecolor($wpx, $hpx); - imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx); - // create temp image file - $tempfile_plain = tempnam(K_PATH_CACHE, 'mskp_'); - imagepng($imgplain, $tempfile_plain); - imagedestroy($imgplain); + if (extension_loaded('imagick')) { // ImageMagick + // ImageMagick library + $img = new Imagick(); + $img->readImage($file); + // clone image object + $imga = $img->clone(); + // extract alpha channel + $img->separateImageChannel(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE); + $img->negateImage(true); + $img->setImageFormat('png'); + $img->writeImage($tempfile_alpha); + // remove alpha channel + $imga->separateImageChannel(imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE)); + $imga->setImageFormat('png'); + $imga->writeImage($tempfile_plain); + } else { // GD library + // generate images + $img = imagecreatefrompng($file); + $imgalpha = imagecreate($wpx, $hpx); + // generate gray scale palette (0 -> 255) + for ($c = 0; $c < 256; ++$c) { + ImageColorAllocate($imgalpha, $c, $c, $c); + } + // extract alpha channel + for ($xpx = 0; $xpx < $wpx; ++$xpx) { + for ($ypx = 0; $ypx < $hpx; ++$ypx) { + $color = imagecolorat($img, $xpx, $ypx); + $alpha = ($color >> 24); // shifts off the first 24 bits (where 8x3 are used for each color), and returns the remaining 7 allocated bits (commonly used for alpha) + $alpha = (((127 - $alpha) / 127) * 255); // GD alpha is only 7 bit (0 -> 127) + $alpha = $this->getGDgamma($alpha); // correct gamma + imagesetpixel($imgalpha, $xpx, $ypx, $alpha); + } + } + imagepng($imgalpha, $tempfile_alpha); + imagedestroy($imgalpha); + // extract image without alpha channel + $imgplain = imagecreatetruecolor($wpx, $hpx); + imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx); + imagepng($imgplain, $tempfile_plain); + imagedestroy($imgplain); + } // embed mask image $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false); // embed image, masked with previously embedded mask @@ -7299,7 +7644,7 @@ if (!class_exists('TCPDF', false)) { * Performs a line break. * The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter. * @param float $h The height of the break. By default, the value equals the height of the last printed cell. - * @param boolean $cell if true add a cMargin to the x coordinate + * @param boolean $cell if true add the current left (or right o for RTL) padding to the X coordinate * @access public * @since 1.0 * @see Cell() @@ -7310,14 +7655,18 @@ if (!class_exists('TCPDF', false)) { return; } if ($cell) { - $cellmargin = $this->cMargin; + if ($this->rtl) { + $cellpadding = $this->cell_padding['R']; + } else { + $cellpadding = $this->cell_padding['L']; + } } else { - $cellmargin = 0; + $cellpadding = 0; } if ($this->rtl) { - $this->x = $this->w - $this->rMargin - $cellmargin; + $this->x = $this->w - $this->rMargin - $cellpadding; } else { - $this->x = $this->lMargin + $cellmargin; + $this->x = $this->lMargin + $cellpadding; } if (is_string($h)) { $this->y += $this->lasth; @@ -11604,7 +11953,12 @@ if (!class_exists('TCPDF', false)) { */ public function StartTransform() { $this->_out('q'); - $this->transfmrk[$this->page][] = $this->pagelen[$this->page]; + if ($this->inxobj) { + // we are inside an XObject template + $this->xobjects[$this->xobjid]['transfmrk'][] = strlen($this->xobjects[$this->xobjid]['outdata']); + } else { + $this->transfmrk[$this->page][] = $this->pagelen[$this->page]; + } ++$this->transfmatrix_key; $this->transfmatrix[$this->transfmatrix_key] = array(); } @@ -11623,7 +11977,12 @@ if (!class_exists('TCPDF', false)) { array_pop($this->transfmatrix[$this->transfmatrix_key]); --$this->transfmatrix_key; } - array_pop($this->transfmrk[$this->page]); + if ($this->inxobj) { + // we are inside an XObject template + array_pop($this->xobjects[$this->xobjid]['transfmrk']); + } else { + array_pop($this->transfmrk[$this->page]); + } } /** * Horizontal Scaling. @@ -11892,8 +12251,14 @@ if (!class_exists('TCPDF', false)) { $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5])); // add tranformation matrix $this->transfmatrix[$this->transfmatrix_key][] = array('a' => $tm[0], 'b' => $tm[1], 'c' => $tm[2], 'd' => $tm[3], 'e' => $tm[4], 'f' => $tm[5]); - // update tranformation mark - if (end($this->transfmrk[$this->page]) !== false) { + // update transformation mark + if ($this->inxobj) { + // we are inside an XObject template + if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { + $key = key($this->xobjects[$this->xobjid]['transfmrk']); + $this->xobjects[$this->xobjid]['transfmrk'][$key] = strlen($this->xobjects[$this->xobjid]['outdata']); + } + } elseif (end($this->transfmrk[$this->page]) !== false) { $key = key($this->transfmrk[$this->page]); $this->transfmrk[$this->page][$key] = $this->pagelen[$this->page]; } @@ -16008,7 +16373,18 @@ if (!class_exists('TCPDF', false)) { * @param float $xres width of the smallest bar in user units (empty string = default value = 0.4mm) * @param array $style array of options:
    • boolean $style['border'] if true prints a border
    • -
    • int $style['padding'] padding to leave around the barcode (minimum distance between the barcode and the containing cell border) in user units (set to 'auto' for automatic padding)
    • array $style['fgcolor'] color array for bars and text
    • mixed $style['bgcolor'] color array for background (set to false for transparent)
    • boolean $style["text"] boolean if true prints text below the barcode
    • string $style['font'] font name for text
    • int $style['fontsize'] font size for text
    • int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing.
    • string $style['position'] horizontal position of the containing barcode cell on the page: L = left margin; C = center; R = right margin.
    • string $style['align'] horizontal position of the barcode on the containing rectangle: L = left; C = center; R = right.
    • string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.
    • string $style['fitwidth'] if true reduce the width to fit the barcode width + padding. When this option is enabled the 'stretch' option is automatically disabled.
    • string $style['cellfitalign'] this option works only when 'fitwidth' is true and 'position' is unset or empty. Set the horizontal position of the containing barcode cell inside the specified rectangle: L = left; C = center; R = right.
    +
  • int $style['padding'] padding to leave around the barcode (minimum distance between the barcode and the containing cell border) in user units (set to 'auto' for automatic padding)
  • +
  • array $style['fgcolor'] color array for bars and text
  • +
  • mixed $style['bgcolor'] color array for background (set to false for transparent)
  • +
  • boolean $style['text'] if true prints text below the barcode
  • +
  • string $style['label'] override default label
  • +
  • string $style['font'] font name for text
  • int $style['fontsize'] font size for text
  • +
  • int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing.
  • +
  • string $style['position'] horizontal position of the containing barcode cell on the page: L = left margin; C = center; R = right margin.
  • +
  • string $style['align'] horizontal position of the barcode on the containing rectangle: L = left; C = center; R = right.
  • +
  • string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.
  • +
  • string $style['fitwidth'] if true reduce the width to fit the barcode width + padding. When this option is enabled the 'stretch' option is automatically disabled.
  • +
  • string $style['cellfitalign'] this option works only when 'fitwidth' is true and 'position' is unset or empty. Set the horizontal position of the containing barcode cell inside the specified rectangle: L = left; C = center; R = right.
  • * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
    • T: top-right for LTR or top-left for RTL
    • M: middle-right for LTR or middle-left for RTL
    • B: bottom-right for LTR or bottom-left for RTL
    • N: next line
    * @author Nicola Asuni * @since 3.1.000 (2008-06-09) @@ -16236,17 +16612,22 @@ if (!class_exists('TCPDF', false)) { } // print text if ($style['text']) { + if (isset($style['label']) AND !$this->empty_string($style['label'])) { + $label = $style['label']; + } else { + $label = $code; + } $txtwidth = ($arrcode['maxw'] * $xres); - if ($this->GetStringWidth($code) > $txtwidth) { + if ($this->GetStringWidth($label) > $txtwidth) { $style['stretchtext'] = 2; } // print text $this->x = $xpos_text; $this->y = $y + $vpadding + $barh; - $cmargin = $this->cMargin; - $this->cMargin = 0; - $this->Cell($txtwidth, '', $code, 0, 0, 'C', 0, '', $style['stretchtext'], false, 'T', 'T'); - $this->cMargin = $cmargin; + $cellpadding = $this->cell_padding; + $this->SetCellPadding(0); + $this->Cell($txtwidth, '', $label, 0, 0, 'C', 0, '', $style['stretchtext'], false, 'T', 'T'); + $this->cell_padding = $cellpadding; } // restore original direction $this->rtl = $tempRTL; @@ -16561,7 +16942,11 @@ if (!class_exists('TCPDF', false)) {
  • $ret['bottom'] = bottom margin
  • $ret['header'] = header margin
  • $ret['footer'] = footer margin
  • -
  • $ret['cell'] = cell margin
  • +
  • $ret['cell'] = cell padding array
  • +
  • $ret['padding_left'] = cell left padding
  • +
  • $ret['padding_top'] = cell top padding
  • +
  • $ret['padding_right'] = cell right padding
  • +
  • $ret['padding_bottom'] = cell bottom padding
  • * * @return array containing all margins measures * @access public @@ -16575,7 +16960,11 @@ if (!class_exists('TCPDF', false)) { 'bottom' => $this->bMargin, 'header' => $this->header_margin, 'footer' => $this->footer_margin, - 'cell' => $this->cMargin, + 'cell' => $this->cell_padding, + 'padding_left' => $this->cell_padding['L'], + 'padding_top' => $this->cell_padding['T'], + 'padding_right' => $this->cell_padding['R'], + 'padding_bottom' => $this->cell_padding['B'] ); return $ret; } @@ -17025,9 +17414,216 @@ if (!class_exists('TCPDF', false)) { return $border; } + /** + * Get the internal Cell padding from CSS attribute. + * @param string $csspadding padding properties + * @param float $width width of the containing element + * @access public + * @since 5.9.000 (2010-10-04) + */ + public function getCSSPadding($csspadding, $width=0) { + $padding = preg_split('/[\s]+/', trim($csspadding)); + $cell_padding = array(); // value to be returned + switch (count($padding)) { + case 4: { + $cell_padding['T'] = $padding[0]; + $cell_padding['R'] = $padding[1]; + $cell_padding['B'] = $padding[2]; + $cell_padding['L'] = $padding[3]; + break; + } + case 3: { + $cell_padding['T'] = $padding[0]; + $cell_padding['R'] = $padding[1]; + $cell_padding['B'] = $padding[2]; + $cell_padding['L'] = $padding[1]; + break; + } + case 2: { + $cell_padding['T'] = $padding[0]; + $cell_padding['R'] = $padding[1]; + $cell_padding['B'] = $padding[0]; + $cell_padding['L'] = $padding[1]; + break; + } + case 1: { + $cell_padding['T'] = $padding[0]; + $cell_padding['R'] = $padding[0]; + $cell_padding['B'] = $padding[0]; + $cell_padding['L'] = $padding[0]; + break; + } + default: { + return $this->cell_padding; + } + } + if ($width == 0) { + $width = $this->w - $this->lMargin - $this->rMargin; + } + $cell_padding['T'] = $this->getHTMLUnitToUnits($cell_padding['T'], $width, 'px', false); + $cell_padding['R'] = $this->getHTMLUnitToUnits($cell_padding['R'], $width, 'px', false); + $cell_padding['B'] = $this->getHTMLUnitToUnits($cell_padding['B'], $width, 'px', false); + $cell_padding['L'] = $this->getHTMLUnitToUnits($cell_padding['L'], $width, 'px', false); + return $cell_padding; + } + + /** + * Get the internal Cell margin from CSS attribute. + * @param string $cssmargin margin properties + * @param float $width width of the containing element + * @access public + * @since 5.9.000 (2010-10-04) + */ + public function getCSSMargin($cssmargin, $width=0) { + $margin = preg_split('/[\s]+/', trim($cssmargin)); + $cell_margin = array(); // value to be returned + switch (count($margin)) { + case 4: { + $cell_margin['T'] = $margin[0]; + $cell_margin['R'] = $margin[1]; + $cell_margin['B'] = $margin[2]; + $cell_margin['L'] = $margin[3]; + break; + } + case 3: { + $cell_margin['T'] = $margin[0]; + $cell_margin['R'] = $margin[1]; + $cell_margin['B'] = $margin[2]; + $cell_margin['L'] = $margin[1]; + break; + } + case 2: { + $cell_margin['T'] = $margin[0]; + $cell_margin['R'] = $margin[1]; + $cell_margin['B'] = $margin[0]; + $cell_margin['L'] = $margin[1]; + break; + } + case 1: { + $cell_margin['T'] = $margin[0]; + $cell_margin['R'] = $margin[0]; + $cell_margin['B'] = $margin[0]; + $cell_margin['L'] = $margin[0]; + break; + } + default: { + return $this->cell_margin; + } + } + if ($width == 0) { + $width = $this->w - $this->lMargin - $this->rMargin; + } + $cell_margin['T'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['T']), $width, 'px', false); + $cell_margin['R'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['R']), $width, 'px', false); + $cell_margin['B'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['B']), $width, 'px', false); + $cell_margin['L'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['L']), $width, 'px', false); + return $cell_margin; + } + + /** + * Returns the letter-spacing value from CSS value + * @param string $spacing letter-spacing value + * @param float $parent kerning value of the parent element + * @return float quantity to increases or decreases the space between characters in a text. + * @access protected + * @since 5.9.000 (2010-10-02) + */ + protected function getCSSFontSpacing($spacing, $parent=0) { + $val = 0; // value to be returned + $spacing = trim($spacing); + switch ($spacing) { + case 'normal': { + $val = 0; + break; + } + case 'inherit': { + if ($parent == 'normal') { + $val = 0; + } else { + $val = $parent; + } + break; + } + default: { + $val = $this->getHTMLUnitToUnits($spacing, 0, 'px', false); + } + } + return $val; + } + + /** + * Returns the percentage of font stretching from CSS value + * @param string $stretch stretch mode + * @param float $parent stretch value of the parent element + * @return float font stretching percentage + * @access protected + * @since 5.9.000 (2010-10-02) + */ + protected function getCSSFontStretching($stretch, $parent=100) { + $val = 100; // value to be returned + $stretch = trim($stretch); + switch ($stretch) { + case 'ultra-condensed': { + $val = 40; + break; + } + case 'extra-condensed': { + $val = 55; + break; + } + case 'condensed': { + $val = 70; + break; + } + case 'semi-condensed': { + $val = 85; + break; + } + case 'normal': { + $val = 100; + break; + } + case 'semi-expanded': { + $val = 115; + break; + } + case 'expanded': { + $val = 130; + break; + } + case 'extra-expanded': { + $val = 145; + break; + } + case 'ultra-expanded': { + $val = 160; + break; + } + case 'wider': { + $val = $parent + 10; + break; + } + case 'narrower': { + $val = $parent - 10; + break; + } + case 'inherit': { + if ($parent == 'normal') { + $val = 100; + } else { + $val = $parent; + } + break; + } + default: { + $val = $this->getHTMLUnitToUnits($stretch, 100, '%', false); + } + } + return $val; + } + /** * Returns the HTML DOM array. - *
    • $dom[$key]['tag'] = true if tag, false otherwise;
    • $dom[$key]['value'] = tag name or text;
    • $dom[$key]['opening'] = true if opening tag, false otherwise;
    • $dom[$key]['attribute'] = array of attributes (attribute name is the key);
    • $dom[$key]['style'] = array of style attributes (attribute name is the key);
    • $dom[$key]['parent'] = id of parent element;
    • $dom[$key]['fontname'] = font family name;
    • $dom[$key]['fontstyle'] = font style;
    • $dom[$key]['fontsize'] = font size in points;
    • $dom[$key]['bgcolor'] = RGB array of background color;
    • $dom[$key]['fgcolor'] = RGB array of foreground color;
    • $dom[$key]['width'] = width in pixels;
    • $dom[$key]['height'] = height in pixels;
    • $dom[$key]['align'] = text alignment;
    • $dom[$key]['cols'] = number of colums in table;
    • $dom[$key]['rows'] = number of rows in table;
    * @param string $html html code * @return array * @access protected @@ -17182,6 +17778,8 @@ if (!class_exists('TCPDF', false)) { $dom[$key]['fontname'] = $this->FontFamily; $dom[$key]['fontstyle'] = $this->FontStyle; $dom[$key]['fontsize'] = $this->FontSizePt; + $dom[$key]['font-stretch'] = 100; + $dom[$key]['letter-spacing'] = 0; $dom[$key]['stroke'] = $this->textstrokewidth; $dom[$key]['fill'] = (($this->textrendermode % 2) == 0); $dom[$key]['clip'] = ($this->textrendermode > 3); @@ -17232,6 +17830,8 @@ if (!class_exists('TCPDF', false)) { $dom[$key]['fontname'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontname']; $dom[$key]['fontstyle'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontstyle']; $dom[$key]['fontsize'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontsize']; + $dom[$key]['font-stretch'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['font-stretch']; + $dom[$key]['letter-spacing'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['letter-spacing']; $dom[$key]['stroke'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['stroke']; $dom[$key]['fill'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fill']; $dom[$key]['clip'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['clip']; @@ -17306,6 +17906,8 @@ if (!class_exists('TCPDF', false)) { $dom[$key]['fontname'] = $dom[$parentkey]['fontname']; $dom[$key]['fontstyle'] = $dom[$parentkey]['fontstyle']; $dom[$key]['fontsize'] = $dom[$parentkey]['fontsize']; + $dom[$key]['font-stretch'] = $dom[$parentkey]['font-stretch']; + $dom[$key]['letter-spacing'] = $dom[$parentkey]['letter-spacing']; $dom[$key]['stroke'] = $dom[$parentkey]['stroke']; $dom[$key]['fill'] = $dom[$parentkey]['fill']; $dom[$key]['clip'] = $dom[$parentkey]['clip']; @@ -17405,6 +18007,14 @@ if (!class_exists('TCPDF', false)) { } } } + // font-stretch + if (isset($dom[$key]['style']['font-stretch'])) { + $dom[$key]['font-stretch'] = $this->getCSSFontStretching($dom[$key]['style']['font-stretch'], $dom[$parentkey]['font-stretch']); + } + // letter-spacing + if (isset($dom[$key]['style']['letter-spacing'])) { + $dom[$key]['letter-spacing'] = $this->getCSSFontSpacing($dom[$key]['style']['letter-spacing'], $dom[$parentkey]['letter-spacing']); + } // line-height if (isset($dom[$key]['style']['line-height'])) { $lineheight = trim($dom[$key]['style']['line-height']); @@ -17544,8 +18154,8 @@ if (!class_exists('TCPDF', false)) { } } } - $borderside = array('L' => 'left', 'R' => 'right', 'T' => 'top', 'B' => 'bottom'); - foreach ($borderside as $bsk => $bsv) { + $cellside = array('L' => 'left', 'R' => 'right', 'T' => 'top', 'B' => 'bottom'); + foreach ($cellside as $bsk => $bsv) { if (isset($dom[$key]['style']['border-'.$bsv])) { $borderstyle = $this->getCSSBorderStyle($dom[$key]['style']['border-'.$bsv]); if (!empty($borderstyle)) { @@ -17565,6 +18175,28 @@ if (!class_exists('TCPDF', false)) { } } } + // check for CSS padding properties + if (isset($dom[$key]['style']['padding'])) { + $dom[$key]['padding'] = $this->getCSSPadding($dom[$key]['style']['padding']); + } else { + $dom[$key]['padding'] = $this->cell_padding; + } + foreach ($cellside as $psk => $psv) { + if (isset($dom[$key]['style']['padding-'.$psv])) { + $dom[$key]['padding'][$psk] = $this->getHTMLUnitToUnits($dom[$key]['style']['padding-'.$psv], 0, 'px', false); + } + } + // check for CSS margin properties + if (isset($dom[$key]['style']['margin'])) { + $dom[$key]['margin'] = $this->getCSSMargin($dom[$key]['style']['margin']); + } else { + $dom[$key]['margin'] = $this->cell_margin; + } + foreach ($cellside as $psk => $psv) { + if (isset($dom[$key]['style']['margin-'.$psv])) { + $dom[$key]['margin'][$psk] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $dom[$key]['style']['margin-'.$psv]), 0, 'px', false); + } + } // page-break-inside if (isset($dom[$key]['style']['page-break-inside']) AND ($dom[$key]['style']['page-break-inside'] == 'avoid')) { $dom[$key]['attribute']['nobr'] = 'true'; @@ -17795,13 +18427,15 @@ if (!class_exists('TCPDF', false)) { * @param boolean $ln if true add a new line after text (default = true) * @param boolean $fill Indicates if the background must be painted (true) or transparent (false). * @param boolean $reseth if true reset the last cell height (default false). - * @param boolean $cell if true add the default cMargin space to each Write (default false). + * @param boolean $cell if true add the current left (or right for RTL) padding to each Write (default false). * @param string $align Allows to center or align the text. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    * @access public */ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') { $gvars = $this->getGraphicVars(); // store current values + $prev_cell_margin = $this->cell_margin; + $prev_cell_padding = $this->cell_padding; $prevPage = $this->page; $prevlMargin = $this->lMargin; $prevrMargin = $this->rMargin; @@ -17810,6 +18444,8 @@ if (!class_exists('TCPDF', false)) { $curfontsize = $this->FontSizePt; $curfontascent = $this->getFontAscent($curfontname, $curfontstyle, $curfontsize); $curfontdescent = $this->getFontDescent($curfontname, $curfontstyle, $curfontsize); + $curfontstretcing = $this->font_stretching; + $curfontkerning = $this->font_spacing; $this->newline = true; $newline = true; $startlinepage = $this->page; @@ -17824,12 +18460,18 @@ if (!class_exists('TCPDF', false)) { $undo = false; $fontaligned = false; $this->premode = false; - if (isset($this->PageAnnots[$this->page])) { + if ($this->inxobj) { + // we are inside an XObject template + $pask = count($this->xobjects[$this->xobjid]['annotations']); + } elseif (isset($this->PageAnnots[$this->page])) { $pask = count($this->PageAnnots[$this->page]); } else { $pask = 0; } - if (!$this->InFooter) { + if ($this->inxobj) { + // we are inside an XObject template + $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); + } elseif (!$this->InFooter) { if (isset($this->footerlen[$this->page])) { $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; } else { @@ -17837,6 +18479,7 @@ if (!class_exists('TCPDF', false)) { } $startlinepos = $this->footerpos[$this->page]; } else { + // we are inside the footer $startlinepos = $this->pagelen[$this->page]; } $lalign = $align; @@ -17846,14 +18489,14 @@ if (!class_exists('TCPDF', false)) { } else { $w = $this->w - $this->rMargin - $this->x; } - $w -= (2 * $this->cMargin); + $w -= ($this->cell_padding['L'] + $this->cell_padding['R']); if ($cell) { if ($this->rtl) { - $this->x -= $this->cMargin; - $this->lMargin += $this->cMargin; + $this->x -= $this->cell_padding['R']; + $this->lMargin += $this->cell_padding['R']; } else { - $this->x += $this->cMargin; - $this->rMargin += $this->cMargin; + $this->x += $this->cell_padding['L']; + $this->rMargin += $this->cell_padding['L']; } } if ($this->customlistindent >= 0) { @@ -17873,8 +18516,8 @@ if (!class_exists('TCPDF', false)) { $this->listcount = array(); $this->lispacer = ''; if (($this->empty_string($this->lasth)) OR ($reseth)) { - //set row height - $this->lasth = $this->FontSize * $this->cell_height_ratio; + // reset row height + $this->resetLastH(); } $dom = $this->getHtmlDomArray($html); $maxel = count($dom); @@ -17907,6 +18550,8 @@ if (!class_exists('TCPDF', false)) { $this_method_vars['align'] = $align; $this_method_vars['gvars'] = $gvars; $this_method_vars['prevPage'] = $prevPage; + $this_method_vars['prev_cell_margin'] = $prev_cell_margin; + $this_method_vars['prev_cell_padding'] = $prev_cell_padding; $this_method_vars['prevlMargin'] = $prevlMargin; $this_method_vars['prevrMargin'] = $prevrMargin; $this_method_vars['curfontname'] = $curfontname; @@ -17914,6 +18559,8 @@ if (!class_exists('TCPDF', false)) { $this_method_vars['curfontsize'] = $curfontsize; $this_method_vars['curfontascent'] = $curfontascent; $this_method_vars['curfontdescent'] = $curfontdescent; + $this_method_vars['curfontstretcing'] = $curfontstretcing; + $this_method_vars['curfontkerning'] = $curfontkerning; $this_method_vars['minstartliney'] = $minstartliney; $this_method_vars['maxbottomliney'] = $maxbottomliney; $this_method_vars['yshift'] = $yshift; @@ -17999,8 +18646,8 @@ if (!class_exists('TCPDF', false)) { $autolinebreak = false; if (isset($dom[$key]['width']) AND ($dom[$key]['width'] > 0)) { $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], 1, 'px', false); - if (($this->rtl AND (($this->x - $imgw) < ($this->lMargin + $this->cMargin))) - OR (!$this->rtl AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cMargin)))) { + if (($this->rtl AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) + OR (!$this->rtl AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R'])))) { // add automatic line break $autolinebreak = true; $this->Ln('', $cell); @@ -18133,7 +18780,8 @@ if (!class_exists('TCPDF', false)) { $fontaligned = true; } $this->SetFont($fontname, $fontstyle, $fontsize); - $this->lasth = $this->FontSize * $this->cell_height_ratio; + // reset row height + $this->resetLastH(); $curfontname = $fontname; $curfontstyle = $fontstyle; $curfontsize = $fontsize; @@ -18146,6 +18794,12 @@ if (!class_exists('TCPDF', false)) { $textfill = isset($dom[$key]['fill']) ? $dom[$key]['fill'] : (($this->textrendermode % 2) == 0); $textclip = isset($dom[$key]['clip']) ? $dom[$key]['clip'] : ($this->textrendermode > 3); $this->setTextRenderingMode($textstroke, $textfill, $textclip); + if (isset($dom[$key]['font-stretch']) AND ($dom[$key]['font-stretch'] !== false)) { + $this->setFontStretching($dom[$key]['font-stretch']); + } + if (isset($dom[$key]['letter-spacing']) AND ($dom[$key]['letter-spacing'] !== false)) { + $this->setFontSpacing($dom[$key]['letter-spacing']); + } if (($plalign == 'J') AND $dom[$key]['block']) { $plalign = ''; } @@ -18183,30 +18837,47 @@ if (!class_exists('TCPDF', false)) { $t_x = 0; // the last line must be shifted to be aligned as requested $linew = abs($this->endlinex - $startlinex); - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; + if ($this->inxobj) { + // we are inside an XObject template + $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); + if (isset($opentagpos)) { + $midpos = $opentagpos; + } else { + $midpos = 0; + } + if ($midpos > 0) { + $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); + $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); + } else { + $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); + $pend = ''; + } } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; + $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); + if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { + $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; + $midpos = min($opentagpos, $this->footerpos[$startlinepage]); + } elseif (isset($opentagpos)) { + $midpos = $opentagpos; + } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { + $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; + $midpos = $this->footerpos[$startlinepage]; + } else { + $midpos = 0; + } + if ($midpos > 0) { + $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); + $pend = substr($this->getPageBuffer($startlinepage), $midpos); + } else { + $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); + $pend = ''; + } } if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { // calculate shifting amount $tw = $w; if (($plalign == 'J') AND $this->isRTLTextDir() AND ($this->num_columns > 1)) { - $tw += $this->cMargin; + $tw += $this->cell_padding['R']; } if ($this->lMargin != $prevlMargin) { $tw += ($prevlMargin - $this->lMargin); @@ -18299,6 +18970,11 @@ if (!class_exists('TCPDF', false)) { // calculate additional space to add to each existing space $spacewidth = ($mdiff / ($ns - $no)) * $this->k; $spacewidthu = -1000 * ($mdiff + (($ns + $no) * $one_space_width)) / $ns / $this->FontSize; + if ($this->font_spacing != 0) { + // fixed kerning mode + $osw = -1000 * $this->font_spacing / $this->FontSize; + $spacewidthu += $osw; + } $nsmax = $ns; $ns = 0; reset($lnstring); @@ -18429,9 +19105,22 @@ if (!class_exists('TCPDF', false)) { } } // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - $cxpos = ($currentxpos / $this->k); - $lmpos = ($this->lMargin + $this->cMargin + $this->feps); + $cxpos = ($currentxpos / $this->k); + $lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps); + if ($this->inxobj) { + // we are inside an XObject template + foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { + if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { + if ($cxpos > $lmpos) { + $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k); + $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); + } else { + $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); + } + break; + } + } + } elseif (isset($this->PageAnnots[$this->page])) { foreach ($this->PageAnnots[$this->page] as $pak => $pac) { if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { if ($cxpos > $lmpos) { @@ -18450,6 +19139,10 @@ if (!class_exists('TCPDF', false)) { if ($this->isUnicodeFont()) { // multibyte characters $spacew = $spacewidthu; + if ($this->font_stretching != 100) { + // word spacing is affected by stretching + $spacew /= ($this->font_stretching / 100); + } $pmidtemp = $pmid; // escape special characters $pmidtemp = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmidtemp); @@ -18459,13 +19152,27 @@ if (!class_exists('TCPDF', false)) { $matches[1] = str_replace("#!#OP#!#", "(", $matches[1]); $matches[1] = str_replace("#!#CP#!#", ")", $matches[1]); return "[(".str_replace(chr(0).chr(32), ") ".sprintf("%.3F", $spacew)." (", $matches[1]).")]";'), $pmidtemp); - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\n".$pend); + if ($this->inxobj) { + // we are inside an XObject template + $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\n".$pend; + } else { + $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\n".$pend); + } $endlinepos = strlen($pstart."\n".$pmid."\n"); } else { // non-unicode (single-byte characters) + if ($this->font_stretching != 100) { + // word spacing (Tw) is affected by stretching + $spacewidth /= ($this->font_stretching / 100); + } $rs = sprintf('%.3F Tw', $spacewidth); $pmid = preg_replace("/\[\(/x", $rs.' [(', $pmid); - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend); + if ($this->inxobj) { + // we are inside an XObject template + $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend; + } else { + $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend); + } $endlinepos = strlen($pstart."\n".$pmid."\nBT 0 Tw ET\n"); } } @@ -18474,14 +19181,26 @@ if (!class_exists('TCPDF', false)) { if (($t_x != 0) OR ($yshift < 0)) { // shift the line $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k)); - $this->setPageBuffer($startlinepage, $pstart."\nq\n".$trx."\n".$pmid."\nQ\n".$pend); - $endlinepos = strlen($pstart."\nq\n".$trx."\n".$pmid."\nQ\n"); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { + $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; + $endlinepos = strlen($pstart); + if ($this->inxobj) { + // we are inside an XObject template + $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; + foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; + $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; + $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; + } + } + } else { + $this->setPageBuffer($startlinepage, $pstart.$pend); + // shift the annotations and links + if (isset($this->PageAnnots[$this->page])) { + foreach ($this->PageAnnots[$this->page] as $pak => $pac) { + if ($pak >= $pask) { + $this->PageAnnots[$this->page][$pak]['x'] += $t_x; + $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; + } } } } @@ -18504,7 +19223,10 @@ if (!class_exists('TCPDF', false)) { if (isset($endlinepos) AND (!$pbrk)) { $startlinepos = $endlinepos; } else { - if (!$this->InFooter) { + if ($this->inxobj) { + // we are inside an XObject template + $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); + } elseif (!$this->InFooter) { if (isset($this->footerlen[$this->page])) { $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; } else { @@ -18592,13 +19314,13 @@ if (!class_exists('TCPDF', false)) { $tdborder = $dom[$key]['border']; } $colspan = $dom[$key]['attribute']['colspan']; - $oldmargin = $this->cMargin; + $old_cell_padding = $this->cell_padding; if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) { - $currentcmargin = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px'); + $current_cell_padding = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px'); } else { - $currentcmargin = 0; + $current_cell_padding = 0; } - $this->cMargin = $currentcmargin; + $this->SetCellPadding($current_cell_padding); if (isset($dom[$key]['height'])) { // minimum cell height $cellh = $this->getHTMLUnitToUnits($dom[$key]['height'], 0, 'px'); @@ -18665,8 +19387,8 @@ if (!class_exists('TCPDF', false)) { } } if (($trwsp['rowspan'] > 0) - AND ($rsstartx > ($this->x - $cellspacing - $currentcmargin - $this->feps)) - AND ($rsstartx < ($this->x + $cellspacing + $currentcmargin + $this->feps)) + AND ($rsstartx > ($this->x - $cellspacing - $current_cell_padding - $this->feps)) + AND ($rsstartx < ($this->x + $cellspacing + $current_cell_padding + $this->feps)) AND (($trwsp['starty'] < ($this->y - $this->feps)) OR ($trwsp['startpage'] < $this->page) OR ($trwsp['startcolumn'] < $this->current_column))) { // set the starting X position of the current cell $this->x = $rsendx + $cellspacingx; @@ -18729,13 +19451,13 @@ if (!class_exists('TCPDF', false)) { $this->colxshift['x'] = $this->x - $this->lMargin; } $this->colxshift['s'] = $cellspacing; - $this->colxshift['p'] = $currentcmargin; + $this->colxshift['p'] = $current_cell_padding; // ****** write the cell content ****** $this->MultiCell($cellw, $cellh, $cell_content, false, $lalign, false, 2, '', '', true, 0, true); // restore some values $this->colxshift = array('x' => 0, 's' => 0, 'p' => 0); $this->lasth = $prevLastH; - $this->cMargin = $oldmargin; + $this->cell_padding = $old_cell_padding; $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x; // update the end of row position if ($rowspan <= 1) { @@ -18787,7 +19509,10 @@ if (!class_exists('TCPDF', false)) { } else { // opening tag (or self-closing tag) if (!isset($opentagpos)) { - if (!$this->InFooter) { + if ($this->inxobj) { + // we are inside an XObject template + $opentagpos = strlen($this->xobjects[$this->xobjid]['outdata']); + } elseif (!$this->InFooter) { if (isset($this->footerlen[$this->page])) { $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; } else { @@ -18813,12 +19538,12 @@ if (!class_exists('TCPDF', false)) { // print list-item if (!$this->empty_string($this->lispacer) AND ($this->lispacer != '^')) { $this->SetFont($pfontname, $pfontstyle, $pfontsize); - $this->lasth = $this->FontSize * $this->cell_height_ratio; + $this->resetLastH(); $minstartliney = $this->y; $maxbottomliney = ($startliney + ($this->FontSize * $this->cell_height_ratio)); $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize); $this->SetFont($curfontname, $curfontstyle, $curfontsize); - $this->lasth = $this->FontSize * $this->cell_height_ratio; + $this->resetLastH(); if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) { $pfontascent = $this->getFontAscent($pfontname, $pfontstyle, $pfontsize); $pfontdescent = $this->getFontDescent($pfontname, $pfontstyle, $pfontsize); @@ -18913,9 +19638,9 @@ if (!class_exists('TCPDF', false)) { $dom[$key]['value'] = $strrest; if ($cell) { if ($this->rtl) { - $this->x -= $this->cMargin; + $this->x -= $this->cell_padding['R']; } else { - $this->x += $this->cMargin; + $this->x += $this->cell_padding['L']; } } if ($loop < 3) { @@ -18954,24 +19679,41 @@ if (!class_exists('TCPDF', false)) { $t_x = 0; // the last line must be shifted to be aligned as requested $linew = abs($this->endlinex - $startlinex); - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; + if ($this->inxobj) { + // we are inside an XObject template + $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); + if (isset($opentagpos)) { + $midpos = $opentagpos; + } else { + $midpos = 0; + } + if ($midpos > 0) { + $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); + $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); + } else { + $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); + $pend = ''; + } } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; + $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); + if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { + $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; + $midpos = min($opentagpos, $this->footerpos[$startlinepage]); + } elseif (isset($opentagpos)) { + $midpos = $opentagpos; + } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { + $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; + $midpos = $this->footerpos[$startlinepage]; + } else { + $midpos = 0; + } + if ($midpos > 0) { + $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); + $pend = substr($this->getPageBuffer($startlinepage), $midpos); + } else { + $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); + $pend = ''; + } } if ((isset($plalign) AND ((($plalign == 'C') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { // calculate shifting amount @@ -19041,14 +19783,26 @@ if (!class_exists('TCPDF', false)) { if (($t_x != 0) OR ($yshift < 0)) { // shift the line $trx = sprintf('1 0 0 1 %.3F %.3F cm', ($t_x * $this->k), ($yshift * $this->k)); - $this->setPageBuffer($startlinepage, $pstart."\nq\n".$trx."\n".$pmid."\nQ\n".$pend); - $endlinepos = strlen($pstart."\nq\n".$trx."\n".$pmid."\nQ\n"); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { + $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; + $endlinepos = strlen($pstart); + if ($this->inxobj) { + // we are inside an XObject template + $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; + foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; + $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; + $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; + } + } + } else { + $this->setPageBuffer($startlinepage, $pstart.$pend); + // shift the annotations and links + if (isset($this->PageAnnots[$this->page])) { + foreach ($this->PageAnnots[$this->page] as $pak => $pac) { + if ($pak >= $pask) { + $this->PageAnnots[$this->page][$pak]['x'] += $t_x; + $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; + } } } } @@ -19082,7 +19836,7 @@ if (!class_exists('TCPDF', false)) { * Process opening tags. * @param array $dom html dom array * @param int $key current element id - * @param boolean $cell if true add the default cMargin space to each new line (default false). + * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). * @access protected */ protected function openHTMLTagHandler(&$dom, $key, $cell) { @@ -19135,7 +19889,7 @@ if (!class_exists('TCPDF', false)) { $this->thead = $dom[$key]['thead']; if (!isset($this->theadMargins) OR (empty($this->theadMargins))) { $this->theadMargins = array(); - $this->theadMargins['cmargin'] = $this->cMargin; + $this->theadMargins['cell_padding'] = $this->cell_padding; $this->theadMargins['lmargin'] = $this->lMargin; $this->theadMargins['rmargin'] = $this->rMargin; $this->theadMargins['page'] = $this->page; @@ -19143,9 +19897,10 @@ if (!class_exists('TCPDF', false)) { } } // store current margins and page - $dom[$key]['oldcmargin'] = $this->cMargin; + $dom[$key]['old_cell_padding'] = $this->cell_padding; if (isset($tag['attribute']['cellpadding'])) { - $this->cMargin = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px'); + $pad = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px'); + $this->SetCellPadding($pad); } if (isset($tag['attribute']['cellspacing'])) { $cs = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px'); @@ -19174,7 +19929,7 @@ if (!class_exists('TCPDF', false)) { $y = $this->GetY(); $wtmp = $this->w - $this->lMargin - $this->rMargin; if ($cell) { - $wtmp -= 2 * $this->cMargin; + $wtmp -= ($this->cell_padding['L'] + $this->cell_padding['R']); } if ((isset($tag['width'])) AND ($tag['width'] != '')) { $hrWidth = $this->getHTMLUnitToUnits($tag['width'], $wtmp, 'px'); @@ -19682,7 +20437,7 @@ if (!class_exists('TCPDF', false)) { * Process closing tags. * @param array $dom html dom array * @param int $key current element id - * @param boolean $cell if true add the default cMargin space to each new line (default false). + * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). * @param int $maxbottomliney maximum y value of current line * @access protected */ @@ -20002,19 +20757,35 @@ if (!class_exists('TCPDF', false)) { } if ($cborder OR $fill) { // draw border and fill - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = &$this->footerpos[$this->page]; + if ($this->inxobj) { + // we are inside an XObject template + if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { + $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); + $pagemark = &$this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; + } else { + $pagemark = &$this->xobjects[$this->xobjid]['intmrk']; + } + $pagebuff = $this->xobjects[$this->xobjid]['outdata']; + $pstart = substr($pagebuff, 0, $pagemark); + $pend = substr($pagebuff, $pagemark); + $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; + $pagemark += strlen($ccode); } else { - $pagemark = &$this->intmrk[$this->page]; + // draw border and fill + if (end($this->transfmrk[$this->page]) !== false) { + $pagemarkkey = key($this->transfmrk[$this->page]); + $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; + } elseif ($this->InFooter) { + $pagemark = &$this->footerpos[$this->page]; + } else { + $pagemark = &$this->intmrk[$this->page]; + } + $pagebuff = $this->getPageBuffer($this->page); + $pstart = substr($pagebuff, 0, $pagemark); + $pend = substr($pagebuff, $pagemark); + $this->setPageBuffer($this->page, $pstart.$ccode.$pend); + $pagemark += strlen($ccode); } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - $pagemark += strlen($ccode); } } // end for each page // restore default border @@ -20035,8 +20806,9 @@ if (!class_exists('TCPDF', false)) { } } if (!$in_table_head) { // we are not inside a thead section - $this->cMargin = $table_el['oldcmargin']; - $this->lasth = $this->FontSize * $this->cell_height_ratio; + $this->cell_padding = $table_el['old_cell_padding']; + // reset row height + $this->resetLastH(); if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages]) AND ($this->emptypagemrk[$this->numpages] == $this->pagelen[$this->numpages])) { // remove last blank page $this->deletePage($this->numpages); @@ -20098,7 +20870,7 @@ if (!class_exists('TCPDF', false)) { } else { $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); } - $this->lasth = $this->FontSize * $this->cell_height_ratio; + $this->resetLastH(); break; } case 'dt': { @@ -20133,7 +20905,7 @@ if (!class_exists('TCPDF', false)) { } else { $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); } - $this->lasth = $this->FontSize * $this->cell_height_ratio; + $this->resetLastH(); break; } case 'li': { @@ -20182,7 +20954,7 @@ if (!class_exists('TCPDF', false)) { * Add vertical spaces if needed. * @param string $hbz Distance between current y and line bottom. * @param string $hb The height of the break. - * @param boolean $cell if true add the default cMargin space to each new line (default false). + * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). * @param boolean $firsttag set to true when the tag is the first. * @param boolean $lasttag set to true when the tag is the last. * @access protected @@ -20374,22 +21146,37 @@ if (!class_exists('TCPDF', false)) { } if ($cborder OR $fill) { // draw border and fill - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = &$this->footerpos[$this->page]; + if ($this->inxobj) { + // we are inside an XObject template + if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { + $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); + $pagemark = &$this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; + } else { + $pagemark = &$this->xobjects[$this->xobjid]['intmrk']; + } + $pagebuff = $this->xobjects[$this->xobjid]['outdata']; + $pstart = substr($pagebuff, 0, $pagemark); + $pend = substr($pagebuff, $pagemark); + $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; + $pagemark += strlen($ccode); } else { - $pagemark = &$this->intmrk[$this->page]; + if (end($this->transfmrk[$this->page]) !== false) { + $pagemarkkey = key($this->transfmrk[$this->page]); + $pagemark = &$this->transfmrk[$this->page][$pagemarkkey]; + } elseif ($this->InFooter) { + $pagemark = &$this->footerpos[$this->page]; + } else { + $pagemark = &$this->intmrk[$this->page]; + } + $pagebuff = $this->getPageBuffer($this->page); + $pstart = substr($pagebuff, 0, $this->bordermrk[$this->page]); + $pend = substr($pagebuff, $this->bordermrk[$this->page]); + $this->setPageBuffer($this->page, $pstart.$ccode.$pend); + $offsetlen = strlen($ccode); + $this->bordermrk[$this->page] += $offsetlen; + $this->cntmrk[$this->page] += $offsetlen; + $pagemark += $offsetlen; } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $this->bordermrk[$this->page]); - $pend = substr($pagebuff, $this->bordermrk[$this->page]); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - $offsetlen = strlen($ccode); - $this->bordermrk[$this->page] += $offsetlen; - $this->cntmrk[$this->page] += $offsetlen; - $pagemark += $offsetlen; } } // end for each page if (isset($old_bgcolor)) { @@ -20829,7 +21616,8 @@ if (!class_exists('TCPDF', false)) { 'FontSizePt' => $this->FontSizePt, 'rMargin' => $this->rMargin, 'lMargin' => $this->lMargin, - 'cMargin' => $this->cMargin, + 'cell_padding' => $this->cell_padding, + 'cell_margin' => $this->cell_margin, 'LineWidth' => $this->LineWidth, 'linestyleWidth' => $this->linestyleWidth, 'linestyleCap' => $this->linestyleCap, @@ -20851,6 +21639,8 @@ if (!class_exists('TCPDF', false)) { 'listcount' => $this->listcount, 'lispacer' => $this->lispacer, 'cell_height_ratio' => $this->cell_height_ratio, + 'font_stretching' => $this->font_stretching, + 'font_spacing' => $this->font_spacing, // extended 'lasth' => $this->lasth, 'tMargin' => $this->tMargin, @@ -20885,7 +21675,8 @@ if (!class_exists('TCPDF', false)) { $this->FontSizePt = $gvars['FontSizePt']; $this->rMargin = $gvars['rMargin']; $this->lMargin = $gvars['lMargin']; - $this->cMargin = $gvars['cMargin']; + $this->cell_padding = $gvars['cell_padding']; + $this->cell_margin = $gvars['cell_margin']; $this->LineWidth = $gvars['LineWidth']; $this->linestyleWidth = $gvars['linestyleWidth']; $this->linestyleCap = $gvars['linestyleCap']; @@ -20907,6 +21698,8 @@ if (!class_exists('TCPDF', false)) { $this->listcount = $gvars['listcount']; $this->lispacer = $gvars['lispacer']; $this->cell_height_ratio = $gvars['cell_height_ratio']; + $this->font_stretching = $gvars['font_stretching']; + $this->font_spacing = $gvars['font_spacing']; if ($extended) { // restore extended values $this->lasth = $gvars['lasth']; @@ -22549,6 +23342,8 @@ if (!class_exists('TCPDF', false)) { // store current graphic state $this->xobjects[$this->xobjid]['gvars'] = $this->getGraphicVars(); // initialize data + $this->xobjects[$this->xobjid]['intmrk'] = 0; + $this->xobjects[$this->xobjid]['transfmrk'] = array(); $this->xobjects[$this->xobjid]['outdata'] = ''; $this->xobjects[$this->xobjid]['xobjects'] = array(); $this->xobjects[$this->xobjid]['images'] = array(); @@ -22735,6 +23530,50 @@ if (!class_exists('TCPDF', false)) { } } + /** + * Set the percentage of character stretching. + * @param int $perc percentage of stretching (100 = no stretching) + * @author Nicola Asuni + * @access public + * @since 5.9.000 (2010-09-29) + */ + public function setFontStretching($perc=100) { + $this->font_stretching = $perc; + } + + /** + * Get the percentage of character stretching. + * @return float stretching value + * @author Nicola Asuni + * @access public + * @since 5.9.000 (2010-09-29) + */ + public function getFontStretching() { + return $this->font_stretching; + } + + /** + * Set the amount to increase or decrease the space between characters in a text. + * @param float $spacing amount to increase or decrease the space between characters in a text (0 = default spacing) + * @author Nicola Asuni + * @access public + * @since 5.9.000 (2010-09-29) + */ + public function setFontSpacing($spacing=0) { + $this->font_spacing = $spacing; + } + + /** + * Get the amount to increase or decrease the space between characters in a text. + * @return int kerning value + * @author Nicola Asuni + * @access public + * @since 5.9.000 (2010-09-29) + */ + public function getFontSpacing() { + return $this->font_spacing; + } + // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- // SVG METHODS // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- @@ -22944,8 +23783,8 @@ if (!class_exists('TCPDF', false)) { // store current page break mode $page_break_mode = $this->AutoPageBreak; $page_break_margin = $this->getBreakMargin(); - $cMargin = $this->cMargin; - $this->cMargin = 0; + $cell_padding = $this->cell_padding; + $this->SetCellPadding(0); $this->SetAutoPageBreak(false); // save the current graphic state $this->_out('q'.$this->epsmarker); @@ -23033,7 +23872,7 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $this->img_rb_x; // restore page break $this->SetAutoPageBreak($page_break_mode, $page_break_margin); - $this->cMargin = $cMargin; + $this->cell_padding = $cell_padding; } /** @@ -23383,13 +24222,27 @@ if (!class_exists('TCPDF', false)) { } else { $font_weight = $svgstyle['font-weight']; } + if (preg_match('/font-stretch[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { + $font_stretch = trim($regs[1]); + } else { + $font_stretch = $svgstyle['font-stretch']; + } + if (preg_match('/letter-spacing[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { + $font_spacing = trim($regs[1]); + } else { + $font_spacing = $svgstyle['letter-spacing']; + } } else { $font_family = $this->getFontFamilyName($svgstyle['font-family']); $font_size = $svgstyle['font-size']; $font_style = $svgstyle['font-style']; $font_weight = $svgstyle['font-weight']; + $font_stretch = $svgstyle['font-stretch']; + $font_spacing = $svgstyle['letter-spacing']; } $font_size = $this->getHTMLUnitToUnits($font_size, $prevsvgstyle['font-size'], $this->svgunit, false) * $this->k; + $font_stretch = $this->getCSSFontStretching($font_stretch, $svgstyle['font-stretch']); + $font_spacing = $this->getCSSFontSpacing($font_spacing, $svgstyle['letter-spacing']); switch ($font_style) { case 'italic': { $font_style = 'I'; @@ -23431,6 +24284,8 @@ if (!class_exists('TCPDF', false)) { } } $this->SetFont($font_family, $font_style, $font_size); + $this->setFontStretching($font_stretch); + $this->setFontSpacing($font_spacing); return $objstyle; }
    diff --git a/doc/li_com-tecnick-tcpdf.html b/doc/li_com-tecnick-tcpdf.html index 40ff1ac..5636005 100644 --- a/doc/li_com-tecnick-tcpdf.html +++ b/doc/li_com-tecnick-tcpdf.html @@ -67,7 +67,7 @@ This documentation was generated by phpDocumentor v1.4.3

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26625,7 +27389,7 @@ $font)
    -

    method _putviewerpreferences [line 10107]

    +

    method _putviewerpreferences [line 10456]

    diff --git a/doc/index.html b/doc/index.html index 40ff1ac..5636005 100644 --- a/doc/index.html +++ b/doc/index.html @@ -67,7 +67,7 @@ This documentation was generated by phpDocumentor v1.4.3

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    diff --git a/doc/errors.html b/doc/errors.html index 8045cd4..2b55635 100644 --- a/doc/errors.html +++ b/doc/errors.html @@ -35,7 +35,7 @@ Post-parsing

    - Documentation generated on Mon, 27 Sep 2010 20:42:57 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:59:05 +0200 by phpDocumentor 1.4.3
    @@ -26659,7 +27423,7 @@ $font)
    -

    method _putxobjects [line 9800]

    +

    method _putxobjects [line 10149]

    diff --git a/doc/elementindex_com-tecnick-tcpdf.html b/doc/elementindex_com-tecnick-tcpdf.html index 547f73e..416a7d1 100644 --- a/doc/elementindex_com-tecnick-tcpdf.html +++ b/doc/elementindex_com-tecnick-tcpdf.html @@ -313,6 +313,8 @@
    in file tcpdf.php, method TCPDF::addTOC()
        Output a Table of Content Index (TOC).
    addTOCPage
    in file tcpdf.php, method TCPDF::addTOCPage()
        Adds a new TOC (Table Of Content) page to the document.
    +
    adjustCellPadding
    +
    in file tcpdf.php, method TCPDF::adjustCellPadding()
        Adjust the internal Cell padding array to take account of the line width.
    AliasNbPages
    in file tcpdf.php, method TCPDF::AliasNbPages()
        Defines an alias for the total number of pages.
    AliasNumPage
    @@ -437,10 +439,12 @@
    in file qrcode.php, variable QRcode::$casesensitive
    $cell_height_ratio
    in file tcpdf.php, variable TCPDF::$cell_height_ratio
        Default cell height ratio.
    +
    $cell_margin
    +
    in file tcpdf.php, variable TCPDF::$cell_margin
    +
    $cell_padding
    +
    in file tcpdf.php, variable TCPDF::$cell_padding
    $clusters
    in file pdf417.php, variable PDF417::$clusters
    -
    $cMargin
    -
    in file tcpdf.php, variable TCPDF::$cMargin
    $cntmrk
    in file tcpdf.php, variable TCPDF::$cntmrk
        Array used to store content positions inside the pages buffer.
    $ColorFlag
    @@ -699,6 +703,10 @@
    in file tcpdf.php, variable TCPDF::$FontStyle
    $font_obj_ids
    in file tcpdf.php, variable TCPDF::$font_obj_ids
        Store the font object IDs.
    +
    $font_spacing
    +
    in file tcpdf.php, variable TCPDF::$font_spacing
    +
    $font_stretching
    +
    in file tcpdf.php, variable TCPDF::$font_stretching
    $font_subsetting
    in file tcpdf.php, variable TCPDF::$font_subsetting
    $footerlen
    @@ -758,12 +766,12 @@
    getBarcode
    in file tcpdf.php, method TCPDF::getBarcode()
        Get current barcode.
    getBarcodeArray
    +
    in file 2dbarcodes.php, method TCPDF2DBarcode::getBarcodeArray()
        Return an array representations of barcode.
    +
    getBarcodeArray
    in file barcodes.php, method TCPDFBarcode::getBarcodeArray()
        Return an array representations of barcode.
    getBarcodeArray
    in file qrcode.php, method QRcode::getBarcodeArray()
        Returns a barcode array which is readable by TCPDF
    getBarcodeArray
    -
    in file 2dbarcodes.php, method TCPDF2DBarcode::getBarcodeArray()
        Return an array representations of barcode.
    -
    getBarcodeArray
    in file pdf417.php, method PDF417::getBarcodeArray()
        Returns a barcode array which is readable by TCPDF
    getBitStream
    in file qrcode.php, method QRcode::getBitStream()
        Returns a stream of bits.
    @@ -783,8 +791,12 @@
    in file tcpdf.php, method TCPDF::getCellCode()
        Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
    If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
    getCellHeightRatio
    in file tcpdf.php, method TCPDF::getCellHeightRatio()
        return the height of cell repect font height.
    +
    getCellMargins
    +
    in file tcpdf.php, method TCPDF::getCellMargins()
        Get the internal Cell margin array.
    +
    getCellPaddings
    +
    in file tcpdf.php, method TCPDF::getCellPaddings()
        Get the internal Cell padding array.
    GetCharWidth
    -
    in file tcpdf.php, method TCPDF::GetCharWidth()
        Returns the length of the char in user unit for the current font.
    +
    in file tcpdf.php, method TCPDF::GetCharWidth()
        Returns the length of the char in user unit for the current font considering current stretching and kerning.
    getCode
    in file qrcode.php, method QRcode::getCode()
        Return Reed-Solomon block code.
    getColumn
    @@ -797,6 +809,14 @@
    in file tcpdf.php, method TCPDF::getCSSBorderStyle()
        Returns the border style array from CSS border properties
    getCSSBorderWidth
    in file tcpdf.php, method TCPDF::getCSSBorderWidth()
        Returns the border width from CSS property
    +
    getCSSFontSpacing
    +
    in file tcpdf.php, method TCPDF::getCSSFontSpacing()
        Returns the letter-spacing value from CSS value
    +
    getCSSFontStretching
    +
    in file tcpdf.php, method TCPDF::getCSSFontStretching()
        Returns the percentage of font stretching from CSS value
    +
    getCSSMargin
    +
    in file tcpdf.php, method TCPDF::getCSSMargin()
        Get the internal Cell margin from CSS attribute.
    +
    getCSSPadding
    +
    in file tcpdf.php, method TCPDF::getCSSPadding()
        Get the internal Cell padding from CSS attribute.
    getDataLength
    in file qrcode.php, method QRcode::getDataLength()
        Return maximum data code length (bytes) for the version.
    getECCLength
    @@ -825,6 +845,10 @@
    in file tcpdf.php, method TCPDF::getFontSizePt()
        Returns the current font size in points unit.
    getFontsList
    in file tcpdf.php, method TCPDF::getFontsList()
        Fill the list of available fonts ($this->fontlist).
    +
    getFontSpacing
    +
    in file tcpdf.php, method TCPDF::getFontSpacing()
        Get the amount to increase or decrease the space between characters in a text.
    +
    getFontStretching
    +
    in file tcpdf.php, method TCPDF::getFontStretching()
        Get the percentage of character stretching.
    getFontStyle
    in file tcpdf.php, method TCPDF::getFontStyle()
        Returns the current font style.
    getFontSubsetting
    @@ -886,7 +910,7 @@
    GetNumChars
    in file tcpdf.php, method TCPDF::GetNumChars()
        Returns the numbero of characters in a string.
    getNumLines
    -
    in file tcpdf.php, method TCPDF::getNumLines()
        This method return the estimated number of lines for print a simple text string in Multicell() method.
    +
    in file tcpdf.php, method TCPDF::getNumLines()
        This method return the estimated number of lines for print a simple text string using Multicell() method.
    getNumPages
    in file tcpdf.php, method TCPDF::getNumPages()
        Get the total number of insered pages.
    getObjFilename
    @@ -913,6 +937,8 @@
    in file tcpdf.php, method TCPDF::getPathPaintOperator()
        Get the Path-Painting Operators.
    getPDFData
    in file tcpdf.php, method TCPDF::getPDFData()
        Returns the PDF data.
    +
    getRawCharWidth
    +
    in file tcpdf.php, method TCPDF::getRawCharWidth()
        Returns the length of the char in user unit for the current font.
    getRemainder
    in file qrcode.php, method QRcode::getRemainder()
        Return the numer of remainder bits.
    getRemainingWidth
    @@ -1551,6 +1577,8 @@
    in file tcpdf.php, method TCPDF::removeSHY()
        Removes SHY characters from text.
    replaceBuffer
    in file tcpdf.php, method TCPDF::replaceBuffer()
        Replace the buffer content
    +
    resetLastH
    +
    in file tcpdf.php, method TCPDF::resetLastH()
        Reset the last cell height.
    revstrpos
    in file tcpdf.php, method TCPDF::revstrpos()
        Find position of last occurrence of a substring in a string
    rfread
    @@ -1670,19 +1698,23 @@
    SetAutoPageBreak
    in file tcpdf.php, method TCPDF::SetAutoPageBreak()
        Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.
    setBarcode
    -
    in file barcodes.php, method TCPDFBarcode::setBarcode()
        Set the barcode.
    -
    setBarcode
    in file tcpdf.php, method TCPDF::setBarcode()
        Set document barcode.
    setBarcode
    in file 2dbarcodes.php, method TCPDF2DBarcode::setBarcode()
        Set the barcode.
    +
    setBarcode
    +
    in file barcodes.php, method TCPDFBarcode::setBarcode()
        Set the barcode.
    SetBooklet
    in file tcpdf.php, method TCPDF::SetBooklet()
        Set the booklet mode for double-sided pages.
    setBuffer
    in file tcpdf.php, method TCPDF::setBuffer()
        Set buffer content (always append data).
    setCellHeightRatio
    in file tcpdf.php, method TCPDF::setCellHeightRatio()
        Set the height of the cell (line height) respect the font height.
    +
    setCellMargins
    +
    in file tcpdf.php, method TCPDF::setCellMargins()
        Set the internal Cell margins.
    SetCellPadding
    -
    in file tcpdf.php, method TCPDF::SetCellPadding()
        Set the internal Cell padding.
    +
    in file tcpdf.php, method TCPDF::SetCellPadding()
        Set the same internal Cell padding for top, right, bottom, left-
    +
    setCellPaddings
    +
    in file tcpdf.php, method TCPDF::setCellPaddings()
        Set the internal Cell paddings.
    setColumnsArray
    in file tcpdf.php, method TCPDF::setColumnsArray()
        Set columns array.
    SetCompression
    @@ -1719,6 +1751,10 @@
    in file tcpdf.php, method TCPDF::setFontBuffer()
        Set font buffer content.
    SetFontSize
    in file tcpdf.php, method TCPDF::SetFontSize()
        Defines the size of the current font.
    +
    setFontSpacing
    +
    in file tcpdf.php, method TCPDF::setFontSpacing()
        Set the amount to increase or decrease the space between characters in a text.
    +
    setFontStretching
    +
    in file tcpdf.php, method TCPDF::setFontStretching()
        Set the percentage of character stretching.
    setFontSubBuffer
    in file tcpdf.php, method TCPDF::setFontSubBuffer()
        Set font buffer content.
    setFontSubsetting
    @@ -2090,7 +2126,7 @@ top

    - Documentation generated on Mon, 27 Sep 2010 20:42:50 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:58 +0200 by phpDocumentor 1.4.3
    diff --git a/doc/elementindex.html b/doc/elementindex.html index 754d694..0d337dc 100644 --- a/doc/elementindex.html +++ b/doc/elementindex.html @@ -113,6 +113,8 @@
    in file tcpdf.php, method TCPDF::addTOC()
        Output a Table of Content Index (TOC).
    addTOCPage
    in file tcpdf.php, method TCPDF::addTOCPage()
        Adds a new TOC (Table Of Content) page to the document.
    +
    adjustCellPadding
    +
    in file tcpdf.php, method TCPDF::adjustCellPadding()
        Adjust the internal Cell padding array to take account of the line width.
    AliasNbPages
    in file tcpdf.php, method TCPDF::AliasNbPages()
        Defines an alias for the total number of pages.
    AliasNumPage
    @@ -237,10 +239,12 @@
    in file qrcode.php, variable QRcode::$casesensitive
    $cell_height_ratio
    in file tcpdf.php, variable TCPDF::$cell_height_ratio
        Default cell height ratio.
    +
    $cell_margin
    +
    in file tcpdf.php, variable TCPDF::$cell_margin
    +
    $cell_padding
    +
    in file tcpdf.php, variable TCPDF::$cell_padding
    $clusters
    in file pdf417.php, variable PDF417::$clusters
    -
    $cMargin
    -
    in file tcpdf.php, variable TCPDF::$cMargin
    $cntmrk
    in file tcpdf.php, variable TCPDF::$cntmrk
        Array used to store content positions inside the pages buffer.
    $ColorFlag
    @@ -499,6 +503,10 @@
    in file tcpdf.php, variable TCPDF::$FontStyle
    $font_obj_ids
    in file tcpdf.php, variable TCPDF::$font_obj_ids
        Store the font object IDs.
    +
    $font_spacing
    +
    in file tcpdf.php, variable TCPDF::$font_spacing
    +
    $font_stretching
    +
    in file tcpdf.php, variable TCPDF::$font_stretching
    $font_subsetting
    in file tcpdf.php, variable TCPDF::$font_subsetting
    $footerlen
    @@ -558,12 +566,12 @@
    getBarcode
    in file tcpdf.php, method TCPDF::getBarcode()
        Get current barcode.
    getBarcodeArray
    +
    in file 2dbarcodes.php, method TCPDF2DBarcode::getBarcodeArray()
        Return an array representations of barcode.
    +
    getBarcodeArray
    in file barcodes.php, method TCPDFBarcode::getBarcodeArray()
        Return an array representations of barcode.
    getBarcodeArray
    in file qrcode.php, method QRcode::getBarcodeArray()
        Returns a barcode array which is readable by TCPDF
    getBarcodeArray
    -
    in file 2dbarcodes.php, method TCPDF2DBarcode::getBarcodeArray()
        Return an array representations of barcode.
    -
    getBarcodeArray
    in file pdf417.php, method PDF417::getBarcodeArray()
        Returns a barcode array which is readable by TCPDF
    getBitStream
    in file qrcode.php, method QRcode::getBitStream()
        Returns a stream of bits.
    @@ -583,8 +591,12 @@
    in file tcpdf.php, method TCPDF::getCellCode()
        Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
    If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
    getCellHeightRatio
    in file tcpdf.php, method TCPDF::getCellHeightRatio()
        return the height of cell repect font height.
    +
    getCellMargins
    +
    in file tcpdf.php, method TCPDF::getCellMargins()
        Get the internal Cell margin array.
    +
    getCellPaddings
    +
    in file tcpdf.php, method TCPDF::getCellPaddings()
        Get the internal Cell padding array.
    GetCharWidth
    -
    in file tcpdf.php, method TCPDF::GetCharWidth()
        Returns the length of the char in user unit for the current font.
    +
    in file tcpdf.php, method TCPDF::GetCharWidth()
        Returns the length of the char in user unit for the current font considering current stretching and kerning.
    getCode
    in file qrcode.php, method QRcode::getCode()
        Return Reed-Solomon block code.
    getColumn
    @@ -597,6 +609,14 @@
    in file tcpdf.php, method TCPDF::getCSSBorderStyle()
        Returns the border style array from CSS border properties
    getCSSBorderWidth
    in file tcpdf.php, method TCPDF::getCSSBorderWidth()
        Returns the border width from CSS property
    +
    getCSSFontSpacing
    +
    in file tcpdf.php, method TCPDF::getCSSFontSpacing()
        Returns the letter-spacing value from CSS value
    +
    getCSSFontStretching
    +
    in file tcpdf.php, method TCPDF::getCSSFontStretching()
        Returns the percentage of font stretching from CSS value
    +
    getCSSMargin
    +
    in file tcpdf.php, method TCPDF::getCSSMargin()
        Get the internal Cell margin from CSS attribute.
    +
    getCSSPadding
    +
    in file tcpdf.php, method TCPDF::getCSSPadding()
        Get the internal Cell padding from CSS attribute.
    getDataLength
    in file qrcode.php, method QRcode::getDataLength()
        Return maximum data code length (bytes) for the version.
    getECCLength
    @@ -625,6 +645,10 @@
    in file tcpdf.php, method TCPDF::getFontSizePt()
        Returns the current font size in points unit.
    getFontsList
    in file tcpdf.php, method TCPDF::getFontsList()
        Fill the list of available fonts ($this->fontlist).
    +
    getFontSpacing
    +
    in file tcpdf.php, method TCPDF::getFontSpacing()
        Get the amount to increase or decrease the space between characters in a text.
    +
    getFontStretching
    +
    in file tcpdf.php, method TCPDF::getFontStretching()
        Get the percentage of character stretching.
    getFontStyle
    in file tcpdf.php, method TCPDF::getFontStyle()
        Returns the current font style.
    getFontSubsetting
    @@ -686,7 +710,7 @@
    GetNumChars
    in file tcpdf.php, method TCPDF::GetNumChars()
        Returns the numbero of characters in a string.
    getNumLines
    -
    in file tcpdf.php, method TCPDF::getNumLines()
        This method return the estimated number of lines for print a simple text string in Multicell() method.
    +
    in file tcpdf.php, method TCPDF::getNumLines()
        This method return the estimated number of lines for print a simple text string using Multicell() method.
    getNumPages
    in file tcpdf.php, method TCPDF::getNumPages()
        Get the total number of insered pages.
    getObjFilename
    @@ -713,6 +737,8 @@
    in file tcpdf.php, method TCPDF::getPathPaintOperator()
        Get the Path-Painting Operators.
    getPDFData
    in file tcpdf.php, method TCPDF::getPDFData()
        Returns the PDF data.
    +
    getRawCharWidth
    +
    in file tcpdf.php, method TCPDF::getRawCharWidth()
        Returns the length of the char in user unit for the current font.
    getRemainder
    in file qrcode.php, method QRcode::getRemainder()
        Return the numer of remainder bits.
    getRemainingWidth
    @@ -1351,6 +1377,8 @@
    in file tcpdf.php, method TCPDF::removeSHY()
        Removes SHY characters from text.
    replaceBuffer
    in file tcpdf.php, method TCPDF::replaceBuffer()
        Replace the buffer content
    +
    resetLastH
    +
    in file tcpdf.php, method TCPDF::resetLastH()
        Reset the last cell height.
    revstrpos
    in file tcpdf.php, method TCPDF::revstrpos()
        Find position of last occurrence of a substring in a string
    rfread
    @@ -1470,19 +1498,23 @@
    SetAutoPageBreak
    in file tcpdf.php, method TCPDF::SetAutoPageBreak()
        Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.
    setBarcode
    -
    in file barcodes.php, method TCPDFBarcode::setBarcode()
        Set the barcode.
    -
    setBarcode
    in file tcpdf.php, method TCPDF::setBarcode()
        Set document barcode.
    setBarcode
    in file 2dbarcodes.php, method TCPDF2DBarcode::setBarcode()
        Set the barcode.
    +
    setBarcode
    +
    in file barcodes.php, method TCPDFBarcode::setBarcode()
        Set the barcode.
    SetBooklet
    in file tcpdf.php, method TCPDF::SetBooklet()
        Set the booklet mode for double-sided pages.
    setBuffer
    in file tcpdf.php, method TCPDF::setBuffer()
        Set buffer content (always append data).
    setCellHeightRatio
    in file tcpdf.php, method TCPDF::setCellHeightRatio()
        Set the height of the cell (line height) respect the font height.
    +
    setCellMargins
    +
    in file tcpdf.php, method TCPDF::setCellMargins()
        Set the internal Cell margins.
    SetCellPadding
    -
    in file tcpdf.php, method TCPDF::SetCellPadding()
        Set the internal Cell padding.
    +
    in file tcpdf.php, method TCPDF::SetCellPadding()
        Set the same internal Cell padding for top, right, bottom, left-
    +
    setCellPaddings
    +
    in file tcpdf.php, method TCPDF::setCellPaddings()
        Set the internal Cell paddings.
    setColumnsArray
    in file tcpdf.php, method TCPDF::setColumnsArray()
        Set columns array.
    SetCompression
    @@ -1519,6 +1551,10 @@
    in file tcpdf.php, method TCPDF::setFontBuffer()
        Set font buffer content.
    SetFontSize
    in file tcpdf.php, method TCPDF::SetFontSize()
        Defines the size of the current font.
    +
    setFontSpacing
    +
    in file tcpdf.php, method TCPDF::setFontSpacing()
        Set the amount to increase or decrease the space between characters in a text.
    +
    setFontStretching
    +
    in file tcpdf.php, method TCPDF::setFontStretching()
        Set the percentage of character stretching.
    setFontSubBuffer
    in file tcpdf.php, method TCPDF::setFontSubBuffer()
        Set font buffer content.
    setFontSubsetting
    @@ -2058,7 +2094,7 @@ top

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26693,7 +27457,7 @@ $font)
    -

    method _RC4 [line 11210]

    +

    method _RC4 [line 11559]

    diff --git a/doc/com-tecnick-tcpdf/_unicode_data.php.html b/doc/com-tecnick-tcpdf/_unicode_data.php.html index 8a5a4cf..824d27e 100644 --- a/doc/com-tecnick-tcpdf/_unicode_data.php.html +++ b/doc/com-tecnick-tcpdf/_unicode_data.php.html @@ -246,7 +246,7 @@ Unicode data for TCPDF library.




    - Documentation generated on Mon, 27 Sep 2010 20:42:57 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:59:05 +0200 by phpDocumentor 1.4.3
    @@ -26744,7 +27508,7 @@ $text)
    -

    method _setGDImageTransparency [line 7066]

    +

    method _setGDImageTransparency [line 7394]

    diff --git a/doc/com-tecnick-tcpdf/_tcpdf.php.html b/doc/com-tecnick-tcpdf/_tcpdf.php.html index 19b6c8f..db0d7c7 100644 --- a/doc/com-tecnick-tcpdf/_tcpdf.php.html +++ b/doc/com-tecnick-tcpdf/_tcpdf.php.html @@ -74,7 +74,7 @@ Source Location: /tcpdf.php



    Page Details:

    -This is a PHP class for generating PDF documents without requiring external extensions.


    TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
    <h3>TCPDF main features are:</h3>

    • no external libraries are required for the basic functions;
    • all standard page formats, custom page formats, custom margins and units of measure;
    • UTF-8 Unicode and Right-To-Left languages;
    • TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
    • font subsetting;
    • methods to publish some XHTML + CSS code, Javascript and Forms;
    • images, graphic (geometric figures) and transformation methods;
    • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
    • 1D and 2D barcodes: 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, PDF417;
    • Grayscale, RGB, CMYK, Spot Colors and Transparencies;
    • automatic page header and footer management;
    • document encryption and digital signature certifications;
    • transactions to UNDO commands;
    • PDF annotations, including links, text and file attachments;
    • text rendering modes (fill, stroke and clipping);
    • multiple columns mode;
    • bookmarks and table of content;
    • text hyphenation;
    • automatic page break, line break and text alignments including justification;
    • automatic page numbering and page groups;
    • move and delete pages;
    • page compression (requires php-zlib extension);
    • XOBject Templates;
    Tools to encode your unicode fonts are on fonts/utils directory.</p>




    +This is a PHP class for generating PDF documents without requiring external extensions.


    TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
    <h3>TCPDF main features are:</h3>

    • no external libraries are required for the basic functions;
    • all standard page formats, custom page formats, custom margins and units of measure;
    • UTF-8 Unicode and Right-To-Left languages;
    • TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
    • font subsetting;
    • methods to publish some XHTML + CSS code, Javascript and Forms;
    • images, graphic (geometric figures) and transformation methods;
    • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
    • 1D and 2D barcodes: 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, PDF417;
    • Grayscale, RGB, CMYK, Spot Colors and Transparencies;
    • automatic page header and footer management;
    • document encryption and digital signature certifications;
    • transactions to UNDO commands;
    • PDF annotations, including links, text and file attachments;
    • text rendering modes (fill, stroke and clipping);
    • multiple columns mode;
    • bookmarks and table of content;
    • text hyphenation;
    • font stretching and spacing (kerning);
    • automatic page break, line break and text alignments including justification;
    • automatic page numbering and page groups;
    • move and delete pages;
    • page compression (requires php-zlib extension);
    • XOBject Templates;
    Tools to encode your unicode fonts are on fonts/utils directory.</p>




    Tags:

    diff --git a/doc/com-tecnick-tcpdf/_qrcode.php.html b/doc/com-tecnick-tcpdf/_qrcode.php.html index e51974c..5927ce6 100644 --- a/doc/com-tecnick-tcpdf/_qrcode.php.html +++ b/doc/com-tecnick-tcpdf/_qrcode.php.html @@ -480,7 +480,7 @@ string $string, [int $split_length = 1])

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26789,7 +27553,7 @@ $image)
    -

    method _textstring [line 10466]

    +

    method _textstring [line 10815]

    diff --git a/doc/com-tecnick-tcpdf/_pdf417.php.html b/doc/com-tecnick-tcpdf/_pdf417.php.html index dc4a00d..d0bde0c 100644 --- a/doc/com-tecnick-tcpdf/_pdf417.php.html +++ b/doc/com-tecnick-tcpdf/_pdf417.php.html @@ -157,7 +157,7 @@ Class to create PDF417 barcode arrays for TCPDF class.

    PDF417 (ISO


    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    diff --git a/doc/com-tecnick-tcpdf/_htmlcolors.php.html b/doc/com-tecnick-tcpdf/_htmlcolors.php.html index 97f0516..b9b1dec 100644 --- a/doc/com-tecnick-tcpdf/_htmlcolors.php.html +++ b/doc/com-tecnick-tcpdf/_htmlcolors.php.html @@ -97,7 +97,7 @@ Array of WEB safe colors.




    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26834,7 +27598,7 @@ $n = 0])
    -

    method _toJPEG [line 7029]

    +

    method _toJPEG [line 7357]

    diff --git a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html index 76f65b5..d617d53 100644 --- a/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html +++ b/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html @@ -542,7 +542,7 @@ Configuration file for TCPDF.




    - Documentation generated on Mon, 27 Sep 2010 20:42:57 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:59:05 +0200 by phpDocumentor 1.4.3
    diff --git a/doc/com-tecnick-tcpdf/_barcodes.php.html b/doc/com-tecnick-tcpdf/_barcodes.php.html index 7896335..fb810c2 100644 --- a/doc/com-tecnick-tcpdf/_barcodes.php.html +++ b/doc/com-tecnick-tcpdf/_barcodes.php.html @@ -105,7 +105,7 @@ PHP class to creates array representations for common 1D barcodes to be used wit

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26876,7 +27640,7 @@ $file)
    -

    method _toPNG [line 7048]

    +

    method _toPNG [line 7376]

    diff --git a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html index 72cfe61..e4cc605 100644 --- a/doc/com-tecnick-tcpdf/_2dbarcodes.php.html +++ b/doc/com-tecnick-tcpdf/_2dbarcodes.php.html @@ -105,7 +105,7 @@ PHP class to creates array representations for 2D barcodes to be used with TCPDF

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    diff --git a/doc/com-tecnick-tcpdf/TCPDFBarcode.html b/doc/com-tecnick-tcpdf/TCPDFBarcode.html index d0efd5a..fb9daf5 100644 --- a/doc/com-tecnick-tcpdf/TCPDFBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDFBarcode.html @@ -1377,7 +1377,7 @@ $type)

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26921,7 +27685,7 @@ $file)
    -

    method _Uvalue [line 11316]

    +

    method _Uvalue [line 11665]

    diff --git a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html index 3d1d675..00cc400 100644 --- a/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html +++ b/doc/com-tecnick-tcpdf/TCPDF2DBarcode.html @@ -299,7 +299,7 @@ $type)

    - Documentation generated on Mon, 27 Sep 2010 20:42:51 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:58:59 +0200 by phpDocumentor 1.4.3
    @@ -26958,7 +27722,7 @@ $file)

    - Documentation generated on Mon, 27 Sep 2010 20:42:52 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:59:00 +0200 by phpDocumentor 1.4.3
    @@ -82,7 +82,7 @@ This is a PHP class for generating PDF documents without requiring external exte - + @@ -101,19 +101,19 @@ This is a PHP class for generating PDF documents without requiring external exte

    Includes:

    -require_once(dirname(__FILE__).'/config/tcpdf_config.php') [line 139]
    -main configuration file

    require_once(dirname(__FILE__).'/htmlcolors.php') [line 151]
    -html colors table

    require_once(dirname(__FILE__).'/unicode_data.php') [line 146]
    +require_once(dirname(__FILE__).'/config/tcpdf_config.php') [line 141]
    +main configuration file

    require_once(dirname(__FILE__).'/htmlcolors.php') [line 153]
    +html colors table

    require_once(dirname(__FILE__).'/unicode_data.php') [line 148]
    unicode data






    -

    PDF_PRODUCER [line 157]

    +

    PDF_PRODUCER [line 159]

    author:  Nicola Asuni
    version:  5.8.034version:  5.9.000
    copyright:  2002-2010 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 5.8.034 (http://www.tcpdf.org)' + PDF_PRODUCER = 'TCPDF 5.9.000 (http://www.tcpdf.org)'
    @@ -124,7 +124,7 @@ unicode data


    - Documentation generated on Mon, 27 Sep 2010 20:42:52 +0200 by phpDocumentor 1.4.3 + Documentation generated on Mon, 04 Oct 2010 17:59:00 +0200 by phpDocumentor 1.4.3