fix php 5.6 in docker dev env (#1740)
[openemr.git] / vendor / mpdf / mpdf / CHANGELOG.txt
blobaa44e0cd90ae90df787f761c297e4568d3fe23c5
1 ===========================
2 mPDF 6.1.0
3 26/04/2016
4 ===========================
5 - Composer updates
6         - First release officially supporting Composer
7         - Updated license in composer.json
8         - Chmod 777 on dirs ttfontdata, tmp, graph_cache after composer install
9 - Requiring PHP 5.4.0+ with Composer
10 - Code style
11         - Reformated (almost) all PHP files to keep basic code style
12         - Removed trailing whitespaces
13         - Converted all txt, php, css, and htm files to utf8
14         - Removed closing PHP tags
15         - Change all else if calls to elseif
16 - Added base PHPUnit tests
17 - Added Travis CI integration with unit tests
18 - Changed all mPDF::Error and die() calls to throwing MpdfException
19 - PDF Import changes
20         - FPDI updated to 1.6.0 to fix incompatible licenses
21         - FPDI loaded from Composer or manually only
22 - Removed iccprofiles/CMYK directory
23 - Renamed example files: change spaces to underscores to make scripting easier
24 - Fixed LEDGER and TABLOID paper sizes
25 - Implemented static cache for mpdf function ConvertColor.
26 - Removed PHP4 style constructors
27 - Work with HTML tags separated to Tag class
28 - Fixed most Strict standards PHP errors
29 - Add config constant so we can define custom font data
30 - HTML
31         - fax & tel support in href attribute
32         - Check $html in $mpdf->WriteHTML() to see if it is an integer, float, string, boolean or
33           a class with __toString() and cast to a string, otherwise throw exception.
34 - PHP 7
35         - Fix getting image from internal variable in PHP7 (4dcc2b4)
36         - Fix PHP7 Fatal error: 'break' not in the 'loop' or 'switch' context (002bb8a)
37 - Fixed output file name for D and I output modes (issue #105, f297546)
39 ===========================
40 mPDF 6.0
41 20/12/2014
42 ===========================
43 New features / Improvements
44 ---------------------------
45 Support for OpenTypeLayout tables / features for complex scripts and Advances Typography.
46 Improved bidirectional text handling.
47 Improved line-breaking, including for complex scripts e.g. Lao, Thai and Khmer.
48 Updated page-breaking options.
49 Automatic language mark-up and font selection using autoScriptToLang and autoLangToFont.
50 Kashida for text-justification in arabic scripts.
51 Index collation for non-ASCII characters.
52 Index mark-up allowing control over layout using CSS.
53 {PAGENO} and {nbpg} can use any of the number types as in list-style e.g. set in <pagebreak> using pagenumstyle.
54 CSS support for lists.
55 Default stylesheet - mpdf.css - updated.
58 Added CSS support
59 -----------------
60 - lang attribute selector e.g. :lang(fr), [lang="fr"]
61 - font-variant-position
62 - font-variant-caps
63 - font-variant-ligatures
64 - font-variant-numeric
65 - font-variant-alternates - Only [normal | historical-forms] supported (i.e. most are NOT supported)
66 - font-variant - as above, and except for: east-asian-variant-values, east-asian-width-values, ruby
67 - font-language-override
68 - font-feature-settings
69 - text-outline is now supported on TD/TH tags
70 - hebrew, khmer, cambodian, lao, and cjk-decimal recognised as values for "list-style-type" in numbered lists and page numbering.
71 - list-style-image and list-style-position
72 - transform (on <img> only)
73 - text-decoration:overline
74 - image-rendering
75 - unicode-bidi (also <bdi> tag)
76 - vertical-align can use lengths e.g. 0.5em
77 - line-stacking-strategy
78 - line-stacking-shift
80 ================
81 mPDF 5.7.4
82 15/12/2014
83 ================
84 Bug Fixes & Minor Additions
85 ---------------------------
86 - SVG images now support embedded images e.g. <image xlink:href="image.png" width="100px" height="100px" />
87 - SVG images now supports <tspan> element e.g. <tspan x,y,dx,dy,text-anchor >, and also <tref>
88 - SVG images now can use Autofont (see top of classes/svg.php file)
89 - SVG images now has limited support for CSS classes (see top of classes/svg.php file)
90 - SVG images - style inheritance improved
91 - SVG images - improved handling of comments and other extraneous code
92 - SVG images - fix to ensure opacity is reset before another element
93 - SVG images - font-size not resetting after a <text> element
94 - SVG radial gradients bug (if the focus [fx,fy] lies outside circle defined by [cx,cy] and r) cf. pservers-grad-15-b.svg
95 - SVG allows spaces in attribute definitions in <use> or <defs> e.g. <use x = "0" y = "0" xlink:href = "#s3" />
96 - SVG text which contains a < sign, it will break the text - now processed as &lt; (despite the fact that this does not conform to XML spec)
97 - SVG images - support automatic font selection and (minimal) use of CSS classes - cf. the defined constants at top of svg.php file
98 - SVG images - text-anchor now supported as a CSS style, as well as an HTML attribute
99 - CSS support for :nth-child() selector improved to fully support the draft CSS3 spec - http://www.w3.org/TR/selectors/#nth-child-pseudo
100         [NB only works on table columns or rows]
101 - text-indent when set as "em" - incorrectly calculated if last text in line in different font size than for block
102 - CSS not applying cascaded styles on <A> elements - [changed MergeCSS() type to INLINE for 'A', LEGEND, METER and PROGRESS]
103 - fix for underline/strikethrough/overline so that line position(s) are based correctly on font-size/font in nested situations
104 - Error: Strict warning: Only variables should be passed by reference - in PHP5.5.9
105 - bug accessing images from some servers (HTTP 403 Forbidden whn accessed using fopen etc.)
106 - Setting page format incorrectly set default twice and missed some options
107 - bug fixed in Overwrite() when specifying replacement as a string
108 - barcode C93 - updated C93 code from TCPDF because of bug - incorrect checksum character for "153-2-4"
109 - Tables - bug when using colspan across columns which may have a cell width specified
110         cf. http://www.mpdf1.com/forum/discussion/2221/colspan-bug
111 - Tables - cell height (when specified) is not resized when table is shrunk
112 - Tables - if table width specified, but narrower than minimum cell wdith, and less than page width - table will expand to
113         minimum cell width(s) as long as $keep_table_proportions = true
114 - Tables - if using packTableData, and borders-collapse, wider border is overwriting content of adjacent cell
115         Test case:
116         <table style="border-collapse: collapse;">
117         <tr><td style="border-bottom: 42px solid #0FF; "> Hallo world </td></tr>
118         <tr><td style="border-top: 14px solid #0F0; "> Hallo world </td></tr>
119         </table>
120 - Images - image height is reset proportional to original if width is set to maximum e.g. <img width="100%" height="20mm"
121 - URL handling changed to work with special characters in path fragments; affects <a> links, <mg> images and
122         CSS url() e.g background-image
123         - also to ignore "../" included as a query value
124 - Barcodes with bottom numerals e.g. EAN-13 - incorrect numeral size when using core fonts
125 --------------------------------
126 NB Spec. for embedded SVG images:
127 as per http://www.w3.org/TR/2003/REC-SVG11-20030114/struct.html#ImageElement
128 Attributes supported:
131 xlink:href (required) - can be jpeg, png or gif image - not vector (SVG or WMF) image
132 width (required)
133 height (required)
134 preserveAspectRatio
136 Note: all attribute names and values are case-sensitive
137 width and height cannot be assigned by CSS - must be attributes
138 ---------------------------------
139 ================
140 mPDF 5.7.3
141 24/8/2014
142 ================
143 Bug Fixes & Minor Additions
144 ---------------------------
145 - Tables - cellSpacing and cellPadding taking preference over CSS stylesheet
146 - Tables - background images in table inside HTML Footer incorrectly positioned
147 - Tables - cell in a nested table with a specified width, should determine width of parent table cell
148         (cf. http://www.mpdf1.com/forum/discussion/1648/nested-table-bug-)
149 - Tables - colspan (on a row after first row) exceeds number of columns in table
150 - Gradients in Imported documents (mPDFI) causing error in some browsers
151 - Fatal error after page-break-after:always on root level block element
152 - Support for 'https/SSL' if file_get_contents_by_socket required (e.g. getting images with allow_url_fopen turned off)
153 - Improved support for specified ports when getting external CSS stylesheets e.g. www.domain.com:80
154 - error accessing local .css files with dummy queries (cache-busting) e.g. mpdfstyleA4.css?v=2.0.18.9
155 - start of end tag in PRE incorrectly changed to &lt;
156 - error thrown when open.basedir restriction in effect (deleting temporary files)
157 - image which forces pagebreak incorrectly positioned at top of page
158 - [changes to avoid warning notices by checking if (isset(x)) before referencing it]
159 - text with letter-spacing set inside table which needs to be resixed (shrunk) - letter-spacing was not adjusted
160 - nested table incorrectly calculating width and unnecessarily wrapping text
161 - vertical-align:super|sub can be nested using <span> elements
162 - inline elements can be nested e.g. text <sup>text<sup>13</sup>text</sup> text
163 - CSS vertical-align:0.5em (or %) now supported
164 - underline and strikethrough now use the parent inline block baseline/fontsize/color for child inline elements *** change in behaviour
165         (Adjusts line height to take account of superscript and subscript except in tables)
166 - nested table incorrectly calculating width and unnecessarily wrapping text
167 - tables - font size carrying over from one nested table to the next nested table
168 - tables - border set as attribute on <TABLE> overrides border set as CSS on <TD>
169 - tables - if table width set to 100% and one cell/column is empty with no padding/border, sizing incorrectly
170         (http://www.mpdf1.com/forum/discussion/1886/td-fontsize-in-nested-table-bug-#Item_5)
171 - <main> added as recognised tag
172 - CSS style transform supported on <img> element (only)
173         All transform functions are supported except matrix() i.e. translate(), translateX(), translateY(), skew(), skewX(), skewY(),
174         scale(), scaleX(), scaleY(), rotate()
175         NB When using Columns or Keep-with-table (use_kwt), cannot use transform
176 - CSS background-color now supported on <img> element
177 - @page :first not recognised unless @page {} has styles set
178 - left/right margins not allowed on @page :first
182 ================
183 mPDF 5.7.2
184 28/12/2013
185 ================
186 Bug Fixes
187 ---------
188 - <tfoot> not printing at all (since v5.7)
189 - list-style incorrectly overriding list-style-type in cascading CSS
190 - page-break-after:avoid not taking into account bottom padding and margin when estimating if next line can fit on page
191 - images not displayed when using "https://" if images are referenced by src="//domain.com/image"
192 - +aCJK incorrectly parsed when instantiating class e.g. new mpDF('ja+aCJK')
193 - line-breaking - zero-width object at end of line (e.g. index entry) causing a space left untrimmed at end of line
194 - ToC since v5.7 incorrectly handling non-ascii characters, entities or tags
195 - cell height miscalculated when using hard-hyphenate
196 - border colors set with transparency not working
197 - transparency settings for stroke and fill interfering with one another
198 - 'float' inside a HTML header/footer - not clearing the float before first line of text
199 - error if script run across date change at midnight
200 - temporary file name collisions (e.g. when processing images) if numerous users
201 - <watermarkimage> position attribute not working
202 - < (less-than sign) inside a PRE element, and NOT start of a valid tag, was incorrectly removed
203 - file attachments not opening in Reader XI
204 - JPG images not recognised if not containing JFIF or Exif markers
205 - instance of preg_replace with /e modifier causing error in PHP 5.5
206 - correctly handle CSS URLs with no scheme
207 - Index entries causing errors when repeat entries are used within page-break-inside:avoid, rotated tables etc.
208 - table with fixed width column and long word in cell set to colspan across this column (adding spare width to all columns)
209 - incorrect hyphenation if multiple soft-hyphens on line before break
210 - SVG images - objects contained in <defs> being displayed
211 - SVG images - multiple, or quoted fonts e.g. style="font-family:'lucida grande', verdana" not recognised
212 - SVG images - line with opacity=0 still visible (only in some PDF viewers/browsers)
213 - text in an SVG image displaying with incorrect font in some PDF viewers/browsers
214 - SVG images - fill:RGB(0,0,0) not recognised when uppercase
215 - background images using data:image\/(jpeg|gif|png);base64 format - error when reading in stylesheet
217 New CSS support
218 ---------------
219 - added support for style="opacity:0.6;" in SVG images - previously only supported style="fill-opacity:0.6; stroke-opacity: 0.6;"
220 - improved PNG image handling for some cases of alpha channel transparency
221 - khmer, cambodian and lao recognised as list-style-type for numbered lists
223 SVG Images
224 ----------
225 Limited support for <use> and <defs>
227 ================
228 mPDF 5.7.1
229 1/09/2013
230 ================
231 1) FILES: mpdf.php
232 Bug fix; Dollar sign enclosed by <pre> tag causing error.
233 Test e.g.: <pre>Test $1.00 Test</pre> <pre>Test $2.00 Test</pre> <pre>Test $3.00 Test</pre> <pre>Test $4.00 Test</pre>
234 -----------------------------
235 2) FILES: includes/functions.php AND mpdf.php
236 Changes to preg_replace with /e modifier to use preg_replace_callback
237 (/e depracated from PHP 5.5)
238 -----------------------------
239 3) FILES: classes/barcode.php
240 Small change to function barcode_c128() which allows ASCII 0 - 31 to be used in C128A e.g. chr(13) in:
241 <barcode code="5432&#013;1068" type="C128A" />
242 -----------------------------
243 4) FILES: mpdf.php
244 Using $use_kwt ("keep-[heading]-with-table") if <h4></h4> before table is on 2 lines and pagebreak occurs after first line
245 the first line is displayed at the bottom of the 2nd page.
246 Edited so that $use_kwt only works if the HEADING is only one line. Else ignores (but prints correctly)
247 -----------------------------
248 5) FILES: mpdf.php
249 Clearing old temporary files from _MPDF_TEMP_PATH will now ignore "hidden" files e.g. starting with a "." .htaccess, .gitignore etc.
250 and also leave dummy.txt alone
251 -----------------------------
254 ===========================
255 mPDF 5.7
256 14/07/2013
257 ===========================
259 Files changed
260 -------------
261 config.php
262 mpdf.php
263 classes/tocontents.php
264 classes/cssmgr.php
265 classes/svg.php
266 includes/functions.php
267 includes/out.php
268 examples/formsubmit.php [Important - Security update]
270 Updated Example Files in /examples/
271 -----------------------------------
272 All example files
273 mpdfstyleA4.css
276 config.php
277 ----------
278 Removed:
279         $this->hyphenateTables
280         $this->hyphenate
281         $this->orphansAllowed
282 Edited:
283         "hyphens: manual" - Added to $this->defaultCSS
284         $this->allowedCSStags now includes '|TEXTCIRCLE|DOTTAB'
285 New:
286         $this->decimal_align = array('DP'=>'.', 'DC'=>',', 'DM'=>"\xc2\xb7", 'DA'=>"\xd9\xab", 'DD'=>'-');
287         $this->h2toc = array('H1'=>0, 'H2'=>1, 'H3'=>2);
288         $this->h2bookmarks = array('H1'=>0, 'H2'=>1, 'H3'=>2);
289         $this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin (used with CJK script)
292 Backwards compatability
293 -----------------------
294 Changes in mPDF 5.7 may cause some changes to the way your documents appear. There are two main differences:
295 1) Hyphenation. To retain appearance compatible with earlier versions, set the CSS property "hyphens: auto" whenever
296         you previously used $mpdf->hyphenate=true;
297 2) Table of Contents - appearance can now be controlled with CSS styles. By default, in mPDF 5.7, no styling is applied so you will get:
298         - No indent (previous default of 5mm) - ($tocindent is ignored)
299         - Any font, font-size set ($tocfont or $tocfontsize) will not work
300         - HyperLinks will appear with your default appearance - usually blue and underlined
301         - line spacing will be narrower (can use line-height or margin-top in CSS)
304 New features / Improvements
305 ---------------------------
306 Layout of Table of Content ToC now controlled using CSS styles
307 Text alignment on decimal mark inside tables
308 Automatically generated bookmarks and/or ToC entries from H1 - H6 tags
309 Support for unit of "rem" as size e.g. font-size: 1rem;
310 Origin and clipping for background images and gradients controlled by CSS i.e. background-origin, background-size, background-clip
311 Text-outline controlled by CSS (compatible with CSS3 spec.)
312 Use of <dottab> enhanced by custom CSS "outdent" property
313 Image HTML attributes <img> added: max-height, max-width, min-height and min-width
314 Spotcolor can now be defined as it is used e.g. color: spot(PANTONE 534 EC, 100%, 85, 65, 47, 9);
315 Lists - added support for "start" attribute in <ol> e.g. <ol start="5">
316 Hyphenation controlled using CSS, consistent with CSS3 spec.
317 Line breaking improved to avoid breaks within words where HTML tags are used e.g. H<sub>2<sub>0
318 Line breaking in CJK scripts improved (and ability to force hanging punctuation)
319 Numerals in a CJK script are kept together
320 RTL improved support for phrases containing numerals and \ and /
321 Bidi override codes supported - Right-to-Left Embedding [RLE] U+202B, Left-to-Right Embedding [LRE] U+202A,
322         U+202C POP DIRECTIONAL FORMATTING (PDF)
323 Support for <base href=""> in HTML - uses it to SetBasePath for relative URLs.
324 HTML tag - added support for <wbr> or <wbr /> - converted to a soft-hyphen
325 CSS now takes precedence over HTML attribute e.g. <table bgcolor="black" style="background-color:yellow">
329 Added CSS support
330 -----------------
331 - max-height, max-width, min-height and min-width for images <img>
332 - "hyphens: none|manual|auto" as per CSS3 spec.
333 - Decimal mark alignment e.g. text-align: "." center;
334 - "rem" accepted as a valid (font)size in CSS e.g. font-size: 1.5rem
335 - text-outline, text-outline-width and text-outline-color supported everywhere except in tables (blur not supported)
336 - background-origin, background-size, background-clip are now supported everywhere except in tables
337 - "visibility: hidden|visible|printonly|screenonly" for inline elements e.g. <span>
338 - Colors: device-cmyk(c,m,y,k) as per CSS3 spec. For consistency, device-cmyka also supported (not CSS3 spec)
339 - "z-index" can be used to utilise layers in the PDF document
340 - Custom CSS property added: "outdent" - opposite of indent
342 The HTML elements <dottab> and <textcircle> can now have CSS properties applied to them.
345 Bug fixes
346 ---------
347 - SVG images - path including e.g. 1.234E-15 incorrectly parsed (not recognising capital E)
348 - Tables - if a table starts when the Y position on page is below bottom margin caused endless loop
349 - Float-ing DIVs - starting a float at bottom of page and it causes page break before anything output, second new page is forced
350 - Tables - Warning notice now given in Table footer or header if <tfoot> placed after <tbody> and table spans page
351 - Columns - block with border-width wider than the length of the border line, line overflows
352 - Columns - block with no padding containing a block with borders but no backgound colour, borders not printed
353 - Table in Columns - when background color set by surrounding block element - colour missing for height of half bottom border.
354 - TOCpagebreakByArray() when called by function was not adding the pagebreak
355 - Border around block element - dashed not showing correctly (not resetting linewidth between different edges)
356 - Double border in table - when background colour set in surrounding block element - shows as black line between the 2 bits of double
357 - Borders around DIVs - "double" border problem if not all 4 sides equally - fixed
358 - Borders around DIVs - solid (and double) borders overlap as in tables - now fixed so mitred joins as in browser
359         [Inadvertently improves borders in Columns because of change in LineCap]
360 - Page numbering - $mpdf->pagenumSuffix etc not suppressed in HTML headers/footers if number suppressed
361 - Page numbering - Page number total {nbpg} incorrect  - e.g. showing decreasing numbers through document, when ToC present
362 - RTL numerals - incorrectly reversing a number followed by a comma
363 - Transform to uppercase/lowercase not working for chars > ASCII 128 when using core fonts
364 - TOCpagebreak - Not setting TOC-FOOTER
365 - TOCpagebreak - toc-even-header-name etc. not working
366 - Parsing some relative URLs incorrectly
367 - Textcircle - when moved to next page by "page-break-inside: avoid"
368 - Bookmarks will now work if jump more than one level e.g. 0,2,1  Inserts a new blank entry at level 1
369 - Paths to img or stylesheets - incorrectly reading "//www.domain.com" i.e. when starting with two /
370 - data:image as background url() - incorrectly adjusting path on server if MPDF_PATH not specified (included in release mPDF 5.6.1)
371 - Image problem if spaces or commas in path using http:// URL (included in release mPDF 5.6.1)
372 - Image URL parsing rewritten to handle both urlencoded URLs and not urlencoded (included in release mPDF 5.6.1)
373 - <dottab> fixed to allow color, font-size and font-family to be correctly used, avoid dots being moved to new page, and to work in RTL
374 - Table {colsum} summed figures in table header
375 - list-style-type (custom) colour not working
376 - <tocpagebreak> toc-preHTML and toc-postHTML can now contain quotes
380 ===========================
381 mPDF 5.6
382 20/01/2013
383 ===========================
385 Files changed
386 -------------
387 mpdf.php
388 config.php
389 includes/functions.php
390 classes/meter.php
391 classes/directw.php
394 config.php changes
395 ------------------
396 $this->allowedCSStags - added HTML5 tags + textcircle AND
397 $this->outerblocktags - added HTML5 tags
398 $this->defaultCSS  - added default CSS properties
401 New features / Improvements
402 ---------------------------
403 CSS support added for for min-height, min-width, max-height and max-width in <img>
405 Images embedded in CSS
406         <img src="data:image/gif;base64,...."> improved to make it more robust, and
407         background: url(data:image... now added to work
409 HTML5 tags supported
410 - as generic block elements: <article><aside><details><figure><figcaption><footer><header><hgroup><nav><section><summary>
411 - as in-line elements: <mark><time><meter><progress>
412 - <mark> has a default CSS set in config.php to yellow highlight
413 - <meter> and <progress> support attributes as for HTML5
414 - custom appearances for <meter> and <progress> can be made by editing classes/meter.php file
415 - <meter> and <progress> suppress text inside the tags
417 Textcircle/Circular
418 font: "auto" added: automatically sizes text to fill semicircle (if both set) or full circle (if only one set)
419         NB for this AND ALL CSS on <textcircle>: does not inherit CSS styles
420 attribute: divider="[characters including HTML entities]" added
421 <textcircle r="30mm" top-text="Text Circular Text Circular" bottom-text="Text Circular Text Circular"
422         divider="&nbsp;&bull;&nbsp;" style="font-size: auto" />
424 &raquo; &rsquo; &sbquo; &bdquo; are now included in "orphan"-management at the end of lines
426 Improved CJK line wrapping (if CJK character at end of line, breaks there rather than previous wordspace)
428 NB mPDF 5.5 added support for <fieldset> and <legend> (omitted from ChangeLog)
430 Bug fixes
431 ---------
432 - embedded fonts: Panose string incorrectly output as decimals - changed to hexadecimal
433         Only a problem in limited circumstances.
434         *****Need to delete all ttfontdata/ files in order for fix to have effect.
435 - <textCircle> background white even when set to none/transparent
436 - border="0" causing mPDF to add border to table CELLS as well as table
437 - iteration counter in THEAD crashed in some circumstances
438 - CSS color now supports spaces in the rgb() format e.g. border: 1px solid rgb(170, 170, 170);
439 - CJK not working in table following changes made in v5.4
440 - images fixed to work with Google Chart API (now mPDF does not urldecode the query part of the src)
441 - CSS <style> within HTML page crashed if CSS is too large  (? > 32Kb)
442 - SVG image nested int eht HTML failed to show if code too large (? > 32Kb)
443 - cyrillic character p &#1088; at end of table cell caused cell height to be incorrectly calculated
446 ===========================
447 mPDF 5.5
448 02/03/2012
449 ===========================
451 Files changed
452 -------------
453 mpdf.php
454 classes/ttfontsuni.php
455 classes/svg.php
456 classes/tocontents.php
457 config.php
458 config_fonts.php
459 utils/font_collections.php
460 utils/font_coverage.php
461 utils/font_dump.php
463 Files added
464 -----------
465 classes/ttfontsuni_analysis.php
467 config.php changes
468 ------------------
469 To avoid just the border/background-color of the (empty) end of a block being moved on to next page (</div></div>)
470 $this->margBuffer = 0;          // Allow an (empty) end of block to extend beyond the bottom margin by this amount (mm)
472 config_fonts.php changes
473 ------------------------
474 Added to (arabic) fonts to allow "use non-mapped Arabic Glyphs" e.g. for Pashto
475         'unAGlyphs' => true,
477 Arabic text
478 -----------
479 Arabic text (RTL) rewritten with improved support for Pashto/Sindhi/Urdu/Kurdish
480         Presentation forms added:
481         U+0649, U+0681, U+0682, U+0685, U+069A-U+069E, U+06A0, U+06A2, U+06A3, U+06A5, U+06AB-U+06AE,
482         U+06B0-U+06B4, U+06B5-U+06B9, U+06BB, U+06BC, U+06BE, U+06BF, U+06C0, U+06CD, U+06CE, U+06D1, U+06D3, U+0678
483         Joining improved:
484         U+0672, U+0675, U+0676, U+0677, U+0679-U+067D, U+067F, U+0680, U+0683, U+0684, U+0687, U+0687, U+0688-U+0692,
485         U+0694, U+0695, U+0697, U+0699, U+068F, U+06A1, U+06A4, U+06A6, U+06A7, U+06A8, U+06AA, U+06BA, U+06C2-U+06CB, U+06CF
487 Note -
488 Some characters in Pashto/Sindhi/Urdu/Kurdish do not have Unicode values for the final/initial/medial forms of the characters.
489 However, some fonts include these characters "un-mapped" to Unicode (including XB Zar and XB Riyaz, which are bundled with mPDF).
490         'unAGlyphs' => true,
491 added to the config_fonts.php file for appropriate fonts will
493 This requires the font file to include a Format 2.0 POST table which references the glyphs as e.g. uni067C.med or uni067C.medi:
494         e.g. XB Riyaz, XB Zar, Arabic Typesetting (MS), Arial (MS)
495 NB If you want to know if a font file is suitable, you can open a .ttf file in a text editor and search for "uni067C.med"
496         - if it exists, it may work!
497 Using "unAGlyphs" forces subsetting of fonts, and will not work with SIP/SMP fonts (using characters beyond the Unicode BMP Plane).
499 mPDF maps these characters to part of the Private Use Area allocated by Unicode U+F500-F7FF. This could interfere with correct use
500         if the font already utilises these codes (unlikely).
502 mPDF now deletes U+200C,U+200D,U+200E,U+200F zero-widthjoiner/non-joiner, LTR and RTL marks so they will not appear
503         even though some fonts contain glyphs for these characters.
506 Other New features / Improvements
507 ---------------------------------
508 Avoid just the border/background-color of the (empty) end of a block being moved on to next page (</div></div>)
509         using configurable variable: $this->margBuffer;
512 The TTFontsUni class contained a long function (extractcoreinfo) which is not used routinely in mPDF
513         This has been moved to a new file: classes/ttfontsuni_analysis.php
514         The 3 utility scripts have been updated to use the new extended class:
515         - utils/font_collections.php
516         - utils/font_coverage.php
517         - utils/font_dump.php
520 Bug fixes
521 ---------
522 - Border & background when closing 2 blocks (e.g. </div></div>) incorrectly being moved to next page because incorrectly
523         calculating how much space required
524 - Fixed/Absolute-positioned elements not inheriting letter-spacing style
525 - Rotated cell - error if text-rotate set on a table cell, but no text content in cell
526 - SVG images, text-anchor not working
527 - Nested table - not resetting cell style (font, color etc) after nested table, if text follows immediately
528 - Nested table - font-size 70% set in extenal style sheet; if repeated nested tables, sets 70% of 70% etc etc
529 - SVG setting font-size as percent on successive <text> elements gives progressively smaller text
530 - mPDF will check if magic_quotes_runtime set ON even >= PHP 5.3 (will now cause an error message)
531 - not resetting after 2 nested tags of same type e.g. <b><b>bold</b></b> still bold
532 - When using charset_in other than utf-8, HTML Footers using tags e.g. <htmlpageheader> do not decode correctly
533 - ToC if nested > 3 levels, line spacing reduces and starts to overlap
538 ===========================
539 mPDF 5.4
540 14/02/2012
541 ===========================
542 Files changed
543 -------------
544 mpdf.php
545 config.php
546 compress.php
547 classes/ttfontsuni.php
548 classes/barcode.php
549 classes/indic.php
550 classes/svg.php
551 examples/show_code.php  -----  SECURITY RISK**
552 examples/example49_changelog.php
553 examples/example57_new_mPDF_v5-3_active_forms_b (replace example57_new_mPDF_v5-3_active_forms)
554 includes/out.php
555 mpdfi/fpdi_pdf_parser.php
557 Files added
558 -----------
559 classes/bmp.php
560 classes/directw.php
561 classes/form.php
562 classes/grad.php
563 classes/tocontents.php
564 classes/wmf.php
565 examples/example58_new_mPDF_v5-4_features
567 config.php changes
568 ------------------
569 Edited: $this->allowedCSStags, $this->innerblocktags, $this->defaultCSS;  (CAPTION added in each case)
570 Moved: Numerous $form_.. variables are now in /classes/form.php
572 New config variables
573 --------------------
574 $this->bookmarkStyles = array();
575 $this->cacheTables = true;
577 New methods
578 -----------
579 function CircularText()
580 function SetVisibility()
582 New/Extended CSS
583 ----------------
584 box-shadow (block elements - does NOT support "inset")
585 text-shadow (all text elements - does NOT support "blur")
586 visibility: visible|hidden|printonly|screenonly (block-level elements and images IMG only)
587 text-transform: capitalize|uppercase|lowercase (extended to support TD/TH)
588 tr|td|th:nth-child(odd|even|2n+1)
589 color, strikethrough, underline and background-color (extended to support rotated TD/TH)
590 underline and strike-through (extended to support TD/TH)
591 underline (line colour)  (extended to work correctly in watermark)
592 page-break-after: left|right|always (block elements and tables)
593         NB respects $mpdf->restoreBlockPagebreaks = true; i.e. will make pagebreak act like formfeed
594 background[-color]: extended to support rgba|cmyka|cmyk|hsla|hsl|spot
595 border(extended to support inline elements)
598 New HTML
599 --------
600 <caption>
601 <textcircle />
604 New features / Improvements
605 ---------------------------
606 Tables - Zebra Stripes
607 Tables: overlapping rowspans (partially) supported
608 Tables - Disk caching
609 Using progress bars (or $showStats) now reports 'real' memory usage i.e. get_memory_usage(true)
610 Support for query string in the URLs for external stylesheets e.g. @import url("style.css?ltcyy7");
611 Table caption partially supported
612 CircularText
613 BookMark styling
614 Spread tables i.e. can split table (columns) across several pages width.
615 Can use chelvetica, ctimes and ccourier to specify core fonts in a non-core font document
616 Spread tables i.e. can split table (columns) across several pages width.
617 {colsum} in <tfoot> cell will insert a column total per page.
618 SVG embedded as island in HTML supported
619 Active Forms
620         textarea and input (text types) now accept javascript as:
621         onKeystroke, onValidate, onCalculate and onFormat
622         onChange is depracated but works as onCalculate (for textarea and input)
623         (PS Select still accepts onChange cf. 5.3.37)
624 Ledger and Tabloid added as page formats recognised. NB Ledger is same as tabloid but landscape. In mPDF, both give the same size (portrait)
625 so need to add -L e.g. Ledger-L for landscape.
628 Internal script changes
629 -----------------------
630 Changed this->k to _MPDFK throughout all scripts
631 Changes to color (packed binary data in string rather than array) to reduce memory usage esp in tables
632 Internal variables Removed
633         $usetableheader;
634         $tableheadernrows;
635         $tablefooternrows;
636 vars $ChangePage, $p_bottom_border, $img_margin_top(+) $issetcolor + other similar  removed
638 Removed a whole load of // comments
639 Updates to remove some more Warning Notices (not all marked in text)
640 Border set on TR - changed so set on each cell, rather than retrospectively at end of TR
641 All references to table['text'] removed as not needed - uses ['textbuffer'] instead
642 OpenTag(TD) changes to reduce memory usage with tables
643 Includes different method to set a default timezone
644 fn _smallCaps does not need (undefined) $space
645 this->chrs and this->ords replaced by chr() and ord()
646 Headers in out.php updated to match those used in Output()
647 Change to SetFont() to improve performance time
648 Change to GetStringWidth() to improve performance time
649 Corrected copying of Glyphs 0,1,2, to all subset fonts (non-SMP/SIP), and only setting 32->127 in subset
650 Subset fonts (non-SMP/SIP) have additionally Unicode CMap tables (0,0,4 and 0,3,4) as well as Microsoft (3,1,4)
651 Subset fonts (SMP/SIP) have CMap tables (1,0,6 and 3,0,4) - rather than 1,0,6 and 3,0,6
652 Subset fonts (SMP/SIP) have 'name' table changed to give 1,0 and 3,0. As it is a symbol font (not Unicode encoded) :
653         needs to have a name entry in 3,0 (e.g. symbol) - original font will have 3,1 (i.e. Unicode)
654 Automatically checks for HTML code length > 100000 characters and gives error warning if
655          PHP < 5.2.0 (as not configurable) or increases pcre.backtrack_limit if PHP < 5.3.7
657 Removed/Depracated
658 ------------------
659 function UseTableHeader($opt=true)      fn removed / depracated
660 function UsePRE($opt=true) removed
661 $attr['REPEAT_HEADER'] == true          CSS removed / depracated
662 $this->usepre=true; removed / depracated as never needed - always respects PRE whitespace
664 ToC: NB Values can no longer be set directly e.g. as in example
665         $mpdf->TOCheader = array();     // array as for setting header/footer
666         $mpdf->TOCfooter = array();     // array as for setting header/footer
667         $mpdf->TOCpreHTML = '<h2>Contents - Portrait</h2>';     // HTML text to appear before table of contents
668         $mpdf->TOCpostHTML = '';        // HTML text to appear after table of contents
669         $mpdf->TOCbookmarkText = 'Content list';        // Text as it will appear in the Bookmarks (leave blank for none)
670 Need to use TOCpagebreak either direct (or array version) or as HTML
671 OR if absolutley necessary, could use:
672         $mpdf->tocontents->TOCheader = array(); // array as for setting header/footer
673         $mpdf->tocontents->TOCfooter = array(); // array as for setting header/footer
674         $mpdf->tocontents->TOCpreHTML = '<h2>Contents - Portrait</h2>'; // HTML text to appear before table of contents
675         $mpdf->tocontents->TOCpostHTML = '';    // HTML text to appear after table of contents
676         $mpdf->tocontents->TOCbookmarkText = 'Content list';    // Text as it will appear in the Bookmarks (leave blank for none)
680 Further Details
681 ===============
683 CSS border on inline elements
684 -----------------------------
685 Support for CSS border (and variants) on inline elements e.g. <span style="border-bottom: 1px dashed #000000;">
686 Border styles solid|dotted|dashed|double only are supported. Border radius not supported.
687 Nested inline elements will have repeat left|right borders on the nested content (unlike browsers)
689 Tables - Zebra Stripes
690 ----------------------
691 TABLE - striped rows cf. http://dev.opera.com/articles/view/zebra-striping-tables-with-css3/
692 tr:nth-child(odd) { background-color: #99ff99; }
693 thead tr:nth-child(3n+2) { background-color: #FFBBFF; }
694 td:nth-child(2n+1) { background-color: #BBBBFF; }
695 table.zebraTable td:nth-child(2n+1) { background-color: #BBBBFF; }
696 table.zebraTable th:nth-child(2n+1) { background-color: #BBBBFF; }
698 NB mPDF does NOT correctly apply specificity to all CSS
699 table.zebra tbody tr:nth-child(2n+1) td { background-color: #FFFFBB; }
700 table.zebra tbody td:nth-child(odd) { background-color: #BBBBFF; }
702 should make every odd row yellow, and every odd coloumn blue, but with the row/yellow overriding the column/blue.
703 In mPDF the td:nth-child(odd) trumps the plain td, so the column colour wins out. You can force the effect you want by using
704 table.zebra tbody tr:nth-child(2n+1) td:nth-child(1n+0) { background-color: #FFFFBB; }
706 (The :nth-child(1n+0) selector just selects every td cell.)
710 Tables - Disk caching
711 ---------------------
712 TABLES: using disk caching
713 // Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
714 // executon time and disk access (read and write)
715 $this->cacheTables = true;
716 NB              $this->packTableData will be overridden to => true;     // required for cacheTables
717                 $this->simpleTables will be overridden to => false;  // Cannot co-exist with cacheTables
720 Table caption
721 -------------
722 Must come immediately after <table...>
723 CSS caption-side and HTML align attribute of top|bottom supported (not attribute left|right)
724 Handled as a separate block element brought outside the table, so:
725         CSS will not cascade correctly on the table
726         width of caption block is that of page or of the block element containing the table
727         so alignment will be to the page-width not the table width
728         if table page-break-after: always, the caption will follow the pagebreak.
729 This does work:
730 <style>
731 .tablecaption { caption-side: bottom; text-align: left; font-weight: bold; color: green; }
732 </style>
734 <table>
735 <caption class="tablecaption">Caption title here</caption>
736 <tbody>
738 CSS visibility: printonly, screenonly
739 -------------------------------------
740 Roughly based on CSS
742 Works on Block elements P, DIV etc, or Image
743 Cannot nest / layer.
744 Inner blocks/image with set visibility are ignored if already set on enclosing block element.
745 (Block element) does not work inside table (image does)
746 So 'visible' does nothing but is set as default
747 (NB Changes output to PDF version 1.5)
748 Incompatible with PDFA / PDFX
750 'visibility'
751         Value:          visible | hidden | (collapse | inherit)
752         Initial:        visible
753         Applies to:     all elements
754         Inherited:      yes
756 The 'visibility' property specifies whether the boxes generated by an element are rendered.
757 Invisible boxes still affect layout (set the 'display' property to 'none' to suppress box generation altogether).
758 Values have the following meanings:
760 visible
761         The generated box is visible.
762 hidden
763         The generated box is invisible (fully transparent, nothing is drawn), but still affects layout.
764         Furthermore, descendants of the element will be visible if they have 'visibility: visible'.
765 collapse | inherit
766         NOT supported in mPDF
768 CUSTOM:
769 printonly | screenonly
772 Added VISIBILITY function
773 $mpdf->SetVisibility('screenonly'); or 'printonly' 'visible' or 'hidden'
774 (NB Changes output to PDF version 1.5)
775 Incompatible with PDFA / PDFX
777 CircularText
778 ------------
779 function CircularText($x, $y, $r, $text, $align='top', $kerning=120, $fontwidth=100) {
780 x: abscissa of center
781 y: ordinate of center
782 r: radius of circle
783 text: text to be printed
784 align: text alignment: top or bottom. Default value: top
785 kerning: spacing between letters in percentage. Default value: 120. Zero is not allowed.
786 fontwidth: width of letters in percentage. Default value: 100. Zero is not allowed
788 - now uses Kerning between letters if useKerning == true (set manually see example)
790 BookMark styling
791 ----------------
792 New configurable variable to control appearance of Bookmarks e.g.
793 $this->bookmarkStyles = array(
794         0 => array('color'=> array(0,64,128), 'style'=>'B'),
795         1 => array('color'=> array(128,0,0), 'style'=>''),
796         2 => array('color'=> array(0,128,0), 'style'=>'I'),
799 Column sums
800 -----------
801 (Also changed some preg_replace to str_replace to improve performance)
802 To use: just add {colsum} to any cells of the table footer <tfoot>
803 Add a number to specify a fixed number of decimal points e.g. <td>£{colsum2}</td>  will give you £123.40
804 The width of the column will be calculated using the actual string {colsum} as a placeholder.
805 If you need the column to be wider, use underscores "_" to pad it e.g. {colsum2_____}
808 Spread tables
809 -------------
810 i.e. can split table (columns) across several pages width.
811 CSS <table style="overflow: visible">
812 Cannot use with:
813 $this->kwt - ignored
814 $this->table_rotate - ignored
815 $this->table_keep_together - ignored
816 $this->ColActive  - cancels spread tables
818 Messes up with:
819 $mpdf->forcePortraitHeaders = true;
820 $mpdf->forcePortraitMargins = true;
821 Problems with CJK, and RTL
823 Will do no resizing of fonts at all.
824 Maximum width of column = page width i.e. will not split columns across pages - NB will keep colspan>1 on one page
825 If table row too high for page will die with error message.
826 Will override some specs for width if this creates conflicts
827 Recommended to specify absolute value of width on each column.
832 Bug fixes
833 =========
834 Dottab - if text after dottab is hyperlinked <a></a> then dots are underlined
836 page-break-before now respects $mpdf->restoreBlockPagebreaks = true; i.e. will make pagebreak act like formfeed
837 Annotation() function called directly with colorarray(r,g,b)
839 Added urldecode to _getImage to cope with ../name%20of%20image.jpg
840 Added urldecode AND htmlspecials_decode to href in <a> link e.g. https://www.google.com/search?hl=en&amp;q=mpdf&amp;filename=name%20of%20file
841 [barcode.php] Allow &nbsp; in C39 codes - will be changed to spaces
843 <table> inside a <div position:fixed, left:300px;> not calculating table width correctly
844         - leading to either upside down table or error width less than 1 character
846 Depracated magic_quotes_runtime() in compress.php
848 DIRECTW included twice in compress.php
849 FORMS mark up for compress.php corrected
851 double backslashes not preserved inside <pre> or <textarea>
853 font-weight and font-style not recognised in <pageheader>
855 Progress bars causing corrupt PDF file (out.php) changed fopen from "r" mode to "rb" (binary)
856 Target around image - <a href="#internaltarget"><img ... /></a> - not working
858 SmallCaps in <thead> error
860 Fonts with "name" table in format 1 not recognised correctly
861 Rotated table which does not fit on remaining page, forces a new page even if already at top of page
863 Locale causing problems - all instances of sprintf() using %.3f changed to %.3F so not locale aware
865 CSS border radius not implemented on fixed/absolute positioned block element
867 Background color in rotated table extending way beyond bottom of table
869 Nested table containing <thead> or <tfoot> was confused with <thead> or <tfoot> of parent table
871 Correct handling of spaces, < or & in textarea
873 <option> and <input ..> attributes value/title decoded with fn lesser_entity_decode instead of htmlspecialchars_decode to include &apos;
875 line width not restored to correct value after "line-through" text in Cell()
877 Kannada - incorrect positioning of Reph
879 Forms - In <input> or <option> (select) not correctly handling HTML named entities e.g. &lt; in value or title
880 Active forms - &nbsp; as Value or Title incorrectly showing as Euro - PDFDocEncoding fixed
882 Unicode data in embedded fonts not encrypted when doc encrypted
884 Nested block elements which are empty including innermost one, top margin of innermost block was ignored
886 font-size: xx% inside a block was setting on block's parent font-size
888 Active forms - radio buttons (removed name from Widget - leave on Radio group)
889         causing problems accessing field for radio buttons
891 When using simple tables and border-collapse, if table border set, but cell borders not set, should display table border (fixed)
892 position:fixed block - if neither top nor bottom nor height specified, was positioned incorrectly (y)
893 Leave - if top, bottom, margin-top, margiin-bottom and height are all left unspecified (or auto), will centre vertically
894 on the page (specific to mPDF - not consistent with CSS2.1)
895 But if any one of them are specified (including e.g. margin-top=0), follows CSS spec, so top is the current "static" position
897 background-image-opacity=0 not working on BODY or BLOCK
899 Lists - if LI continues after a nested List, would add as a new LI item (should continue as part of earlier LI item)
901 fn WriteCell() converts to 'windows-1252' when required
902 if multiple calls to mPDF used, cannot redefine function cmp()
903 internal link targets <a name="xx" /> in ToC not moved when using: page-break-inside:avoid
904 internal link targets <a name="xx" /> not moved when using: columns, page-break-inside:avoid, keep-with-table or table rotate
906 Active Forms - onChange not working for SELECT (cf. 5.3.25) Example 57 only worked by chance as JS was carried over from Select to Text field
907 Bug is fixed, but example file needed updating to onCalculate for the display field.
909 Table cell: if height set as %, currently sets it as % of page-width; instead this now ignores it.
911 Bengali letter Khanda Ta (U+09CE) character not recognised; was added in Unicode v4.1 and prior to this, (U+09A4 U+09CD U+200D)
912         so mPDF converts to this string and seems to work.
914 OCR characters wrong size in barcodes if using different ocr font - fixed
916 ===========================
917 mPDF v5.3   (21/07/2011)
918 ===========================
920 New Features
921 ------------
922 - Active forms (see on-line manual for details)
923 - 128-bit encryption (optional) with additional user-permissions (see on-line manual)
925 PLEASE READ - Change in Font management
926 ---------------------------------------
927 The font name imported from the font and included by mPDF in the PDF file was stripping any '-' in the name.
928 This is the PostScript name which is utilised by some PostScript programmes.
929 mPDF has been changed to leave the PostScript font name unchanged. In 99% cases no difference will be noted, but
930 you MUST delete all the temporary font data files cached in the  /ttfontdata/ folder for this to be effective.
933 Minor changes
934 -------------
935 If @page CSS is used to select a first page with settings different from the default, mPDF did create a blank page
936         then pagebreak to the new @page settings - this has been changed so it now will start with the new page settings.
938 New function added: DeletePages($start_page, $end_page=-1)  e.g. $mpdf->DeletePages(1);
939         Can be used just before calling Output()
941 compress.php utility extended to exclude active forms and images-svg
944 Bug fixes
945 ---------
946 - list-style-type: (custom version, user-defined bullet) colour change not working if colour is set on the list item line
947 - background-image: SVG or WMF images as background-images in tables/tr/cells not working
948 - font-weight: bold font not always reset after inline <b>...</b> thus miscalculating width
949 - forms (inactive) in 'c' core fonts using unicode characters 127-255 incorrect display in input text and button text
950 - form elements (inactive) if in-line with mixed size fonts, error in vertical positioning of text related to box
951 - ToC: wrapped lines in ToC not retaining formatting e.g. bold style
952 - HTMLHeaders: using setAutoTopMargin="pad"; not correctly setting top margin for first page
953 - output headers changed: Content-length not used if server uses output compression
954 - embedded font subsets from fonts which contain non-BMP plane 0 characters (incl. e.g. dejavusanscondensed)
955         - causing Adobe Reader to create a CJK encoded font subset internally when loading interactive Forms
956         - Changed so unsets the flag in the subset font to show no non-BMP characters.
959 Configurable variables added (see config.php file):
960 --------------------------------------------------
961 All for Active Forms:
962 $this->useActiveForms
963 $this->formExportType
964 $this->formSubmitNoValueFields
965 $this->formSelectDefaultOption
966 $this->form_border_color
967 $this->form_background_color
968 $this->form_border_width
969 $this->form_border_style
970 $this->form_button_border_color
971 $this->form_button_background_color
972 $this->form_button_border_width
973 $this->form_button_border_style
974 $this->form_radio_color
975 $this->form_radio_background_color
977 PLUS: see additional values added to $this->allowedCSStags close to bottom of file - required for Active forms
980 Updated files
981 -------------
982 mpdf.php
983 config.php  (NB as well as form stuff at top, 5.2.07 $this->allowedCSStags close to bottom of file)
984 compress.php
985 classes/ttfontsuni.php
986 examples/example57...
987 examples/formsubmit.php
991 ===========================
992 mPDF v5.2   (18/06/2011)
993 ===========================
995 New Features
996 ------------------
997 Improvements in font handling resulting in clearer display of fonts on screen, and improved compatibility with PostScript drivers
998         (e.g. use with GSView/GhostScript, see below)
1000 CJK line-breaking implemented (roughly) according to rules. Configurable variables allow control of behaviour (except in tables).
1002 Viewer preferences: added options for initial 2 page display where you can specify whether
1003         1st page is on left or right (cf. SetDisplayMode).
1005 Custom list-style-type for a list (ul,ol) or a list-item (li) in which you can determine the character and colour of the bullet:
1006         list-style-type: U+263Argb(255,0,0); - where U+263A is the Unicode HEX value of the character you want for the bullet
1007         - character MUST be included in the font used for that list item. rgb() bit is optional
1010 Bug fixes
1011 ---------
1012 - Fonts: embedding a BMP TTC font (e.g. Cambria) as a full font caused error
1013 - Table: If cell width set by CSS as %, and page-break-inside avoid requires a new page, was losing the sizing
1014 - Table: table borders CSS parsing error; if border-width, border-style, border-color set, not inherited correctly
1015 - Table: Table background image or gradient not working in HTMLHeader/Footer
1016 - Table: background color set on table (anywhere) will overwrite image/gradient
1017 - Table Background image/gradient: If left/right margin is set on table, gradient/image set on table is too wide
1018 - Table: rotated table - height (after first page does not correctly allow for thead i.e. too much)
1019 - Table: blank <tr></tr> causes error
1020 - Table/Letter-spacing: If letter-spacing set inside table, not calculating table width correctly, and if oversized, freezes
1021 - ToC: ToC at top of page (non-mirrored or already ODD) did not reset page_number if told
1022 - Character subsititutions: characters missed if first element in a $html code e.g. WriteHTML('Not in a tag &#10003;');
1023 - Kerning: kerning info: if reading font file for first time (or if not cached in ttfontdata/) did not register kerning info
1024 - Textarea: multiple new lines run into only one newline
1025 - QRCode - colors wrong because QRcode class only accepts RGB input (hardcoded now to always give black on white)
1026 - QRCode always producing "Your message here"
1027 - Columns: if transforming height of column, not always closing transform Q
1028 - CakePHP compatibility
1029 - compress.php - error due to markup comments in mpdf.php script file
1031 Backwards compatibility
1032 -----------------------
1033 Changes in mPDF 5.2 are backwards compatible with version 5.1
1034 Your document fonts may appear slightly different in the PDF viewer because of the changes to embedded font subsets (cf.)
1035 The new Indic fonts may result in a change in spacing (due to the different character width of the space character from the original font)
1037 PostScript e.g. GSView/GhostScript
1038 ----------------------------------
1039 A number of errors have been reported when opening mPDF-created PDF files with a PostScript programme. Some of the errors were due to mPDF,
1040 but others were due to peculiarities of GSView/GhostScript.
1041 - Diacritic Characters were not displayed when embedding a font subset
1042 - Fonts containing SIP/SMP characters (supplementary Unicode planes) caused errors
1043 - Error with text justification (word-spacing) when embedding a full font can occur in some fonts*
1044 The first 2 problems should now be fixed in v5.2
1045 *The error with text justification can be optionally fixed by setting the configurable variable in config.php:
1046         $this->repackageTTF = true;
1047         When mPDF embeds a full font, it simply embeds the whole original TTF file into the PDF document. For some fonts (containing
1048         a GSUB table) this was causing problems. $this->repackageTTF forces mPDF to repackage the original TTF file excluding some of
1049         the tables like GSUB.
1050 (See ADDITIONAL INFO FONTS.txt in downloaded files)
1053 Font appearance in PDF viewer
1054 -----------------------------
1055 Font subsetting has been improved to include additional information in the embedded file. Overall the effects are of greater clarity
1056 when viewing the document on a screen (it will not affect print output), but the changes are dependent on:
1057 - the original TTF font i.e. the options that the font's author has built into the file
1058 - the PDF viewer i.e. whether the programme chooses to use the available information
1059 - the resolution (zoom) of the page you are viewing
1060 (See ADDITIONAL INFO FONTS.txt in downloaded files)
1063 Indic fonts
1064 -----------
1065 A new set of Indic fonts (ind_xx_1_001) is distributed with version 5.2 containing the additional font information as described above.
1066 In addition, some changes have been made to the ASCII characters in the font from the files previously distributed:
1067 The original files (Raghu font files) do not contain the characters a-z and A-Z. When the first version indic files were created for mPDF,
1068 ALL of the ASCII characters (32-127) were inserted/overwritten from DejaVuSansCondensed to make the font more usable.
1069 In the latest version, only the missing characters are taken from DejaVuSansCondensed, leaving punctuation and numerals from the original
1070 fonts. This also means that the space character has a different width, and this will cause slight changes to the word spacing in documents.
1071 (See ADDITIONAL INFO FONTS.txt in downloaded files)
1074 CJK line-breaking (text wrapping)
1075 ---------------------------------
1076 CJK (chinese-japanese-korean) text often contains no spaces. mPDF previously has wrapped text whenever a character reached the end of
1077 the line. mPDF version 5.2 attempts to follow the line-breaking rules described for each of the languages. Configurable variables
1078 allow some control over this behaviour, especially whether to squeeze a character into the space available at the end of a line, or
1079 whether to allow it to overflow the right margin.
1082 Configurable variables (see config.php file):
1083 ----------------------
1084 Control wrapping of CJK text:
1085         $this->allowCJKorphans = true;  // FALSE=always wrap to next line; TRUE=squeeze or overflow
1086         $this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only selected)
1087 When Embedding full TTF font files, remakes the font file using only core tables
1088 May improve function with PostScript printers
1089         $this->repackageTTF = false;
1091 Updated files
1092 -------------
1093 mpdf.php
1094 compress.php
1095 utils/font_dump.php
1096 classes/ttfontsuni.php
1097 config.php (3 new variables - see above)
1099 All ttfonts/ind_*
1100 New set of Indic fonts for PostScript compatibilty - and clearer font display
1104 ===========================
1105 mPDF v5.1   (27/02/2011)
1106 ===========================
1108 New Features
1109 ------------
1110 - CSS background (images, colours or gradients) on <TR> and <TABLE>
1111 - CSS border on <TR> (only in border-collapsed mode)
1112 - support for Mozilla and CSS3 gradient syntax:
1113         -moz-linear-gradient, linear-gradient
1114         -moz-radial-gradient, radial-gradient
1115         -moz-repeating-linear-gradient, linear-repeating-gradient
1116         -moz-repeating-radial-gradient, radial-repeating-gradient
1117 - expanded support for gradients (including in SVG images):
1118         - multiple colour 'stops'
1119         - opacity (transparency)
1120         - angle and/or position can be specified
1121 - gradient can be used as an image mask (custom mPDF styles: gradient-mask)
1122 - image-orientation supported for <IMG> (similar to existing custom mPDF attribute: rotate) [CSS3]
1123 - image-resolution supported for <IMG> [CSS3]
1124 - background-image-resolution (custom mPDF CSS-type style) to define resolution of background images
1125 - improved support for SVG images
1126 - SVG and WMF images supported in background-image
1127 - file attachments
1128 - numeric list-styles added e.g. arabic-indic, bengali, devanagari, persian, thai [CSS3]
1129 - font kerning supported (inter-character spacing between specific pairs)
1130 - letter-spacing and word-spacing supported [CSS3]
1131 - colors supported as rgb(), rgba(), hsl(), hsla(), cmyk(), cmyka(), or spot()
1132 - spot colors supported e.g PANTONE 310 EC
1133 - PDF/X compatible files
1134 - optionally force use of grayscale, RGB or CMYK colorspace
1135 - automatic colour conversion for most objects between grayscale, RGB and CMYK
1137 Backwards compatibility
1138 -----------------------
1139 Most changes in mPDF 5.1 are backwards compatible with version 5.0 i.e. your documents should
1140 look the same running 5.1   However some changes may alter display from previous versions:
1141 - RTL (right-to-left) languages - see below
1142 - bleed margins when using @page CSS - see below
1143 - Default distance for "cross" from inner margin changed 10->5mm [hardcoded in fn. Footer()]
1144 - If height set on a block element, will force a new page if set-height will not fit on page
1145 - If table rotated, 5mm margin at bottom is now reduced to 1mm
1146 - If image is too big for page and automatically sixed to maximum height of page, 10mm margin at bottom reduced to 1mm
1148 Colours may appear more vibrant
1149 -------------------------------
1150 Unless specifically set, Adobe Reader uses the RGB colorSpace by default when displaying documents. However
1151 if an image or gradient using transparency (or alpha channel) is included in the document, Adobe Reader
1152 automatically sets the default colorSpace to CMYK - which makes the colours look less vibrant/bright on screen.
1153 mPDF 5.1 now specifies by default a colorSpace RGB for each page, and this will maintain the more
1154 vibrant colours. This is overridden if you use on of the options to restrict the colorSpace (cf.)
1158 **** IMPORTANT - PLEASE READ IF USING RTL SCRIPTS ****
1159 Handling of RTL (right-to-left) languages has been significantly rewritten, and is likely to cause
1160 changes to the resulting files if you have previously been using mPDF. The changes have made mPDF
1161 act more like a browser, respecting the HTML/CSS rules.
1162 Changes include:
1163 - the document now has a baseline direction; this determines the
1164         - behaviour of blocks for which text-align has not been specifically set
1165         - layout of mirrored page-margins, columns, ToC and Indexes, headers and footers
1166         - base direction can be set by any of:
1167                 - $mpdf->SetDirectionality('rtl');
1168                 - <html dir="rtl" or style="direction: rtl;">
1169                 - <body dir="rtl" or style="direction: rtl;">
1170         - base direction is an inherited CSS property, so will affect all content, unless...
1171 - direction can be set for all HTML block elements e.g. <DIV><P><TABLE><UL> etc using
1172         - CSS property < style="direction: rtl;">
1173         - direction can only be set on the top-level element of nested lists
1174         - direction can only be set on <TABLE>, NOT on THEAD, TBODY, TD etc.
1175         - nested tables CAN have different directions
1176 - NOTE that block/table margins/paddings are NOT reversed by direction
1177         NB mPDF <5.1 reversed the margins/paddings for blocks when RTL set.
1178 - language (either CSS "lang", using Autofont, or through initial set-up e.g. $mpdf = new mPDF('ar') )
1179         no longer affects direction in any way.
1180         NB config_cp.php has been changed as a result; any values of "dir" set here are now ineffective
1181 - default text-align is now as per CSS spec: "a nameless value which is dependent on direction"
1182         NB default text-align removed in default stylesheet in config.php
1183 - once text-align is specified, it is respected and inherited
1184         NB mPDF <5.1 reversed the text-align property for all blocks when RTL set.
1185 - the configurable value $rtlcss is depracated, as it is no longer required
1186 - improved algorithm for dtermining text direction
1187         - english word blocks are handled in text reversal as one block i.e. dir="rtl"
1188         [arabic text] this will not be reversed [arabic text]
1189         - arabic numerals 0-9 handled correctly
1191 Although the control of direction for block elements is now more configurable, the control of
1192 text direction (RTL arabic characters) remains fully automatic and unconfigurable.
1193 <BDO> etc has no effect. Enclosing text in silent tags can sometimes help e.g.
1194         content<span>[arabic text]</span>content
1196 Justified text
1197 --------------
1198 Text-align: justify - no longer uses configurable variable $jSpacing= C | W | ''
1199 The default value is for mixed letter- and word-spacing, set by jSWord and jSmaxChar
1200 If a line contains a cursive script (RTL or Indic [devanagari, punjabi, bengali]) then it prevents letter-spacing
1201 for justification on that line - effectively the same as setting letter-spacing:0
1202 Spacing values have been removed from the config_cp.php configuration file, so the "lang" property
1203 (in config_cp) no longer determines justification behaviour (this includes the use of Autofont()).
1204 When using RTL or Indic [devanagari, punjabi, bengali] scripts, you should set CSS letter-spacing:0
1205 whenever you use text-align:justify.
1208 @page media
1209 -----------
1210 When using @page to create a print publication with page-size less than sheet-size
1211 - bleed margin is now configurable (also crop- and cross-mark margins)
1212 - backgrounds/gradients/images now use the bleed box as their "container box"
1213 - odd-header-name: supports the value "_default" - allows current non-HTML header to remain unchanged
1214 - marks: crop cross; i.e. both together supported
1215 - background-image-opacity and background-image-resize now work with @page CSS
1218 SVG images - extended support
1219 -----------------------------
1220 - support for spreadMethod property for gradients (repeat and reflect)
1221 - support for style="font-family; font-size; font-style; font-weight" i.e. inline CSS
1222 - when viewPort="" and width="" height="" all specified, uses width to set SVG size of a "pixel"
1223 - support for opacity and multiple "stops" (and colorspace) in gradients
1227 Minor Enhancements
1228 ------------------
1229 - support for colors as rgb(87%, 56%, 25%) [used especially in SVG]
1230 - added option of "NoPrintScaling" in SetDisplayPreferences
1231 - compress.php - now combines BACKGROUND-IMAGES and GRADIENTS as BACKGROUNDS, and added PROGRESS-BAR
1232 - table with THEAD row will force a new page if no room for the THEAD AND a row from TBODY
1233 - Small-Caps now works properly together with text-align justify
1234 - embedded font subsets restructured (minor) for greater compatibility e.g. with Postscript printers
1235 - PDF/A will convert everything except grayscale to RGB (by default) or CMYK (optionally)
1240 Bug fixes
1241 ---------
1242 - Display changed to CMYK colour gamut when document contained an object with transparency set.
1243         Now will retain RGB colorspace (brighter colours)
1244 - If using dir="rtl", tables containing nested tables were not properly reversed
1245 - "text-rotate: 0" set in CSS stylesheet did not 'undo' any text-rotate set on the row (TR)
1246 - Malayalam - character re-ordering
1247 - If height set on a block element, was not taking account of padding top/bottom
1248 - embedded font subsets: error in array of Font Widths fixed
1249 - <style>..</style> containing /* import url() */ the comments were not ignored
1250 - If call mPDF class more than once, error using multiple barcodes or gif files because classes not reinstantiated
1251 - Floating blocks were collapsing bottom/top margins - incorrectly
1252 - Table: if colspan>1 contents are wider than the width of the included columns, did not increase column width(s) to accommodate
1253 - Resizing table - script hanging and new page forced when not required (still)
1254 - If a table style="page-break-inside:avoid" not fit on the page, was adding new page before resizing EVEN IF on a blank page
1255 - End of 2 blocks (e.g. </div></div>) at very bottom of page, forcing unwanted pagebreak
1256 - Corrected handling of tags inside <pre>
1257 - RTL left-aligned text - line ending with <br /> not correctly left-aligned
1258 - <input type=submit|reset etc name="xxx" e.g. Google button showed as I&039;m feeling lucky
1259 - Annotations all linked to Page 1 (parent object)
1260 - Error "division by zero" using columns
1261 - MultiCell() and Write() [direct writing functions] - miscalculating length of line in non-core fonts (+ other bugs)
1262 - error if CJK space at end or beginning of line with 0x20 spaces in as well
1264 Configurable variables (see config.php file):
1265 ----------------------
1266 $this->printers_info
1267 $this->bleedMargin
1268 $this->crossMarkMargin
1269 $this->cropMarkMargin
1270 $this->cropMarkLength
1271 $this->nonPrintMargin
1272 $this->restrictColorSpace
1273 $this->PDFX
1274 $this->PDFXauto;
1275 $this->useKerning
1276 [$this->rtlcss removed]
1278 Updated files
1279 -------------
1280 mpdf.php
1281 config.php
1282 config_cp.php (removed references to dir - but not essential to update - just redundant information)
1283 compress.php
1284 includes/out.php
1285 includes/functions.php
1286 classes/svg.php
1287 classes/ttfontsuni.php
1288 classes/indic.php
1289 /font/helvetica*.php and /times*.php
1291 Added CSS support
1292 =================
1293 All Block elements including <BODY> <TABLE> <TR>
1294 ------------------------------------------------
1295 background-image-resolution: normal | [ from-image || <dpi> ]
1296 direction: [ rtl | ltr ]        (HTML attribute dir also supported)
1297 background: [ gradients ]
1298 background-image: [gradients ]
1300 For [ gradients ] syntax see:
1301 - Mozilla linear - https://developer.mozilla.org/en/CSS/-moz-linear-gradient
1302 - Mozilla radial - https://developer.mozilla.org/en/CSS/-moz-radial-gradient
1303 - Mozilla gradients use - https://developer.mozilla.org/en/Using_gradients
1304 - CSS3 linear gradients - http://dev.w3.org/csswg/css3-images/#linear-gradients
1305 - CSS3 radial gradients - http://dev.w3.org/csswg/css3-images/#radial-gradients
1308 Almost all elements - block and in-line
1309 ---------------------------------------
1310 font-kerning: auto | normal | none      // need to set $mpdf->useKerning = true;
1311 letter-spacing: normal | <length>
1312 word-spacing: normal | <length>
1314 Colours
1315 -------
1316 Anywhere that color is specified (e.g. color, background-color, borders)
1317 - rgb(255,255,255)
1318 - rgba(255,255,255,1)           // last value is transparency (alpha) - between 0-1
1319 - rgb(100%,100%,100%)
1320 - hsl(360,100%,100%)            // H: 0-360; S/L: 0-100%; a:0-1
1321 - hsla(360,100%,100%,1)
1322 - cmyk(100,100,100,100)         // or 0-100%
1323 - spot(COLOR NAME, 100%)        // e.g PANTONE 310 EC; use AddSpotColor() to define first
1325 <TR>
1326 border:
1328 <TABLE> <TR>
1329 background:
1330 background-color:
1331 background-image:
1333 <IMG>
1334 gradient-mask: [can use any of the gradient syntax]
1335 image-orientation: <angle>                              - supports deg, rad or grad
1336 image-resolution: normal | [ from-image || <dpi> ]
1338 <OL|UL>
1339 list-style: arabic-indic | bengali | devanagari | gujarati | gurmukhi | kannada | malayalam | oriya |
1340                 persian | telugu | thai | urdu | tamil
1343 @page
1344 marks: [ crop || cross ]                - i.e. crop and cross can be used together
1345 odd-header-name: "_default"             - allows current non-HTML header to remain unchanged
1346 background-image-opacity: [ 0-1 ]
1347 background-image-resize: [ 1-6 ]        - see Manual
1350 ===========================
1351 mPDF v5.0   (30/09/2010)
1352 ===========================
1354 New Features
1355 ------------
1356 - Font handling simplified, reads TrueType font files directly
1359 Minor Enhancements
1360 ------------------
1361 - rotation of fixed-position block elements (see example 10 and manual for supported CSS)
1362 - support for CSS Small-Caps font-variant added
1363 - utility scripts in /utils/ folder to help font management
1364 - new simplified functions AddPageByArray() and TOCPageBreakByArray() added
1365 - progress bar simplified and customisable
1366 - improved word-wrapping for CJK langauges
1367 - improved recognition of CJK/Indic/Arabic characters
1368 - invalid UTF-8 input now outputs a meaningful error by displaying input html with errors marked
1369 - GIF or PNG images with transparency/interlaced/non-standard compression handled as internal data
1370         if /tmp/ folder is not present or writeable
1371 - support for <html dir="rtl">
1372 - support for "display: none" on inline elements
1373 - annotations supported in fixed-position block elements
1376 Bug fixes
1377 ---------
1378 - <br /> preceded by space does not correctly text-align to right
1379 - zero-width character in middle of line caused line-break (e.g. diacritic or U+200C = ZWNJ)
1380 - HTML attributes not recognised if spaces e.g. 'src = "..."'
1381 - Headers changed for output - problem reported on IE8 64-bit using SSL
1382 - using SetAutoPageBreak(false) used caused unexpected behaviour with table rows at page break
1383 - (from Beta) incorrect check for temporary font data folder causing errors
1384 - artificial Bold/Italic not working in table cell when using rotated text
1385 - allow <dottab> to inherit font color correctly
1386 - SVG now works with Adobe 7
1387 - background in header overwriting text
1388 - vertical text in table header not correctly horizontally positioned when repeated
1389 - compatibility with PHP >= 4.3 (htmlspecialchars_decode, stripos)
1390 - updated depracated script PHP 5.3.0 ($string{1} to $string[1], $var =& new Object(), set_magic_quotes_runtime)
1391 - index (CreateIndex) number string incorrect if arabic(rtl) text anywhere in document
1392 - MultiCell incorrectly calculate string length/width when using core fonts
1393 - page-break-inside:avoid - used with non-HTML footer had space inserted for footer height
1394 - page-break-inside:avoid - error if more than 1 page height but not enough to trigger second pagebreak
1395 - page-break-inside:avoid - incorrectly layering page backgrounds (headers and content brought forward)
1398 Changes from 5.0 Beta
1399 ---------------------
1400 If you are upgrading from the Beta version - you MUST delete all files in the  /ttfontdata/ temporary directory
1401 - config.php file has been changed (extra CJK characters to recognise CJK blocks)
1402 - $this->backupSubsFont (in config_fonts.php) optionally now takes an array
1403 - no need to define 'cjk'=>true or 'sip|smp'=>true in config_fonts.php (ignored; cf. $this->BMPonly)
1404 - Indic language fonts have been altered to add Latin and Latin-1 Supplement characters
1405 - progress bars now has an external progbar.css and configurable main heading
1406 - added initial parameter new mPDF('+aCJK') or '-aCJK' to override default useAdobeCJK at runtime
1407 - QRCode is not included in main download (but as an extra package)
1409 BACKWARD COMPATIBILITY
1410 ----------------------
1411 If you have been using earlier versions of mPDF, most scripts should work as before. But note:
1412 - Arial, Helvetica, Times and Courier are now treated like any other font
1413 - the whole CSS font string is parsed e.g. style="font-family:'Lucida Grande';" will look for a font 'lucidagrande'
1414 and not 'lucida'
1416 Configurable variables (see config.php file):
1417 ----------------------
1418 - $mpdf->useSubstitutionsMB is now depracated, but will work as an alias for $mpdf->useSubstitutions
1419 The initial parameters e.g. new mPDF('utf-8') have all changed. Old ones may be recognised, or will be ignored.
1420 - $mpdf->useOnlyCoreFonts is now depracated and is ignored. Use new mPDF('c')
1421 - $this->use_CJK_only is now depracated and is ignored. See $this->useAdobeCJK and new mPDF('+aCJK') or '-aCJK'
1422 Control SmallCaps appearance
1423 - $mpdf->smCapsScale = 0.75;    // Factor of 1 to scale capital letters
1424 - $mpdf->smCapsStretch = 115;   // % to stretch small caps horizontally
1425 Customisable Progress bar
1426 - $mpdf->progbar_heading = 'mPDF file progress';
1427 - $mpdf->progbar_altHTML = '';
1428 Control fonts/subsetting
1429 - $mpdf->maxTTFFilesize = 2000;
1430 - $mpdf->percentSubset = 30;
1431 - $mpdf->debugfonts                     // show font errors and warnings
1432 Replaceable alias
1433 - $mpdf->iterationCounter = false;      // Allow use of {iteration varname} in THEAD
1436 ===========================
1437 mPDF v5.0Beta   (21/07/2010)
1438 ===========================
1440 New features
1441 ------------
1442 The main change in mPDF v5 is the handling of TTF and TTC fonts directly.
1443 See README.txt and FONT INFO.txt for more information
1446 QR-code (2-dimensional barcode) Added
1447 -------------------------------------
1448 type="QR"
1449 Size=1 is an arbitrary 25mm widthxheight. error="L|M|H|Q"
1450 text="" can be numeric, alphanumeric or binary(?)
1451 Required whitespace is always included around it
1454 Enhancements
1455 ------------
1456 - progress-bar is simplified (no javascript class)
1457 - dir="rtl" supported in <html> or <body> tag
1459 Bug fixes
1460 ---------
1461 - artificial Bold/Italic now working in table cells with rotated text
1462 - "-" is now allowed in a font name e.g. sun-exta
1463 - <dottab> now inherits font color correctly
1464 - SVG class bugs fixed (was crashing in Adobe Reader v 7)
1465 - background color/image in header no longer overwrites the header text
1467 Changed Config variables
1468 ------------------------
1469 $this->useSubstitutionsMB is depracated
1470 Character substitution always occurs when using core fonts.
1471 Use $this->useSubstitutions for all cases.
1474 New Configurable variables
1475 --------------------------
1476 $this->useAdobeCJK = true;              // Uses Adobe CJK fonts for CJK languages
1477                         // default TRUE; only set false if you have defined some available fonts that support CJK
1478                         // If true this will not stop other CJK fonts if specified by font-family:
1479                         // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
1481 // Set maximum size of TTF font file to allow non-subsets - in kB
1482 // Used to avoid e.g. Arial Unicode MS (perhaps used for substituteCharsMB) to ever be fully embedded
1483 // NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
1484 $this->maxTTFFilesize = 2000;
1486 // If not -s (i.e. forced subset) this value determines whether to subset or not
1487 // 0 - 100 = percent characters
1488 // i.e. if ==40, mPDF will embed whole font if >40% characters in that font
1489 // or embed subset if <40% characters
1490 // 0 will force whole file to be embedded
1491 // 100 will force always to subset
1492 $this->percentSubset = 30;
1494 $this->debugfonts - show errors and warnings for font parsing
1496 Config variables removed
1497 ------------------------
1498 $this->use_CJK_only
1499 $this->useOnlyCoreFonts
1501 ================================================================================
1503 ====
1505 ====
1507 mPDF
1509 files changed:
1510 mpdf.php
1511 config.php
1512 makefonts/makefonts.php
1513 class/t1asm.php
1514 class/svg.php
1515 graph.php
1517 examples_04 (images)
1519 config var added:
1520 $this->tableMinSizePriority
1522 4.5.015
1523 Bug fix:
1524 Complex page with ToC entries ++ (example_ToC_bug4_5_015.php) caused Apache to crash
1525 AdjustHTML() preg_pattern for matching <hx>... </hx>  <table for keep-together - altered and fixed ? matching
1526 Seemed to crash when content="Graph 12" between the <h> - 2 numbers (12) crash, 1 didn't!!!
1529 4.5.014
1530 Bug fix:
1531 Using TrueType fonts, unused font is not embedded in the PDF doc. This was fine except an error message appeared after printing in Adobe Reader,
1532 because Font reference /F1 still present in doc pointing to non-existent resource.
1533 Edited so that the reference is now removed from the page if font unused.
1536 4.5.013
1537 Enhancement
1538 TrueTypeUnicode fonts width array inserted as shortened form array (smaller file size)
1540 4.5.012
1541 Bug fix: Incorrect handling orphan characters in table
1542 (cf. http://mpdf.bpm1.com/forum/comments.php?DiscussionID=193 fixed in 4.2 - but going back to it still problems)
1543 If xxxxx. fits but xxxxx.. doesn't: WriteFlowingBlock wraps it to next line, TableWordWrap sqeezed it onto one line
1544 TableWordWrap fixed to only allow one orphan char. even if it fits with that one.
1547 4.5.011
1548 Added Windows BMP image support
1550 4.5.010
1551 SVG class:
1552 - improved recognition of lineargradients/radialgradients referenced by xlink:href
1553 - does not die if empty text string
1554 - support for many text properties as style="" as well as currently as attributes (bold, fill etc)
1555 - if using MB font, was respecting "Times" and "Courier" from the SVG file but using as ANSI not utf-8
1557 4.5.009
1558 graph.php updated to include SVG - need to define in graph.php (as well as set up TTF fonts)
1559 (SVG graph does not include CSIM, 3D skew.)
1561 4.5.008
1562 t1asm.php has an error in the error message if .dat fontfile not found (".char.dat")
1564 4.5.007
1565 Bug fix: Using page-break-inside:avoid, if nothing would have been printed on page 1 before next page, elements going all over the place!
1566         Also problem shifting images - fixed
1567         Also wasn't shifting WMF/SVG images - fixed
1569 4.5.006
1570 New config var
1571 $this->tableMinSizePriority = false;
1572 If page-break-inside:avoid but cannot fit on full page without
1573 exceeding autosize; setting this value to true will force respsect for
1574 autosize, and disable the page-break-inside:avoid
1575 [NB edit Manual Table>>autolayout algorithm]
1578 4.5.005
1579 Bug fix
1580 Table set to avoid page-break-inside: in some circumstances entered loop with recalculating size
1581 Fudge factor added of 0.001 in tbsqrt to calculate shrink factor
1583 4.5.004
1584 Bug fix
1585 If table set to avoid page-break-inside and table height (resized) exactly==remaining page - was triggering page break
1586 Fudge factor added of 0.001 in tablewrite to query pagebreak
1588 4.5.003
1589 Bug fix in makefonts/makefonts.php
1590 Also changed the links in Step4 & 8 which move the newly created files to the font directory - will now show error message if error -
1591 will NOT overwrite existing files. (Put in manual already)
1593 4.5.002
1594 Bug fix in class/t1asm.php
1595 If you have magic_quotes_runtime set On - problems using embedded subset.
1597 4.5.001
1598 JPG "Exif" file recognised from header, and handled much more quickly and efficiently (not using GD)
1602 ===========================
1603 mPDF v4.5   (21/04/2010)
1604 ===========================
1606 New Features
1607 ------------
1608 The main change in 4.5 is the improved class for importing SVG images. (See details below)
1610 Font files
1611 ----------
1612 Some bugs in the "makefonts" utility caused some errors in the files produced for embedding font subsets.
1613 Surprisingly these are not easily detectable (I have yet to find one!).
1614 All the font files used for embedding font subsets (the .dat and .dat.php files in /unifont/ folder)
1615 have been re-generated. Download them if you are having problems with any fonts - otherwise, you probably
1616 don't need to bother.
1618 Minor Enhancements
1619 ------------------
1620 If keepColumns = true (i.e. disable readjustment of column length), mPDF will now reproduce
1621 table header/footer rows in each column [4.4.015]
1623 A number of changes to improve processing time [4.4.012]
1624 [Thanks to carlholmberg http://mpdf.bpm1.com/forum/comments.php?DiscussionID=274&page=1#Item_3]
1626 JPG files with header marked as "progressive DCT-based JPEG" are now supported [4.4.004]
1628 Configurable variable (config.php) $dpi can be set to vary size interpreted from "px" values in HTML/CSS
1629 NB Recommended that $dpi should always be set the same as $img_dpi
1631 Support added for "ex" as a size value (approximates "ex" as half of font height)
1633 Configurable variable (config.php) $watermarkImgAlphaBlend will determine how watermark images
1634 will blend with underlying objects.
1637 Bug fixes
1638 ---------
1639 - Make-fonts utility : makefonts/makefonts.php [4.4.016]
1640         (All font files have been updated)
1641 - Table header of only one column width - not printing right border [4.4.014]
1642 - WMF and SVG images not rotating correctly to 90 or -90 degrees [4.4.013]
1643 - Using templates, error if imported doc contains templates itself [4.4.001]
1646 Updated Files
1647 -------------
1648 mpdf.php
1649 config.php
1650 classes/svg.php
1651 makefonts/makefonts.php
1652 ALL subset font files (/unifont/ .dat and .dat.php files), and all garuda and norasi files
1654 New files
1655 ---------
1656 None
1658 New config variables
1659 --------------------
1660 $this->watermarkImgAlphaBlend
1661 $this->dpi
1663 BACKWARD COMPATIBILITY
1664 ----------------------
1665 All but one changes in mPDF 4.5 are fully backwards compatible.
1666 The configurable variable $this->watermarkImgBehind was introduced in v4.4 and was unintentionally set to TRUE
1667 In v4.5 this is set to FALSE in the config.php file.
1670 SVG Images
1671 ----------
1672 [svg.php CHANGED]
1673 - Text stroke-width default changed to 1 [4.4.011]
1674 - Text stroke - line-join type changed [4.4.010]
1675 - Default value for fill changed to "black" [4.4.008]
1676 - Bug fixes:
1677   * to correct calculation of text-length (and therefore alignment R and C) [4.4.009]
1678   * Corrected errors in path implementation esp. quadratic Bezier curves
1679   * rounded corners to rectangles - error corrected
1680   * Recognition of font-family improved
1681   * remove \n (and other non-printable chars) from text
1682   * zero length shapes are not output e.g. zero-width rectangle, zero-length line, zero-radius circle
1683 - Support added for:
1684   * gradient stop offsets and gradientUnits="userSpaceOnUse" [4.4.007]
1685         In mpdf.php enabled define inner radius for radial gradients - only used internally by SVG at present
1686   * user defined <ENTITY /> cf. 'render-elems-03-t.svg' in SVG Test Suite [4.4.006]
1687   * "color" attribute and "currentColor" value for fill and stroke [4.4.005]
1688   * fill:url(#...) in a style as well as attribute
1689   * xlink:href for gradients
1690   * 1.3002e-005 in svg path
1691   * text-style changes (e.g. text-anchor) set on <g> element - not just on <text>
1692   * fill-rule=evenodd|nozero
1693   * dashed lines / stroke-dasharray & stroke-dashoffset
1694   * gradientUnits=userSpaceOnUse;
1695   * units e.g. 3mm or 14pt in Rectangle, Circle, Ellipse, Line and Text position
1696   * transform on <text> element
1697   * stroke as well as fill on text
1699 NB The following are still NOT supported for SVG
1700 - filters
1701 - <marker>
1702 - images
1703 - DOM
1704 - <pattern>
1705 - textlength; lengthadjust; tspan, tref, toap, textPath;
1706 - <use ../>
1707 - gradient on stroke/text;
1708 - <clipPath>
1709 - text-underline and strikethrough
1710 - text opacity
1711 - colors as rgb(87%, 56%, 25%)
1712 - rect using units for dimensions
1713 - Only uses default spreadMethod = "pad" for gradients
1719 ===========================
1720 mPDF v4.4   (24/03/2010)
1721 ===========================
1723 New Features
1724 ------------
1725 - Support SVG image files (partial)
1726 - Rotate images or graphs (by multiples of 90 degrees)
1727 - Set opacity (transparency) for background images
1728 - Control resizing of background images
1729 - Set whether to print watermark images behind or in front of page contents
1730 - Reduced memory usage when printing tables (partly configurable)
1731 - Option to set path to folder for temporary files
1732 - Improved compliance for CSS text-align justify
1733 - Increased support for CSS "media"
1734 - Improved performance when accessing local image files
1737 Minor Enhancements
1738 ------------------
1739 - Allows space in output file name e.g. $mpdf->Output('t est.pdf','D'); [4.3.007B]
1740 - Header changed in Output to improve compatability with IE6 (affects 'D' and 'I') [4.3.012B]
1741 - background-images do not show noimage.jpg if missing [4.3.012D]
1742 - simpleTables (which improves performance) now also allows: background-color, -gradient and -image, padding
1743         and rotated text to be set for each cell. Only borders are not supported cell-by-cell. [4.3.006]
1746 Bug fixes
1747 ---------
1748 - Page width not correctly reset when defining default page margins (L/R) by @page [4.3.007C]
1749 - Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.3.005]
1750         NB This should have been fixed in [4.2.028] but got left out!
1751 - UseSubstitutionsMB causes errors inside <textarea> and <select> so now disabled in these 2 situations [4.3.004]
1752 - CSS background: 'none' did not cancel background-image/background-color if it comes later [4.3.002, 4.3.011]
1753 - Warning message 'depracated' (as of PHP 5.3) when using Templates [4.3.007]
1754 - AutoFont incorrectly altering multibyte characters ending in \xa0 [4.3.012C]
1755 - "Initial" default value for border-width changed from 1px to 'medium' e.g. border-top: solid #000000; [4.3.010]
1756 - WMF image sometimes inverted [4.3.016]
1758 Updated Files
1759 -------------
1760 mpdf.php
1761 config.php
1762 changelog.txt
1765 New files
1766 ---------
1767 classes/svg.php
1770 New config variables
1771 --------------------
1772 $this->justifyB4br=false;
1773 $this->CSSselectMedia='print';
1774 $this->watermarkImgBehind = false;
1776 BACKWARD COMPATIBILITY
1777 ----------------------
1778 All changes are backwards compatible except the handling of some background-images - please see notes below.
1781 Watermark Image z-order
1782 -----------------------
1783 By default mPDF prints watermarks on top of the page contents to ensure that they are not hidden by backgrounds
1784 (especially table cells).
1785 You can specify watermark images to be printed behind page contents by setting a configurable variable:
1786 $this->watermarkImgBehind = true;  // default=false
1787 [4.3.018]
1790 Rotating Images and Graphs
1791 --------------------------
1792 Images or graphs can be rotated (by multiples of 90 degrees) using a custom HTML attribute e.g.
1793 <img rotate="90|-90|180" ... />
1794 <jpgraph rotate="90" ... />
1795 Valid options are: 90|-90|180.
1796 Positive values are clockwise.
1797 If width is specified e.g. width="3cm" this is applied to the rotated image i.e. will be width 3cm after rotating
1798 [4.3.016]
1801 Background Image Opacity
1802 ------------------------
1803 A custom CSS property "background-image-opacity": is now supported on BODY, DIV+ (block elements) and TD
1804 Takes values between 0 and 1.0
1807 Resizing Background Images
1808 --------------------------
1809 A custom CSS property "background-image-resize": is now supported on BODY, DIV+ (block elements) and TD
1810 0 - No resizing (default)
1811 1 - Shrink-to-fit w (keep aspect ratio)
1812 2 - Shrink-to-fit h (keep aspect ratio)
1813 3 - Shrink-to-fit w and/or h (keep aspect ratio)
1814 4 - Resize-to-fit w (keep aspect ratio)
1815 5 - Resize-to-fit h (keep aspect ratio)
1816 6 - Resize-to-fit w and h
1818 N.B. Prior to v4.4 background-images were incorrectly constrained to maximum width of the containing block.
1819 The default is now to do NO resizing on background-images. Setting "background-image-resize:3" should be used
1820 for backwards compatibility.
1821 [4.3.015, 4.3.012D]
1824 SVG Image files
1825 ---------------
1826 SVG image files are now partially supported (but as for WMF - not as background-images).
1827 viewBox (preserveAspectRatio is not supported)  viewBox="0 0 400 200"  width="400" height="200"
1828 Takes viewBox in preference to width/height if present on <svg>
1829 If neither present, will size to width of page (square) as the containing box.
1830 Units are interpreted as pixels if undefined.
1831 Doesn't recognise internal CSS <style> elements
1832 Gradients only take 2 colours which are taken as stop-offset 0% and 100%
1833 [4.3.013 & 4.3.017]
1836 Reduced Memory Usage printing Tables
1837 ------------------------------------
1838 mPDF uses a lot of memory when processing large tables. Parts of the script have been rewritten to
1839 reduce memory consumption when writing tables which use collapsed borders (10-25% saving).
1841 Memory usage can be reduced further by setting a configurable variable:
1842 $this->packTableData = true;  // default=false
1843 but note that this causes a significant increase in processing time.
1844 [4.3.008, 4.3.019, 4.3.014]
1848 User-defined path to Temporary folder
1849 -------------------------------------
1850 mPDF uses a folder to write and store temporary files when processing images. By default this is the
1851 [your_path_to_mpdf]/tmp/
1852 This is now user-definable by defining the constant _MPDF_TEMP_PATH before including mpdf.php script.
1855 Text Justification
1856 ------------------
1857 In a justified text block, an inline image, textarea, input, or select causing a new line will now force
1858 the previous line to be justified. HR and BR do NOT force justification (as in browsers).
1859 For optional compliance of MS Word behaviour, there is a new configurable variable:
1860 $this->justifyB4br = false;     // Change to true to force justification before a <BR> (as in MS Word)
1861 [4.3.003]
1864 CSS support for @media
1865 ----------------------
1866 Now supports media-dependent CSS styles e.g.
1867 @media print {
1868         p { color: red; }
1870 as well as
1871 <style media="...">...</style> and
1872 <link rel="stylesheet" media="print" href="..." />
1873 Proper matching of CSS media to select using configurable variable:
1874 $this->CSSselectMedia='print';  //  default="print" set in config.php : screen, print, or any other CSS @media type (not "all")
1875 N.B. $this->disablePrintCSS in now depracated
1876 [4.3.001]
1881 ===========================
1882 mPDF v4.3   (28/02/2010)
1883 ===========================
1885 NEW FEATURES
1886 ------------
1887 - Page (sheet) size can be reset within document (https://mpdf.github.io/paging/different-page-sizes.html) [4.2.024, 4.2.025]
1888 - PDF/A1-b compliant files (https://mpdf.github.io/what-else-can-i-do/pdf-a1-b-compliance.html)
1889 - Improve performance using simpleTables (https://mpdf.github.io/reference/mpdf-variables/simpletables.html)
1890 - mPDFI incorporated into main mPDF class (https://mpdf.github.io/reference/mpdf-functions/setimportuse.html)
1891 - <dottab> added as custom HTML tag: inserts dots to the following text, which is right-aligned [4.2.031]
1893 See Example files 38 and 39 for PDFA compliant file and <dottab>
1895 BACKWARD COMPATIBILITY
1896 ----------------------
1897 All changes are backwards compatible except the use of mPDFI. You will need to make minor changes to your scripts.
1898 See the manual https://mpdf.github.io/reference/mpdf-functions/setimportuse.html for details.
1900 BUG FIXES
1901 ---------
1902 - When using Table of Contents and not resetting page numbers: HTML headers/footers showed incorrect page number [4.2.020]
1903 - Table of Contents: last page not printing page background-color [4.2.023]
1904 - Image file with space " " in the file name failing [4.2.016]
1905 - Image file path unnecessarily resolved to full URI - changed to use relative path if possible [4.2.029] ***
1906 - Table - not calculating height of cell correctly [4.2.015, 4.2.012, 4.2.011, 4.2.009]
1907 - Table row breaking after/during cell when image in cell taller than font-height [4.2.008]
1908 - When Table row(cell) greater height than the page-height but requiring resizing greater than allowed by autosize - not resizing [4.2.005]
1909 - Table cell border not resized correctly [4.2.002]
1910 - Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.2.028] ****
1911 - Background-image in HTMLFooter not correctly setting 0,0 origin [4.2.014]
1912 - Background-image set as an in-line style not working [4.2.013]
1913 - Background-image set in CSS @page or <body> was being constrained to less than page size [4.2.032]
1914 - Imported Templates overwriting Headers (with images or gradients) [4.2.004]
1915 - When using imports/templates, HTML header with background-image causing page to disappear [4.2.001]
1916 - block-style element breaking over more than 2 pages incorrectly adjusting L/R margins [4.2.022]
1917 - CSS @page property "size" set on :left :right or :first pseudo-selectors - disabled [4.2.022]
1918 - Annotations default colour incorrectly set in PDF as [100 100 0] corrected to [1 1 0] (seemed to work ok?) [4.2.026]
1919 - Overwrite() now parses input file more tolerantly recognising more source files [4.2.030]
1921 **** Bug fix 4.2.028 never got into the release of v4.3  Included in next release [4.3.005]
1922 **** Bug fix 4.2.029 never not fully implmented in v4.3  Included in next release [4.3.012]
1924 Changed files
1925 -------------
1926 mpdf.php
1927 compress.php
1928 config.php
1929 classes/t1asm.php
1930 includes/functions.php
1931 mpdfi/fpdi_pdf_parser.php
1932 Added files/folder: /mpdfi/filters/*.*
1933 Added file/folder: /iccprofiles/sRGB_IEC61966-2-1.icc
1934 mpdfi/mpdfi.php (no longer required)
1936 New Configuration variables
1937 ---------------------------
1938 [config.php]
1939 $this->enableImports
1940 $this->simpleTables
1941 $this->PDFA
1942 $this->ICCProfile
1943 $this->PDFAauto
1946 Minor changes
1947 -------------
1948 Increased PDF file compatibility with spec 1.4
1949 - PDF version changed to 1.4
1950 - A binary file marker (a comment line with 4 characters > 127 ASCII) is added just after the first line
1951 - %%EOF no longer has line break after it [4.2.010]
1952 - /ID object is added to trailer object when not encrypted [4.2.010]
1954 When using progress bars, one of the JS scripts is now referenced as an external file
1955  to allow it to be cached by user's browser and improve performance for end-user [4.2.007]
1957 Importing external PDF files: LZW encoded PDF files are now supported
1959 When adding an annotation, the popup window can be set be either open or closed when the document is opened [4.2.027]
1960 - size and position of the popup can also be specified
1964 ===========================
1965 mPDF v4.2   (27/01/2010)
1966 ===========================
1968 NEW FEATURES
1969 ------------
1970 - image handling improved
1971 - table layout - additional control over resizing
1972 - vertical-alignment of images - better support for all CSS types
1973 - top and bottom margins collapse between block elements
1974 - improved support for CSS line-height
1975 - display progress bar whilst generating file
1976 - CSS @page selector can be specified when adding a pagebreak
1977 - CSS @page selector allows different margins, backgrounds, headers/footers on :first :left and :right pages
1978 - PNG images with alpha channel fully supported
1979 - ability to generate italic and bold font variants from base font file
1980 - CJK fonts to embed as subsets
1981 - "double" border on block elements
1982 - character substitution for missing characters in UTF-8 fonts
1983 - direct passing of dynamically produced image data
1984 - background-gradient and background-image can now co-exist
1988 Bug fixes
1989 ---------
1990 - empty variable (undefined var, false, null, array() etc.) sent to WriteHTML produced error message "Invalid UTF-8"
1991 - CJK in tables when not using CJK (utf-8-s) autosized very small as characters did not word-wrap
1992 - parsing stylesheets: background image not recognised if containbed uppercase characters in file name
1993 - "double" border on table used white between the lines instead of current background colour
1994 - $this->shrink_tables_to_fit = 0 or false caused fatal errors
1995 - background color or images not printing correctly when breaking across pages
1996 - background not printed for List inside a block element
1997 - columns starting near end of page with no room for a line triggering column change (resulting in text misplaced) not page break
1998 - table cell not calculating cell height correctly when "orphan" characters (;:,.?! etc.) at end of line
1999 - table breaking page in column 2 when col 1 is rowspan'ned
2000 - margin-collapse at top of page not working if bookmark/annotation/indexentry/toc
2001 - column break triggered by HR triggering a second column break
2002 - an empty 'position:fixed' element with no/auto width or height caused fatal error
2003 - mPDFI: template documents were overwriting HTML headers
2004 - mPDFI: function Overwrite (to change text in existing PDF) - fatal error if using with encrypted file
2006 Bug - not fixed
2007 - WriteHTML('',2) with '2' parameter not recognising 'margin-collapse:collapse' for DIVs or 'line-height' set in default CSS 'BODY'
2011 New or Updated Files
2012 --------------------
2013 mpdf.php
2014 compress.php
2015 config.php
2016 config_cp.php
2017 config_fonts.php
2018 mpdf.css
2019 classes/gif.php
2020 classes/indic.php
2021 includes/subs_core.php
2022 mpdfi/mpdfi.php
2023 unifont/ar_k_001.uni2gn.php
2024 All files in new folder: /progress/*.*
2026 NEW FOLDER /tmp/ required with read/write permissions - used for temporary image files or progress bars
2031 ===========================
2032 mPDF v4.1.1  (21/12/2009)
2033 ===========================
2034 Error corrected in /makefont/makefonts.php file (moved completed Unicode files to font folder instead of unifont)
2036 ===========================
2037 mPDF v4.1  (20/12/2009)
2038 ===========================
2039 MySQL support for embedded font subsets abandoned, and replaced with file-based.
2042 Files no longer required
2043 ------------------------
2044 config_db.php
2045 /unifont/RUNME.php
2046 /unifont/*.ufm and /unifont/*.t1a font files
2048 MySQL Database no longer required
2050 Files Updated
2051 -------------
2052 mpdf.php
2053 /classes/t1asm.php
2054 /makefont/makefonts.php
2056 New files
2057 ---------
2058 /unifont/*.dat and /unifont/*.dat.php font files
2061 Bug-fixes
2062 ---------
2063 - Image - If automatically resizing to fit maximum page size incorrectly subtracted margin-header
2064 - Annotation and textarea in same HTML chunk causes mPDF to crash (preg_replace textarea with /u modifier in AdjustHTML)
2065 - set_magic_quotes_runtime error ($mgr not $mqr)
2066 - Table align did not reverse when using RTL document
2068 Alteration: Image - if writing Image in fixedpos div position:absolute - to allow Image to be resized to full page size
2071 ===========================
2072 mPDF v4.0  (17/12/2009)
2073 ===========================
2075 Major additions
2076 ---------------
2077 - Ability to embed font subsets (creating much smaller files)
2078 - Much improved support for Arabic languages
2079 - Support for Indic languages including consonant conjuncts
2080 - Support for Fixed position block elements
2081 - New utility to help create your own fonts
2082 - PNG alpha channel transparency supported
2083 - New utility to create smaller mpdf script with reduced functionality (less memory)
2084 - Multiple Barcode types supported
2086 **********************************************************************************************
2087 *  For more details see the documentation manual: http://mpdf1.com/manual/index.php?tid=410  *
2088 **********************************************************************************************
2090 Bug fixes (parsing CSS)
2091 -----------------------
2092 - <link  href="" ... was not recognised if > 1 space between words
2093 - #Content p em { font-style:italic; } was applied to "#Content p"
2094 - @import url() embedded in a stylesheet file requires path fixed relative to stylesheet file
2095 - background-image url() embedded in a stylesheet file requires path fixed relative to stylesheet file
2096 - comment tags inside CSS <style> embedded in the HTML were removed
2097         Now fixed so <style><!-- ... --></style> works; <!-- <style>...</style> --> is removed
2099 Bug fixes (other)
2100 -----------------
2101 - clear (CSS property for floating elements) caused properties for that element to reset to defaults
2102 - width: auto caused collapse of border and padding on L & R of ordinary block elements
2103 - text-indent not inherited correctly (including em and % values)
2104 - named colour "steelblue" corrected RRGGBB hex code
2105 - table cell widths in %: if width of table cells set to >=100%, and not all columns are set
2106         This was fixed in 3.2 but led to problem where 2 cols: 1) 80% and 2) not set (see Table sizing test)
2107         Now fixed again to work for both(?)
2108 - parse PNG error fixed
2109 - bachground-image not correctly positioned in HTMLFooter and HTMLHeader (Not fixed properly in 3.2!)
2110 - fonts not supported with 0-9 in the name
2111 - font list in GetCodepage() in htmltoolkit.php (now config_cp.php) containing space " " not recognised
2112 - list number positioning
2113 - list font size set in CSS for UL/OL not working for first level list
2114 - table width (real value, not %) not working in nested table
2115 - GIF file failed if PDF file not compressed
2116 - list-style-type incorrectly inherited
2117 - line-height inheritance in lists
2118 - SetColumns added a new line - not required if at start of document/page
2119 - footer_line_spacing did not work
2120 - table cellPadding="" overwrote cell padding set on cell CSS
2121 - could not turn off Default non-HTML foter LINE
2122 - border specified as "em"
2123 - default values set in mpdf.css overriden by inherited properties e.g. <div><h1>Here</h1></div> lost font-size for H1
2127 ===========================
2128 mPDF v3.2  (25/10/2009)
2129 ===========================
2130 Bug fixes
2131 ---------
2132 - Table cell widths in %: if width of table cells set to >=100%, and not all columns are set -> froze, because tries to produce a column of no width
2133 - Ouput download file changed to allow compatability with IE6 (http://mpdf.bpm1.com/forum/comments.php?DiscussionID=120&page=1#Item_4)
2134 - Image error if relative path used on domain root (e.g. img src="image.png" and basepath is http://www.yourdomain.com) [attempted fix in 3.1 not working]
2135 - Table: if font changed in cell, font was not retoring properly afterwards causing errors (restoreInlineProperties())
2136 - Lists: list items containing <br />, font not restoring after bullet
2137 - Graceful support for block elements inside list items e.g. <li><p>... (not supported, but tolerated)
2138 - Index: Created dividing letters separately for Uppercase and lowercase
2139 - Incorrectly changing input character set when encountering e.g. charset=iso-8859-1 in the text of the document
2140         - Changed so only detects it if within <head>...</head>
2141 - If Keep-with-table (i.e. H1-6 before table and use_kwt true), if pagebreak forced anyway, borders did not print on previous page
2142 - Background-image used in HTML footer not appearing (correctly)
2143 - RTL tables: nested tables will not automatically transpose L->R
2144 - "Keep heading with table" - changed to allow <h1 style=".."> not just <h1>
2145 - "Keep heading with table" - backgrounds (bgcolor, image or gradient) incorrectly handled - now removed
2146 - Rotated table spread over more than 1 page caused enclosing block background colours to be be rotated along with table
2147 - CSS text-indent % now correctly suported (% of containing block width)
2148 - CSS width em on a block element e.g. DIV now correctly suported
2149 - calculating _tableheight, if remainingpage==0, get error (div by zero)
2150 - Table moved to next page with page-break-inside=avoid, produced an enlarged table (font)
2151 - RTL text-align override on BODY text was not working consistently
2152 - Arab characters: Character &#x647; (HEH) appearing in Final presentation form instead of Isolated
2153 - Vertical position of background-image on whole page incorrect
2154 - SetProtection can now be used with no permissions set (was not working unless at least one permission set)
2157 Developers
2158 ----------
2159 Some more undefined indexes and variables declared (courtesy of DSmart http://mpdf.bpm1.com/forum/comments.php?DiscussionID=117&page=1#Item_0 )
2160 Comment lines removed for < v3.0 to tidy up code
2163 Enhancements
2164 ------------
2165 CSS style height now partially supported on block elements DIV, P, H1 etc. --IF--
2166         - block is all on one page
2167         - will extend the block but not shorten it
2168         - will not force a pagebreak (max. at bottom of page)
2169         - % is interpreted as % of printable page height (inside margins)
2170 <TFOOT> now supported (placed at start as in HTML spec) displays at end of table, and repeats as a footer
2171 Background-image and background-gradient now supported in TD and TH (works in all cases except: background-image is not rotated or
2172         positioned correctly if table is rotated)
2173 NB Background images and background-gradients do not work if Columns are being used, or if $use_kwt is TRUE (keep-with-table),
2174          or if page-break-inside:avoid is active.
2177 Updated files
2178 -------------
2179 mpdf.php
2180 htmltoolkit.php
2185 ===========================
2186 mPDF v3.1  (30/08/2009)
2187 ===========================
2189 Bug fixes
2190 ---------
2191 - Image error if relative path used on domain root (e.g. img src="image.png" and basepath is http://www.yourdomain.com
2192 was giving http://www.yourdomain.com//image.png) [3.1]
2193 - Errors in parsing background CSS (background-repeat, background-position etc) [3.1]
2194 - Textarea did not corectly convert width or height in units relating to font e.g. em [3.0beta_01]
2195 - If page margin-bottom set to zero, SetHTMLfooter() crashes with "Division by zero" error [3.0beta_01]
2196 - Table with header row and rowspan in tbody, not calculating maxrowheightcorrectly
2197 - Prevent Index breaking column just after a dividing letter
2198 - Select or input form field when text around it is justified had text in the form field justified
2199 - TocBookMarkText needs to be htmlspecialchar-ed - decoded when entered inside <tocpagebreak>
2200 - <img src="" /> caused crash
2201 - DisplayPreferences used as a variable name and a function: function renamed to SetDisplayPreferences()
2202 - Image with src file not including a "." incorrectly parsed (e.g. http://www.domain.com/imagegenerator?params=23)
2204 New Features
2205 ------------
2206 - var $debug (true|false) default false; show or hide error reporting at output stage [3.1]
2207 - var $autoPageBreak (true|false) default true; allows overriding of automatic page breaks [3.0beta_02]
2208 - <indexinsert /> HTML equivalent of CreateIndex() [was CreateReference()]
2209 - 2nd attribute/parameter "xref" in IndexEntry() and <indexentry> - works like IndexEntrySee() as cross-reference entry
2210 - function SetWatermarkText allows null parameters to be passed i.e. SetWatermarkText() - will clear the WatermarkText
2211 - <watermarktext content="" alpha="" /> - HTML equivalent of SetWatermarkText()
2212 - <watermarkimage src="" alpha="" position="" size="" /> - HTML equivalent of SetWatermarkImage()
2214 Documentation
2215 -------------
2216 See Manual at http://mpdf.bpm1.com/manual/ for more information - especially:
2217 - User's Guide>>What Else Can I Do?>>Backgrounds & Borders
2218 - User's Guide>>What Else Can I Do?>>Floating blocks
2220 Files updated:
2221 -------------
2222 mpdf.php
2223 htmltoolkit.php
2224 graph.php
2227 Developers only
2228 ---------------
2229 mPDF<=3.1 generated a large number of warning "Notices" if run with full eror_reporting on, due to array indexes not being initiated e.g.
2230 $arr = array();
2232 if ($arr['index'] == 5 ) {...}
2234 To prevent this, lines were added at the start of the mpdf.php script to turn error notices OFF.
2235 In a move towards making mPDF able to run with full error_reporting on, a large amount of the script has been altered
2236 e.g. the line above would be changed to:
2237 if (isset($arr['index'] && $arr['index'] == 5 ) {...}
2239 Although I have tested this with a number of examples, it is almost certainly not complete. Therefore the error_reporting for Notices is still turned
2240 off in mPDF 3.1
2241 If you care to test it, please uncomment line 43 (//error_reporting(E_ALL);) and report any warning notices that you get.
2242 NB This has added about 40kB to the script size.
2246 ===========================
2247 mPDF v3.0beta  (14/06/2009)
2248 ===========================
2251 New Features
2252 ------------
2253 - CSS "float" partially supported (as well as clear:left|right|both)
2254 - CSS "background-image" "background-position" "background-repeat" "background-color" "background" supported for block-level elements
2255 - CSS background-color and background-image for <body > element added: this covers the whole page i.e. not just inside the "margins"
2256 - CSS background-color and background-image can be defined for CSS @page{}
2257 - Background gradients (linear or radial) can be defined using a custom CSS style property
2258 - Border radius can be defined to give rounded edges to block elements (uses draft CSS3 spec.)
2259 - page number can be reset to any value during the document (in AddPage() <pagebreak> etc.)
2260 - PNG images: Interlaced and alpha-channel-set PNG images now supported
2261 - internal links supported in Indexes (parameter added to CreateIndex()/CreateReference(): $useLinking=true;)
2262 - HTML Headers and footers now support hyperlinks
2263 - improved handling of <br>, block elements, and text lines inside table - approximates better to browser handling
2264 - borders of block-level elements & table cell borders supported (partially) in columns
2265 - optional error reporting for problems with Images ($showImageErrors)
2266 - ToC will word-wrap long entries
2267 - internal links (Bookmarks, IndexEntry and ToCEntry) rewritten to give more accurate positioning (when used as <tag>)
2268 - autofont algorithm improved for CJK languages
2269 - define text before and after page numbers ($pagenumPrefix; $pagenumSuffix; $nbpgPrefix; $nbpgSuffix;)
2270 - Additional color names supported - full list from SVG1.0
2272 Bug fixes
2273 ---------
2274 - Column width not resetting after an automatic pagebreak, or after setting HTMLheader
2275 - using AutoFont unnecssarily changed htmlspecialchars to code causing errors
2276 - Lists inside a table - incorrectly calculating table cell height
2277 - CJK - 4-byte utf-8 chars not displaying properly (includes HKCS characters)
2278 - mailto: links incorrectly handled
2279 - TOCpagebreak() - usePaging default clarified: true unless specified as '', 0, '0' or false; (null ->true)
2280 - <tocpagebreak> (as html tag) with no "name" defined, used at start of page, added a further blank page(s)
2281 - Lists - inaccurate calculation of space required for numbers in certain circumstances
2282 - Generated images (.php) only working if cURL enabled - (fixed, but rquires allow_url_fopen if remote file)
2283 - flag added to turn off error reporting when buffering used ($allow_output_buffering = false;)
2284 - RTL text in Bookmark, Title, Author, Creator, Keywords, and Subject was reversed - Adobe Reader 9 now correctly handles RTL text ( which Reader 8 did not)
2285 - TOC - if not using ODD/EVEN paging, did not add extra page and messed up
2286 - Rotated table which did not fit on remaining page resized to bigger than default
2287 - HR of width less than 100% - text continued on line after it
2288 - HR alignment not working (fixed so both CSS text-align and margin: 0 0 0 auto etc work)
2289 - HR in table did not correctly re-size when necessary
2290 - characters in symbols/zapfdingbats which in non-utf-8 mode are represented as chr(173) incorrectly handled as soft-hyphens
2291           (bug introduced 2.5 with soft-hyphens - affects symbols &#8593; arrow-up and Zapfdingbats &#9313; encircled 2)
2292 - Internal links (anchors) - Annotation/Bookmarks etc. incorrectly positioned when page orientation changed
2293 - ToC - when using multiple ToCs, internal links were not correctly adjusted
2294 - anchor (a name="") used inside a table was incorrectly positioned at the end of table
2295 - Tables: cell height calculated incorrectly when BR used
2296 - Table rotated with "page-break-inside:avoid" not kept on one page
2297 - Table rotated and split over > 1 page - vertical alignment inaccurate
2298 - Headers/Footers (non_html) when no style set caused errors
2299 - Table: breaking page when using rowspan error (line 17142)
2300 - ToC: If no indent defined in HTML tag <tocpagebreak> or defined as 0 gave error
2302 Note
2303 ----
2304 In mPDF 3.0 the following sections of code have been significantly rewritten:
2305 - painting of borders and background colours for block-elements
2306 - table of contents
2307 - Index
2308 - vertical justification in columns (uses scaling to stretch vertically)
2310 NB changed htmltoolkit AdjustHTML - does not now remove <br> before </div>
2311         Warning - may display differently in normal text as well as tables
2314 Files updated:
2315 -------------
2316 mpdf.php
2317 htmltoolkit.php
2320 Developers only
2321 ---------------
2322 - Background-color handling in CSS changed so only inherited/cascaded when Columns active or Keep-block-together
2323           - otherwise would overwrite background image with inherited color
2324 - all %.2f used in sprintf() changed to %.3f in htmltoolkit.php and mpdf.php to increase accuracy of div border lines in columns etc.
2325 - variable $use_embeddedfonts_1252 renamed to $useOnlyCoreFonts as more precise: depracated but still supported.
2326 - this version included quite abit of tidying up/future-proofing some code:
2327           $var{0} changed to substr($var,0,1) etc.  (due to go in PHP6)
2328           ereg_ changed to preg_        (depracated in PHP5.3) - (NB mainly in htmltoolkit.php)
2332 ===========================
2333 mPDF v2.5  (01/05/2009)
2334 ===========================
2336 New Features
2337 ------------
2338 - Automatic Hyphenation added, and support for soft-hyphens
2339 - Encryption works now for CJK language documents
2340 - Improved text justification
2341 - Support for 'generated' images e.g. "../ontheflyimage.php"
2344 Bug fixes
2345 ---------
2346 - Tables: cell height did not reduce if font-size used was smaller than table default
2347 - Columns: if setcolumns() to the same number already active - did not print out last bit of previous columns
2348 - Page-break in the middle of a block caused incorrect margin and padding on next lines until end of block ($cMargin reset to 0 in AddPage)
2349 - <HR> in table cell was printing in incorrect position (bug introduced in mPDF 2.4)
2350 - Justification
2351   - if only one word on line, did not respect maximum character spacing
2352   - last character of line incorrectly had character spacing applied
2353   - Space at the end of last line of a Right Justify block - e.g. "end. </p>" now correctly ignored
2354   - &nbsp; incorrectly treated as a character when justifying text with word/char spacing
2355   - CJK punctuation (.,) added as 'orphans' to keep at end of line
2356 - PNG files - was still buggy reading larger PNG files (due to fread)
2359 Files updated:
2360 -------------
2361 mpdf.php
2362 htmltoolkit.php
2363 CJKdata.php
2364 /patterns/.. (new files)
2367 Developers only
2368 ---------------
2369 Variables renamed as more accurate or appropriate:
2370 - var $isunicode renamed as $is_MB
2371 - var $usingembeddedfonts renamed as $usingCoreFont
2372 CJK changed to act internally as UTF-8 encoded
2373 - (NB CJK Half-widths not supported from 2.5+ i.e. big5-hw gb-hw)
2377 ===========================
2378 mPDF v2.4  (23/04/2009)
2379 ===========================
2380 Files updated
2381 -------------
2382 mpdf.php
2383 htmltoolkit.php
2384 mpdfi/mpdfi.php
2386 New files
2387 ---------
2388 graph.php
2389 Graphs - Requires new folder: path_to_mpdf/graph_cache/ (must be writeable)
2391 New features
2392 ------------
2393 Annotations improved so they appear as a pop-up
2394 Re-use Document Templates (cf. RestartDocTemplate() in manual)
2395 Limited support for CSS float property on an IMG element allowing text wrapping e.g. <img style="float: right;"> (cf. Images in manual)
2396 Utility function PreparePreText() allows output of a text file which may include <pre>
2397 Automatic generation of graphs from data in tables (requires integration with JPGraph) (cf. Graphs in manual)
2399 Other Changes
2400 -------------
2401 IMPORTANT - User rights removed as not working with newer version of Adobe Reader 9 (affects Active forms and ability for users to modify annotations)
2402 Corrects text alignment when using {nb} or {nbpg} in (non-HTML) headers/footers
2403 Sets default timezone if not already set (at top of mpdf.php) to prevent E_STRICT ERROR message
2404 Suppresses E_NOTICE error reporting (at top of mpdf.php)
2405 Error capture in Output() to avoid PDF header being sent when error messages generated
2406 A function str_ireplace added to htmltoolkit to allow PHP4 to function
2408 Bug fixes
2409 ---------
2410 WMF images incorrectly positioned when in-line
2411 PNG images > 8kB failed to load - (fix in 2.3 didn't work - fixed properly this time)
2412 Annotations containing a new line (\n) causing an error
2413 Evaluation of <pre> text: "<code>[TAB] " evaluated incorrect number of spaces to follow to align tabs, because < was calculated as 4 chars (&lt;)
2417 ===========================
2418 mPDF v2.3  (22/03/2009)
2419 ===========================
2421 New Features
2422 ------------
2423 - Optionally detect language and when to use special fonts i.e. RTL (arabic), CJK (chinese), Thai (see SetAutoFont() etc.)
2424 - Supports HTML attribute "lang" in all tags and uses special fonts when required (see $useLang)
2425 - Joins Arabic and Farsi/Persian text into presentation forms
2426 - Import another PDF file and use as templates in your document (see UseTemplate() and mPDFI in the manual.)
2427 - Replace specified text strings in an existing PDF file (see OverWrite() etc.)
2428 - More than one Table of Contents can be used in a document (see tocpagebreak etc.)
2429 - Restore properties of open HTML block elements after a page break (variable $restoreBlockPagebreaks or new tag <formfeed>)
2430 - <annotation> <bookmark> <indexentry> <tocentry> can now accept characters <>'"& as htmlentities - htmlspecialchars(..., ENT_QUOTES)
2431 - <annotation> can now accept "\n" for new line
2432 - support for opacity (CSS3 property) for images
2433 - specify the number of spaces to substitute for TAB when parsing <pre> tags
2434 - greater control over margins and display when changing page orientation during document (see $forcePortraitMargins and $displayDefaultOrientation)
2438 Bug fixes
2439 ---------
2440 Fonts in CSS - Not parsing font-family: Trebuchet MS; correctly as trebuchet
2441 Fonts in CSS - CSS font-family: [unknown]; setting first $available_unifont rather than ignoring
2442 Images - not displaying on IIS platform
2443 Images - .wmf not displaying if (allow_url_fopen) not set
2444 Table borders - in defaultCSS, 'MARGIN-COLLAPSE'=> collapase not quoted therefore not working
2445 Line-break inside table - printing a blank background across page rather than just going down a line
2446 Form fields inside tables - will now resize if the table is autosized (shrunk)
2447 <pre> containing a '<' was changed to '&lt;'
2448 Tabs inside <pre> were all changed to 8 spaces, not the remainder following a string
2449 Header on first page was inset by 1mm left and right ($cMarginL and $cMarginR not set to zero)
2450 Table nested inside a cell with colspan > 1 was incorrectly handled
2451 PNG file crashed (?incorrectly defined PNG file) [adapted _parsepng to account for unexpected]
2452 Table or Cell - if font-size not recognised, mPDF set font-size to zero
2453 Font-sizes - [xx-small|x-small|small|medium|large|x-large|xx-large] were not recognised in tables
2456 ===========================
2457 mPDF v2.2.1  (17/02/2009)
2458 ===========================
2459 Bug fix - (bug introduced in 2.2)
2460 Table - header row did not return to top of page when repeating across pages.
2463 ===========================
2464 mPDF v2.2  (15/02/2009)
2465 ===========================
2466 Updated files from mPDF 2.1
2467 mpdf.php
2468 htmltoolkit.php
2469 mpdf.css (new)
2470 ===========================
2471 New files from mPDF <2.0 (only required for EAN Barcodes)
2472 font/ocrb.xx (several)
2473 unifont/ocrb.xx (several)
2474 IMPORTANT - you need to make sure the ocrb font is added to the config.php file
2475  - add 'ocrb' to the end of 3 arrays: $this->available_fonts  $this->available_unifonts  and  $this->mono_fonts
2476 ===========================
2478 Summary of changes
2479 - external stylesheet file (mpdf.css) is used to configure default values ($useDefaultCSS2 and $defaultCSS2 are no longer used)
2480 - special comment tags to hide mPDF tags from browsers: <!--mpdf ...  mpdf-->
2481 - AddColumn() function added (equivalent to <columnbreak>)
2482 - annotations - pop-up messages the reader can move or delete (if you set permissions)
2483 - support for WMF images as well as GIF, JPG, PNG
2484 - watermark image can be set instead of, or as well as text
2485 - nested tables can include other content
2486 - improved control over table layout
2487 - margin: auto now supported for table and block elements
2489 A number of methods and variables have been renamed or reCapitalised for consistency.
2490 Changes should be backwards comaptible.
2491 All user methods start with a Capital, all user-defined variables start with lowercase.
2492 Affected:
2493 Reference() -> IndexEntry()
2494 CreateReference() -> CreateIndex()
2495 $TopicIsUnvalidated -> $showWatermark
2496 setUnvalidatedText() -> SetWatermarkText()
2498 PHP appears at present to be case-insensitive for function/method names
2499 All the following functions have been renamed in the script with a capital first letter:
2500 setUserRights()
2501 setBasePath()
2502 setAnchor2Bookmark()
2503 setHeader()
2504 setFooter()
2505 defHeaderByName()
2506 defFooterByName()
2507 setHeaderByName()
2508 setFooterByName()
2509 setHTMLHeader()
2510 setHTMLFooter()
2511 defHTMLHeaderByName()
2512 defHTMLFooterByName()
2513 setHTMLHeaderByName()
2514 setHTMLFooterByName()
2515 shaded_box()
2516 writeBarcode()
2518 Variable names changed to lowercase first letter:
2519 (Variables are case-sensitive therefore aliases have been set up)
2520 Anchor2Bookmark
2521 BiDirectional
2522 KeepColumns
2523 AliasNbPg
2524 AliasNbPgGp
2526 =========
2527 Bug fixes
2528 =========
2529 Columns - $keepColumns=true was incorrectly calculating the place to continue printing after 1 and half columns (of 3)
2530 Table cell height - incorrectly setting table cell height when cell contained a line of text of large size which wrapped to more than one line
2531 HR in Table cell - if table cell contains only HR (and column otherwise empty), HR was printed outside cell
2532 HR in Table cell - if table cell ended with a HR, height was one line too much
2533 Table page-break-inside:avoid - caused mPDF into permanent loop in some circumstances
2534 Paging - Total Pages/Group {nb} and {nbgp} didn't work in CJK
2535 CSS - Border size thin, medium and thick were only recognised in lowercase
2536 Table-header - rowspan not correctly output in THEAD
2537 Default CSS - table empty-cell:hide changed to show (CSS specification)
2539 ===========================
2540 mPDF v2.1  (24/01/2009)
2541 ===========================
2543 New Features in Version 2.1
2544 ---------------------------
2545 - CSS support improved generally (especially for cascading CSS, lists)
2546 - TableHeader changed to allow multiple rows in THEAD
2549 CSS changes
2550 -----------
2551 - display: none (block elements only - not lists or tables, nor HR)
2552 - width (TD/TH)
2553 - list-style-type (will also recognise the list-style-type from list-style) (OL/UL)
2554         recognised values: disc|circle|square|decimal|lower-roman|upper-roman|lower-latin|upper-latin|lower-alpha|upper-alpha|none
2555 - CSS support for <LI>: font-family, font-size, font-style, font-weight, color, background-color, text-decoration, text-transform, and list-style-type (will also recognise the list-style-type from list-style)
2556 - table cell borders - CSS rules have been adapted slightly - if a coloured/black line conflicts with a white line, and is the same width, coloured/black will overwrite even if Bottom or Right
2559 Numbered Lists
2560 --------------
2561 Variables set at the top of mpdf.php can be set to change:
2562 - text alignment of numbers in numbered lists (default Right)
2563         var $list_align_style = 'R';
2564 - content to follow a numbered list marker e.g. '.' gives 1. or IV. whereas ')' gives 1) or a)
2565         var $list_number_suffix = '.';
2566 (These can be altered at run time, but are not changeable through stylesheets or in-line style)
2569 Writing broken segments of HTML
2570 -------------------------------
2571 2 new parameters have been added to WriteHTML()
2572 function WriteHTML($html,$sub=0,$init=true,$close=true) {
2573 $close - Leaves buffers/variables etc. in current state, so that it can continue to write the HTML where it leaves off
2574 $init - Clears and resets buffers/variables
2575 (N.B.  You must end with a WriteHTML that calls $close=true)
2576 Example:
2577 $mpdf->WriteHTML('<p>This is the beginning...', 2, true, false);
2578 $mpdf->WriteHTML('...this is the middle...', 2, false, false);
2579 $mpdf->WriteHTML('...and this is the end</p>', 2, false, true);
2582 Rotated text in table cells
2583 ---------------------------
2584 NB This UPDATE will change expected output from previous versions******
2586 Prior to v2.1 any cell set to rotate text anticlockwise was forced to vertical align = bottom.
2587 This has been changed so that it only overrides when the rotate angle is between 45 and 89 degrees: text rotated exactly 90 degrees will respect the set value for vertical-align.
2590 =========
2591 Bug fixes
2592 =========
2593 - List - list starting after "<div>Then some text not in a block element<ol>" incorrectly output
2594 - Tables - if cell font-size set smaller than default for the table, does not shrink the cell height
2595 - Columns (tables) - columns breaking across rows e.g. in the middle of a table cell
2596 - Tables - if table width set to e.g. 100% but cols are less, was not making up to set width
2597 - Watermark - was not printing if using HTMLFooter
2598 - Lists - not aligning numbering correctly if different font sizes used for bullet & text etc.
2599 - Lists - indent of text did not correctly allow for Maximum number in <ol> list
2600 - Table does not always move correctly to a new page
2601 - Table cell incorrectly calculated height causing text to overflow cell when printed
2602 - Table borders in columns not being correctly handled (bug since 2.0 introduced a buffer to save the borders and print at the end of the table - fixed so does not use buffer if in columns - potentially does not deal with conflicting borders as well, but works in columns)
2603 - Table cell width if set as a percent was being downsized when autosizing table
2604 - Table CSS was buggy - improved
2605 - SetBasePath (when fetching remote website) - now handles string with query string on it e.g. http://www.domain.com/index.php?tid=42
2606 - Table cells with Rotated text - text not positioned correctly
2607 - Page number totals not working in utf-8 mode
2610 ============================
2611 Code efficiency improvements
2612 ============================
2613 - BIG speed improvement (compared with 2.0) with tables (especially large tables)
2614 - considerable increase in speed if writing long HTML segments to mPDF
2615 - speed improvement for tables (may be very significant if some cells have a lot of text in them causing uneven column widths)
2617 NB To speed up program more, consider setting $mpdf->useSubstitutions=false; if you do not use any characters outside the codepage selected
2620 ===============
2621 Keep-with-table
2622 ===============
2623 (This was introduced in v2.0 but I forgot to document it)
2624 If you set $this->use_kwt = true;
2625 All H1-H6 elements will try to keep with a table that follows immediately afterwards - (this is done in htmltoolkit, by adding an attribute KEEP-WITH-TABLE)
2626 See Known Issues re: Using kwt inside a div with border/background (doesn't work)
2631 ===========================
2632 mPDF v2.0  (07/12/2008)
2633 ===========================
2634 Main New Features in Version 2.0
2635 - nested tables are supported
2636 - supports both models of table border: separate and collapsed
2637 - improved parsing of CSS stylesheets, and better handling of styles throughout
2638 - additional recognised CSS styles
2639 - page orientation, size, and margins can be changed within the document, using PHP script or custom HTML
2640 - some limited support for @page CSS to define page-box areas, with crop/cross marks for printing
2641 - improved control over headers and footers (including HTML headers/footers)
2642 - improved presentation of Form elements including image-type input fields
2643 - generates an EAN barcode suitable for a book/printed publication
2644 - active forms can be generated - EXPERIMENTAL at present
2645 - change document permissions to allow the user to make annotations - EXPERIMENTAL at present
2647 NB Lines are commented in mPDF script as changes for mPDF 1.4 - this became v2.0
2649 =========
2650 UPGRADING
2651 =========
2652 IMPORTANT - Before Upgrading: Please note that some of the changes will cause mPDF 2.0 to render the pages differently from earlier versions i.e. it is not totally backwards comaptible. Read the notes on Backward compatibility before deleting your original set-up.
2654 To upgrade from v<=1.3 to v2.0 you only need to copy and overwrite the following 2 files:
2655 mpdf.php
2656 htmltoolkit.php
2658 Plus (optionally) if you want to use the EAN Barcode function, you will also need:
2659 font/ocrb.xx (several)
2660 unifont/ocrb.xx (several)
2661 IMPORTANT - you need to make sure the ocrb font is added to the config.php file
2662  - add 'ocrb' to the end of 3 arrays: $this->available_fonts  $this->available_unifonts  and  $this->mono_fonts
2665 ==========
2666 Bug Fixes
2667 ==========
2668 <columns column-count="0"> did not turn off columns - Fixed
2670 Margins as % - e.g. margin-right: 50% set from CSS incorrectly applied 50% of the fontsize
2671 (Fixed - adding parameter to fn. ConvertSize in htmltoolkit.php and in calls to that function)
2673 DIV Width - e.g. div style="width: 50% was not working
2674 (Fixed - fn.SetCSS and OpenTag()'DIV')
2676 CSS values as Zero - p { margin: 0; } did not work in stylesheet unless 0 had a unit
2678 Multiple Non-breaking spaces collapsed - e.g. "1&nbsp; &nbsp; &nbsp;2"  - was contracted to "1 2"
2679 (Fixed - fn.adjustHTML in htmltoolkit.php)
2681 Table cell too narrow causing incorrect printing - If two characters are too wide to print (only likely within a table cf. example tables - Periodic table) the first character was not printed, just a new line
2682 (Fixed in fn.WriteFlowingBlock)
2684 Font size by inline style for form elements <input> <textarea> gave wrong size when using a relative size 0.9em
2685 (Fixed - fn.ConvertSize in htmltoolkit.php)
2687 Creation Date not correctly showing
2688 (Fixed - did not need to convert to UTF16)
2690 New block element started at end of page  - block borders not painted
2691 (Fixed - fn.AddPage)
2693 DL did not close block correctly
2694 (Fixed - mistype in fn. CloseTag)
2696 Transparent not recognised as color/background-color
2697 (Attempted a fix by setting to ignore it! - fn. convertcolor in htmltoolkit.php)
2699 Zero (0) not displaying if only thing in table cell or tags e.g. <td>0</td> <p>0</p>
2700 (Fixed - fn.WriteHTML)
2702 Page Headers/Footers - Simple Headers or Footers defined as e.g. '|{PAGENO}|' were not split into 3 components, but output |6| in the outer margin.
2703 (Fixed)
2705 Could not copy from a completed PDF doc to clipboard when using a TrueTypeUnicode font
2706 (Fixed - fn._puttruetypeunicode - added CIDToGIDMap)
2708 Creating an Index (confusing called CreateReference in mPDF) based on only 1 column (i.e. columns off) caused it to print FAIL
2709 (Fixed - fn. CreateReference())
2711 Table of Contents - If a ToC entry reached other side of page a warning notice was produced
2712 Fixed - printing is now suppressed and it is moved down a line (but not when using rtl)
2714 "Keep Block Together" (i.e. page-break-inside: avoid for a block element)
2715 If this property causes some text to be moved to the next page, internal link targets (i.e. <a name="xxx">) were incremented pagenumber by +1 - as this used the calculated document page number, didn't work if using e.g. roman numerals
2716 (Fixed)
2717 NB This is now ALWAYS disabled when it meets a table - can use page-break-inside:avoid for the table
2719 @import url(style.css) without quotation marks "" was not picked up, although it is valid HTML
2720 (Fixed - fn.ReadCSS())
2722 Reading CSS from external style sheets included all media
2723 Now set by default to ignore media="aural|braille"
2724 Allows media="print" but can exclude by: $mpdf->disablePrintCSS = true; (default = false)
2725 Works on both <link... and <style media="print">@import...
2726 See the web page example - this stops the CSS stylesheets specifically marked for "print" to be ignored
2728 Table borders (in collapsed model) incorrectly calculated which border had dominance (mPDF <=1.3 determined the overriding border by its color)
2729 (Fixed to follow CSS 2.1 specifications: width >> CSS dominance (cell>table) >> T & L > B & R)
2730 In the border-collapse=collapse mode, the following rules determine which border style "wins" in case of a conflict:
2731 1. Borders with the 'border-style' of 'hidden' take precedence over all other conflicting borders.
2732 2. narrow borders are discarded in favor of wider ones.
2733 3. styles are preferred in this order: 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'.
2734 4. If border styles differ only in color, then a style set on a cell wins over one on a table.
2735 5. When two elements of the same type conflict, then the one further to the left or top wins out.
2737 Parsing CSS, a missed level would not be picked up i.e. CSS = div.refstr1 p {...} would not pick up:
2738 <div class="refstr1"> <div class="another"> <p>...
2739 (Fixed - fn. MergeCSS by carrying everything forwards)
2740         Note: I removed -  && !$this->blk[$this->blklvl-1]['cascadeCSS']['CLASS>>'.$attr['CLASS']]['depth']
2741         Not sure why I put it there in the first place!
2742         In a later bit of function -  && $this->blk[$this->blklvl-1]['cascadeCSS'][$tag]['depth']>1
2743         Haven't removed this, but is it needed???
2745 CSS inline style set in TD/TH (font-size, color, weight, font-family or italic) didn't turn off at the end of the cell (and also formatted the top left cell)
2746 (Fixed)
2748 CSS properties color, font-weight, and font-style set on a table were not inherited by the table cells
2749 (Fixed - var $base_table_properties)
2751 When rotating a table, the text following was positioned incorrectly
2752 (Fixed - fn. printtablebuffer)
2754 When rotating a table, links were not adjusted in position e.g. <a href="">...
2755 (Fixed - fn. printtablebuffer)
2757 If a larger border-thickness was set for a cell in the middle of a table, cells before that inaccurately calculated the cell wdith needed
2758 (Fixed)
2760 Text in a table cell which was not in a block and followed a list, there was no line break e.g. </ol>Text following</td>
2761 (Fixed - var $listjustfinished;)
2763 Setting the default font-family from the body tag using in-line CSS did not work e.g. <body style="font-family:mono"> (did work in external  stylesheets)
2764 (Fixed - fn.WriteHTML)
2766 <link href="..." rel="stylesheet"> was not recognised (because the href comes before the rel)
2767 (Fixed)
2769 Read linked CSS stylesheet OR @import stylesheet - now includes both.
2771 <tag class="class1 class2"> did not set either class1 or class2. Fixed so that it will now pick out class1 (better than nothing!)
2773 CSS line-height as % - interpreted 120% as 120 (x the font-size) - Fixed so it now accepts % and numbers
2775 Setting the basepath (used for relative links/external stylesheets etc) with $mpdf->setBasePath() was generally buggy!
2776 Now allows a domain e.g. $mpdf->setBasePath("http://www.domain.com"); (previously needed slash on end)
2777 (Fixed - hopefully!)
2779 If you were repeatedly calling mPDF in a loop to produce more than one PDF file, it would crash with error: "You have restricted the number of available fonts to 0". Fixed by editing line 751 require(_MPDF_PATH.'mpdf_config.php'); to require(...
2782 =============
2783 Improvements(?)
2784 =============
2785 Unsupported image files - mPDF died with an error message if image files didn't meet expected format e.g. an interlaced PNG file
2786 Changed so images are now replaced by the NOIMG image.
2788 Footer margin (HTML and normal footers) now determines the lowest point that is printed (rather than the place to start printing the footer)
2789 NB IMPORTANT CHANGE - not backwards comaptible
2791 Tabs in <pre> or <textarea> are now replaced by 8 spaces rather than 6 (consistent with http://www.w3.org/TR/1998/REC-html40-19980424/struct/text.html#edef-PRE)  [fn. AdjustHTML() in htmltoolkit.php]
2793 To insert the total number of pages in the document anywhere in the doc, just use '{nb}'
2794 The line:       $mpdf->AliasNbPages();
2795 has now been uncommented allowing {nb} to be used
2796 NB This will always give the total no. of pages in the whole document regardless of any changes you have made to page numbering.
2797 You can change the default placeholder '{nb}' to any string using:  $mpdf->AliasNbPages('[**my Chars**]');
2799 $mpdf->AliasNbPageGroups();     default="{nbpg}"
2800 Can be used to set the total number of pages in the current group i.e. between where page numbering is reset
2802 CSS border correctly fixes "solid 3mm #000000" i.e. (style width color) - (not a bug, but this is often incorrectly specified)
2804 Can now print div background behind a rotated table.
2806 You can keep columns as they are i.e. 1st column will finish page then start on second, by setting
2807 $mpdf->KeepColumns = true;
2809 Image constrain
2810 ===============
2811 Image size is constrained to current margins and page position. Extra parameter added to end of fn. allows you to override this.
2812 $mpdf->Image('files/images/frontcover.jpg',0,0,210,297,'jpg','',true, false);   // e.g. the last "false" allows a full page picture
2813 Useful for e.g. a cover page for your document
2815 Cumulative CSS
2816 ==============
2817 In version <=1.3, if you call:
2818 $mpdf->WriteHTML($stylesheet,1);
2819 $mpdf->WriteHTML($html);        // this one cleared the array $this->cascadeCSS; conatining cascaded CSS information from stylesheets
2820 You were meant to call:
2821 $mpdf->WriteHTML($html,2);      // which doesn't re-parse the CSS information
2822 v2.0 changed so that
2823 $mpdf->WriteHTML($html); no longers clears the array $this->cascadeCSS and so can be used repeatedly;
2827 ================================================
2828 Additional CSSstyles & HTML attributes supported
2829 ================================================
2830 <BODY> - font-style, font-weight, color
2832 <IMG> - html attributes width="" and height=""
2834 <TABLE|TD|TH> - border: 'thin' 'medium' and 'thick' are now converted to 1px, 3px and 5px
2835 <TABLE|TD|TH> - border now respects all types - e.g. 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and 'inset'
2836 (NB mPDF only supports a full declaration of border e.g. "border: thin double #000000;")
2838 <TD|TH> - CSS style="white-space: nowrap" and HTML attribute nowrap="nowrap"
2839 <TABLE> - page-break-inside: avoid
2840 <TABLE> - border-collapse: separate|collapse
2841 <TABLE> - border-spacing: 2px 2px;      (horizontal/vertical) or just one figure (both) NB same as cellSpacing
2842 <TABLE> - empty-cells: hide|show  (border-collapse:separate only)
2843 <TABLE> - margin-left and margin-right (previously only supported top and bottom)
2844 <TABLE> - padding: (this was incorrectly used for TD/TH before) (border-collapse:separate only)
2845 <TD|TH> - padding:
2846 <TABLE|TD|TH> - inline style "background" works (with a color only) the same as "background-color"
2848 NB Table page-break-inside, autosize values and rotate are only respected for that set on first level table of nested tables
2850 <TABLE> - cellSpacing and cellPadding HTML attributes:
2851 NB cellSpacing is the same as CSS style "border-spacing"
2852 NB cellPadding is a <table> attribute, but sets the cell padding - not table padding
2854 <TABLE> - align="..." now works with a rotated table - but sets the alignment ignoring the rotation i.e. align=right sets the table to the right side of the page (looking as though it is bottom-aligned)
2856 <BLOCK ELEMENTS> - page-break-before: always|left|right - NB any surrounding block tags will be closed before the new page is inserted.
2858 @page - see notes on Paged Media
2860 ==========================
2861 Unsupported HTML attribute
2862 ==========================
2863 <TD border="1"> - not valid HTML - no longer supported
2866 =========
2867 Additions
2868 =========
2869 "Keep-with-table"
2870 $mpdf->use_kwt = true;  // default=false
2871 If set to true, will force any H1-H6 header immediately preceding a table to be kept together with the table
2872 - automatically sets the table to fit on one page (i.e. page-break-inside=avoid) if it is a rotated table
2873 - ignored if: Columns on, Keep-block-together active (page-break-inside=avoid for surrounding BLOCK), active Forms
2876 =====
2877 Notes
2878 =====
2880 NB Not a change - but note you can use this to allow you to feed html code encoded in other than utf-8:
2881 $mpdf->allow_charset_conversion=true;
2882 $mpdf->charset_in='windows-1252';       (needs suitable codes for iconv i.e. windows-1252 not win-1252)
2884 Fixing Optional tags
2885 ====================
2886 php.net website has illegal nesting of <dt>.. <dd> .. </dd> .. </dt>  and <p>.. <div> .. </div> .. </p>
2887 The example wich parses the php.net webpage will not show correctly unless you change: $mpdf->allow_html_optional_endtags=false;
2888 Trying to fix incorrect (X)HTML with $mpdf->allow_html_optional_endtags==true cancels the P when it meets a DIV etc.
2892 EAN barcode
2893 ===========
2894 An EAN barcode can be generated
2895 function writeBarcode($code, $showisbn=1, $x='', $y='', $size=1, $border=0, $paddingL=1, $paddingR=1, $paddingT=2, $paddingB=2) {
2896 It accepts 12 or 13 digits with or without - hyphens as $code e.g.
2897 $mpdf->writeBarcode('978-1234-567-890', 1, $mpdf->x, $mpdf->y);
2898 NB - IMPORTANT***
2899 A new font - OCR-B font/unifont is required, and needs to be added to the config.php file
2900 cf. http://www.gs1uk.org/downloads/bar_code/Bar coding getting it right.pdf
2901 Barcode size must be between 0.8 and 2.0 (80% to 200%)
2903 CMYK Colors
2904 ===========
2905 Functions - SetDrawColor, SetTextColor and SetFillColor all now take an optional 4th parameter.
2906 If defined this will interpret the input as CMYK color i.e.
2907 SetDrawColor(15,82,0,10)        // NB all values out of 100 - not 255 as for RGB
2909 htmltoolkit.php fn.ConvertColor() - now interprets custom color definition: cmyk(15,82,0,10)
2910 like rgb(r,g,b) except values out of 100
2911 Intended to be used for calling the functions separately - BUT works in a limited way with CSS - does not get reset or inherited correctly
2912 <p style="color:cmyk(215,31,15,10)"> does work
2915 DEFAULT CSS
2916 ===========
2917 $defaultCSS has been updated to reflect better the standard HTML default e.g. using serif, table borders separate, cell vertical-align top
2918 To keep mPDF 1.3 (my favourites) I have introduced:
2919 $mpdf->useDefaultCSS2 = true;
2922 ===================================
2923 Permissions - forms and Annotations - Experimental!
2924 ===================================
2925 You can set the Permissions for the PDF file to allow the user to make Comments (annotations)
2926 $mpdf->setUserRights($enabled=true[default]|false, $annots="/Create/Delete/Modify/Copy/Import/Export",
2927                 $form="/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate", $signature="/Modify") )
2929 If you encrypt the file, make sure the permissions match e.g.:
2930 $mpdf->setUserRights();
2931 $mpdf->SetProtection(array('print','annots'),'yourPassword','myPassword');
2933 To allow this, changed the PDF-file version to %PDF1.5 (NB Probably needs PDF version > 1.5 but can't test for this...)
2935 NOTE: If you output the PDF file straight to the browser, it will only allow annotations after you save the document
2938 ===========================
2939 Active Forms - Experimental!
2940 ===========================
2941 At present , using active forms will prevent any internal and external links - that appear before active forms(?) - from working (why?)
2942 May need to save form for proper use - see example, when scroll forwards and back, the form disappears??
2943 Need to set Userrights (see above), and $mpdf->useActiveForms=true;
2944 For Output options, see separate notes.
2948 ============================
2949 Internal Programming changes
2950 ============================
2951 NB fn. tablerotate in htmltoolkit no longer used; now uses a 'transform' to shift the whole block of PDF code
2953 Graphics State
2954 ==============
2955 ExtGState does not need to be redefined - e.g. if a watermark added on every page, turning on and off alpha/transparency
2956 Unnecessary file size.
2957 function AddExtGState() edited to check if graphics state already exists before adding new one
2959 ASCII-proof code
2960 ================
2961 "»¤¬" used as a special identifier in the program changed to "\xbb\xa4\xac" to make the mpdf.php script file immune from someone saving it as a utf-8 encoded file
2963 Images
2964 ======
2965 1) When copying remote images locally - incorrectly used "unset" now changed to "unlink"
2966 2) When parsing image files - was using CURL for any image src="http://... - even if this was on the local server - edited so it only uses CURL if necessary/appropriate.
2967 NB Handling images was updated in v1.3 because my ISP changed allow_url_fopen to false
2968 Fixed so mPDF tests if the file is available as a local call e.g. getimage('images/test.jpg') even if it is defined as a full URI e.g. http://www.mydomain.com/images/test.jpg as this is quicker(?), and permitted even if allow_url_fopen is false.
2969 If not available as a local file (and allow_url_fopen is set) mPDF tries to use fopen/file_get_contents using an http wrapper;
2970 Else, if CURL is available and allow_url_fopen is false: then tries using CURL.
2971 (Clear as mud???!!)
2974 ===========================
2975 mPDF v1.3  (21/09/2008)
2976 ===========================
2977 --------------
2978 Page Numbering
2979 --------------
2980 Program changes:
2981 fn. startPageNums() replaced with blank function
2982 fn. stopPageNums() - deleted
2983 fn. numPageNo() - deleted  (all it did was return this->page anyway).
2984 var $_numbering - deleted
2985 var $_numberingFooter - deleted
2986 var $_numPageNum - deleted
2989 New: fn. AddPages() (as for AddPage but with type=NEXT-ODD or NEXT-EVEN see below)
2990 Edited: fn. AddPage() - new parameters added
2991 AddPage(orientation(NO),type="E|O", resetpagenum="1|0", pagenumstyle="I|i|A|a|1", suppress="on|off")
2992 New: fn. docPageNum() - returns the document page number (or '') based on...
2993 New : PageNumSubstitutions(array)
2994 New attributes:
2995 <pagebreak resetpagenum="1"     // resets document page numbering to 1 from the new page onwards
2996 <pagebreak suppress="on"        // turns on suppression of page numbering i.e. in headers and footers, {PAGENO} is replaced by blank string
2997                                         // ="0" turns suppression off
2998 <pagebreak pagenumstyle="I|i|A|a|1"     // (re)sets page number stle/type from the new page onwards - as for lists
2999                                         // 1 - decimal; A/a - alpha (uppercase/lowercase); I/i - Roman (uppercase/lowercase)
3000 <pagebreak type="NEXT-ODD"      // always adds a page + another if required to make odd
3001 <pagebreak type="NEXT-EVEN"     // always adds a page + another if required to make even
3003 Edited: fn. TOC()       // sets the marker for a Table of Contents
3004 New parameters allow the page-numbering details to be set
3005 NB the page-numbering details set are for the page which follows on after the TOC marker is inserted. The page-numbering for the actual ToC is set later, when the ToC is generated and inserted here
3006 new parameters as above for pagebreak  resetpagenum="1|0", pagenumstyle="I|i|A|a|1", suppress="on|off"
3008 Can also be set by attribute in the <TOC>
3009 <TOC resetpagenum="1" pagenumstyle="I|i|A|a|1", suppress="on|off" />
3011 --------------------------------------------
3012 Changes to allow Rotated Text in table Cells
3013 --------------------------------------------
3014 Edited:
3015 fn. OpenTag()
3016 fn. _tableColumnWidth()
3017 fn. _tableHeight()
3018 fn. _tableWrite()
3019 fn. tableHeader()
3021 New custom style or attribute -- "text-rotate" -- can be set for either <tr> or <th|td>
3022 Allowed values: 45 - 90 (written as integers) - rotates text anticlockwise, and -90 (clockwise)
3023 Positive values less than 90 force cell to: vertical-align:bottom
3025 Limitations:
3026 Only allows single line of text;
3027 Font, font-size, and style are determined by those set fro the cell, and cannot be changed;
3028 No changes in font (or any other in-line changes e.g. <sup>) are supported within the text
3030 Example: <tr style="text-rotate:90">...
3032 ---------
3033 Bug fixes
3034 ---------
3035 1) HTML footer containing table was triggering page break.
3036 Added $this->InHTMLFooter as flag to prevent page triggering in footers containing table
3037 Set in fn.writeHTMLFooters() -> in fn.tableWrite() stops the pageBreak being reset
3039 2) Crashing when libcurl not installed.
3040 Edited OpenTag() curl_init - added if (function_exists) to exclude crash when libcurl not installed
3042 3) Single cell with borders not showing the borders.
3043 e.g. <table><tr><td style="border:1px solid #000000?>Hi</td></tr></table>
3044 Problem: mPDF overrides cell border properties with table border properties for external borders. $defaultCSS had CSS defined for table as '0px solid #000000'
3045 Quick fix - line 273 removed. A more complete fix will require reprogramming to distinguish between "border property not set" and border property set as "none".
3047 4) Empty textarea incorrectly handled (the following HTML code being output in the textarea)
3048 The html code for an empty textarea was incorrectly handled in htmltoolkit fn. AdjustHTML which has been edited
3051 ===========================
3052 mPDF v1.2   (2008-05-01)
3053 ===========================
3054 // Added v1.2 option to continue if invalid UTF-8 chars - used in function is_utf8()
3055 var $ignore_invalid_utf8 = false;
3057 Reading CSS in fn. ReadCSS() and applying in fn. MergeCSS() -
3058         Edited to allow Tags, class and id with the same name to be distinct i.e. h5 {...}  .h5 {...}  #h5 {...}
3059 * mPDF 1.2 This version supports:  .class {...} / #id { .... }
3060 * ADDED p {...}  h1[-h6] {...}  a {...}  table {...}   thead {...}  th {...}  td {...}  hr {...}
3061 * body {...} sets default font and fontsize
3062 * It supports some cascaded CSS e.g. div.topic table.type1 td
3063 * Does not support non-block level e.g. a#hover { ... }
3065 Table: font-size, weight, style, family and color should all work
3066 TD/TH: font-size, weight, style, family and color should all work
3068 Added to htmltoolkit - fn.array_merge_recursive_unique()
3070 memory_opt Removed in mPDF v1.2 - not working properly
3072 fn. _begindoc() - changed to %PDF1.4 (was 1.3) as PDF version
3074 Write HTML Headers and Footers
3075 ------------------------------
3076 fn. Close() - calls writeHTMLHeaders/Footers() before finishing doc
3077 fn. WriteHTML() - added parameter
3078 fn. _out - writes to outputbuffer when writing HTML footers/headers
3081 fn. writeHTMLHeaders()
3082 fn. writeHTMLFooters()
3087 =======================
3088 mPDF v1.1  (2008-05-01)
3089 =======================
3091 Programming changes to increase efficiency
3092 ------------------------------------------
3093 fn. WriteHTML() - added lines to combine substituted characters <tta> etc
3095 Memory Optimization added (script from FPDF site) - edited fn. _putpages() and fn. _endpage()
3097 fn. SetFont() edited to return val quicker if font already set (increase efficiency)
3099 new vars chrs and ords are used to store chr() and ord() - quicker than using functions
3101 fn.setMBencoding() - only call mb_internal_encoding if need to change
3103 Bugs
3104 ----
3105 fn. SetDefaultFontSize() - edited to allow to override that set in defaultCSS
3107 fn. Output() - Added temporary(?) disablement of encryption in CJK as it doesn't work!
3109 fn. OpenTag() [LI] $this->blockjustfinished=false to prevents newline after first bullet of list within table
3111 Uses of mb_ereg_replace removed, and mb_split changed - requires regex_encoding (regex_encoding only used as UTF-8)
3113 fn. WriteHTML: attributes are trimmed with trim() to allow correct handling of e.g. class="bpmBook "
3115 fn. printbuffer() and fn. openTag() to ensure
3116  <div><div><p> outputs top margins/padding for both 1st and 2nd div
3117  and </p></div></div> ...
3119 fn. SetFont() added line - bug fixing in CJK fonts
3121 CSS functionality
3122 -----------------
3123 Added special CSS 'thead-underline' (similar to topntail)
3125 var $thead_font_weight; added (openTag) to enable setting of font-weight for <TH> cells
3127 Fixed table border inheritance: Table border inherits border="1" to cells, but not table style="border..."
3129 "page-break-inside: avoid" added (var keep_block_together) to allow a DIV or P to be kept on one page
3130         - not compatible with table autosize or table rotate
3131         - only works over maximum of 2 pages
3133 Enhancements
3134 ------------
3135 Orphans in line justification: R. Bracket ) added to defined list of orphans
3137 allow_url_open
3138 --------------
3139 Following a change in the PHP ini config set on my website by my ISP, changes made to allow mPDF to work with allow_url_open=OFF.
3140         - file_get_contents() changed to use libcurl (for CSS files)
3141         - openTag('IMG') @fopen() and 3 functions _parsegif, _parseJPG, _parsePNG, edited to copy remote image files to local file to include images
3143 FlowChart
3144 ---------
3145 Changes to enable mPDF work with a custom script producing Flowcharts:
3146         - WriteHTML() second parameter=3 will allow HTML to be parsed but not output
3147         - fn. Arrow() added
3148         - TableWordWrap() added parameter to force array return