1mPDF 8.0.x
2===========================
3
4* Ability to customize User-Agent header in the HTTP requests sent by cURL (@samuelecat, #1229)
5* Add Page Number Myanmar Language Support (@MinKyawNyunt, #1201)
6* new `Mpdf\Exception\FontException` extending base `MpdfException` was introduced and is thrown on Font manipulation
7* A bit cleaner exception messages for font-related errors
8* Use atomic cache writing. (@PATROMO, #1186)
9* Fix: "Undefined index: group" when calling MultiCell when using font without OTL data (@Kekos, #1213, #941)
10* Add C128RAW barcode type to create any barcode (ex: subtype change in middle of barcode) (#1124)
11* Add proxy support to curl
12* Fixed date and time format in the informations dictionary (#1083, @peterdevpl)
13* Checking allowed stream wrappers in CssManager
14* PHP 7.4 support (until final 7.4 release with composer --ignore-platform-reqs)
15* Improve debugging of remote content issues (@ribeirobreno)
16* Added `exposeVersion` configuration variable allowing to hide mPDF version from Producer tag and HTTP headers
17* Added the check for JPEG SOF header 0xFF 0xC1 (extended) (@jamiejones85)
18* Allows setting `none` as zoom mode in `SetDisplayMode` method, so that OpenAction is not written (#602)
19* Allowed image stream whitelist to be customised (#1005, thanks @jakejackson)
20* Fixed parsing of top-left-bottom-right CSS rules with !important (#1009)
21* Fixed skipping ordered list numbering with page-break-inside: avoid (#339)
22* Compound classes selector support, like `.one.two` or `div.message.special` (#538, @peterdevpl)
23* Fixed CMYK colors in text-shadow (#1115, @lexilya)
24* Skip non supported wrappers when resolving paths (#1204, @MarkVaughn)
25* Fixed SVGs using a style tag, has styles ignored ( Requires ext-dom ) (#450, @antman3351)
26* Allows `{nb}`, `{nbpg}`, `{PAGENO}` and `{DATE ...}` substitution in body (#172 and #267, @Dasc3er)
27* Cache now creates a dedicated subdirectory `/mpdf`.
28* It is possible to disable automatic cache cleanup with `cacheCleanupInterval` config variable
29* PHP 8.0 is supported since 8.0.10 (#1263)
30* Fix: First header of named page is added twice (@antman3351, #1320)
31* Added `curlExecutionTimeout` configuration variable allowing to `CURLOPT_TIMEOUT` when fetching remote content
32* Fix: Not all combinations were generated for more than three compound classes (@JeppeKnockaert)
33* Added `quiet_zone_left` and `quiet_zone_right` to barcodes which support quiet zones in order to customize its width
34* Updated `CssManager` to use the `RemoteContentFetcher` class instead of `curl` natively (@greew)
35* Added optional `continue2pages` parameter to `SetDocTemplate` method, allowing a template to continue the last 2 pages alternately (@bmg-ruudv)
36* Ensure that all digits of a string are hexadecimal before decoding in ColorConverter (@derklaro)
37* Fix: Using mpdf in phar package leads to weird errors (#1504, @sandreas)
38* WEBP images support (#1525)
39
40mPDF 8.0.0
41===========================
42
43### 15/03/2019
44
45* Updated FPDI dependency to version 2 (thanks a lot, @JanSlabon)
46    - removed `SetImportUse` method
47    - case of `ImportPage` method changed to `importPage`
48    - similarly, case of `setSourceFile` and `useTemplate` was changed to a lowercase first letter.
49    - signature of `importPage` changed
50    - returned value of `useTemplate` changed
51* Moved QRCode generating code portions to external package _mpdf/qrcode_
52    - This reduced package size considerably (ca 6MB)
53* Fraction sizes without leading zeros allowed for font sizes (#973, thanks @peterdevpl)
54* WriteHTML is now strict about used `$mode` parameter (#915, thanks, @tomtomau)
55* Fixed regression in nested tables (#860, thanks, @machour)
56* Scientific notation handling in CSS font sizes (#753, thanks, @peterdevpl)
57
58
59mPDF 7.1.x
60===========================
61
62* PHAR security issue fixed (thanks, @jakejackson)
63* Font temporary data saved as JSON instead of generating PHP files (thanks, @jakejackson)
64* cURL handling enhancements (thanks, @jakejackson)
65* SVG parsing fixes (thanks, @achretien)
66* Write PDF content with *Writer service classes
67* PHP 7.3 is supported
68* Added myclabs/deepcopy dependency, fixed TOC page numbering (thanks, @jakejackson)
69* Custom color for QR codes
70* Added support for orientation config key
71* Code and tests cleanups and enhancements
72    - PHPUnit dedicated assertions (thanks, @carusogabriel)
73    - WriteHTML part constants (thanks, @tomtomau)
74    - Various notice fixes (kudos to all respective authors)
75
76mPDF 7.0.x
77===========================
78
79* Allow passing file content or file path to `SetAssociatedFiles` (#558)
80* Allowed ^1.4 and ^2.0 of paragon/random_compat to allow wider usage
81* Fix of undefined _getImage function (#539)
82* Code cleanup
83* Better writable rights for temp dir validation (#534)
84* Fix displaying dollar character in footer with core fonts (#520)
85* Fixed missed code2utf call (#531)
86* Refactored and cleaned-up classes and subnamespaces
87
88
89mPDF 7.0.0
90===========================
91
92### 19/10/2017
93
94Backward incompatible changes
95-----------------------------
96
97- PHP `^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0` is required.
98- Entire project moved under `Mpdf` namespace
99    - Practically all classes renamed to use `PascalCase` and named to be more verbose
100    - Changed directory structure to comply to `PSR-4`
101- Removed explicit require calls, replaced with Composer autoloading
102- Removed configuration files
103    - All configuration now done via `__construct` parameter (see below)
104- Changed `\Mpdf\Mpdf` constructor signature
105    - Class now accepts only single array `$config` parameter
106    - Array keys are former `config.php` and `config_fonts.php` properties
107    - Additionally, former constructor parameters can be used as keys
108- `tempDir` directory now must be writable, otherwise an exception is thrown
109- ICC profile is loaded as entire path to file (to prevent a need to write inside vendor directory)
110- Moved examples to separate repository
111- Moved `TextVars` constants to separate class
112- Moved border constants to separate class
113- `scriptToLang` and `langToFont` in separate interfaced class methods
114- Will now throw an exception when `mbstring.func_overload` is set
115- Moved Glyph operator `GF_` constants in separate `\Mpdf\Fonts\GlyphOperator` class
116- All methods in Barcode class renamed to camelCase including public `dec_to_hex` and `hex_to_dec`
117- Decimal conversion methods (to roman, cjk, etc.) were moved to classes in `\Mpdf\Conversion` namespace
118- Images in PHP variables (`<img src="var:smileyface">`) were moved from direct Mpdf properties to `Mpdf::$imageVars` public property array
119- Removed global `_SVG_AUTOFONT` and `_SVG_CLASSES` constants in favor of `svgAutoFont` and `svgClasses` configuration keys
120- Moved global `_testIntersect`, `_testIntersectCircle` and `calc_bezier_bbox` fucntions inside `Svg` class as private methods.
121    - Changed names to camelCase without underscores and to `computeBezierBoundingBox`
122- Security: Embedded files via `<annotation>` custom tag must be explicitly allowed via `allowAnnotationFiles` configuration key
123- `fontDir` property of Mpdf class is private and must be accessed via configuration variable with array of paths or `AddFontDirectory` method
124- QR code `<barcode>` element now treats `\r\n` and `\n` as actual line breaks
125- cURL is prefered over socket when downloading images.
126- Removed globally defined functions from `functions.php` in favor of `\Mpdf\Utils` classes `PdfDate` and `UtfString`.
127    - Unused global functions were removed entirely.
128
129
130Removed features
131----------------
132
133- Progressbar support
134- JpGraph support
135- `error_reporting` changes
136- Timezone changes
137- `compress.php` utility
138- `_MPDF_PATH` and `_MPDF_URI` constants
139- `_MPDF_TEMP_PATH` constant in favor of `tempDir` configuration variable
140- `_MPDF_TTFONTDATAPATH` in  favor of `tempDir` configuration variable
141- `_MPDFK` constant in favor of `\Mpdf\Mpdf::SCALE` class constant
142- `FONT_DESCRIPTOR` constant in favor of `fontDescriptor` configuration variable
143- `_MPDF_SYSTEM_TTFONTS` constant in favor of `fontDir` configuration variable with array of paths or `AddFontDirectory` method
144- HTML output of error messages and debugs
145- Formerly deprecated methods
146
147
148Fixes and code enhancements
149----------------------------
150
151- Fixed joining arab letters
152- Fixed redeclared `unicode_hex` function
153- Converted arrays to short syntax
154- Refactored and tested color handling with potential conversion fixes in `hsl*()` color definitions
155- Refactored `Barcode` class with separate class in `Mpdf\Barcode` namespace for each barcode type
156- Fixed colsum calculation for different locales (by @flow-control in #491)
157- Image type guessing from content separated to its own class
158
159
160New features
161------------
162
163- Refactored caching (custom `Cache` and `FontCache` classes)
164- Implemented `Psr\Log\LoggerAware` interface
165    - All debug and additional messages are now sent to the logger
166    - Messages can be filtered based on `\Mpdf\Log\Context` class constants
167- `FontFileFinder` class allowing to specify multiple paths to search for fonts
168- `MpdfException` now extends `ErrorException` to allow specifying place in code where error occured
169- Generating font metrics moved to separate class
170- Added `\Mpdf\Output\Destination` class with verbose output destination constants
171- Availability to set custom default CSS file
172- Availability to set custom hyphenation dictionary file
173- Refactored code portions to new "separate" classes:
174    - `Mpdf\Color\*` classes
175        - `ColorConvertor`
176        - `ColorModeConvertor`
177        - `ColorSpaceRestrictor`
178    - `Mpdf\SizeConvertor`
179    - `Mpdf\Hyphenator`
180    - `Mpdf\Image\ImageProcessor`
181    - `Mpdf\Image\ImageTypeGuesser`
182    - `Mpdf\Conversion\*` classes
183- Custom watermark angle with `watermarkAngle` configuration variable
184- Custom document properties (idea by @zarubik in #142)
185- PDF/A-3 associated files + additional xmp rdf (by @chab in #130)
186- Additional font directories can be added via `addFontDir` method
187- Introduced `cleanup` method which restores original `mb_` encoding settings (see #421)
188- QR code `<barcode>` element now treats `\r\n` and `\n` as actual line breaks
189- Customizable following of 3xx HTTP redirects, validation of SSL certificates, cURL timeout.
190    - `curlFollowLocation`
191    - `curlAllowUnsafeSslRequests`
192    - `curlTimeout`
193- QR codes can be generated without a border using `disableborder="1"` HTML attribute in `<barcode>` tag
194
195
196Git repository enhancements
197---------------------------
198
199- Added contributing guidelines
200- Added Issue template
201
202
203mPDF 6.1.0
204===========================
205
206### 26/04/2016
207
208- Composer updates
209    - First release officially supporting Composer
210    - Updated license in composer.json
211    - Chmod 777 on dirs `ttfontdata`, `tmp`, `graph_cache` after composer install
212- Requiring PHP 5.4.0+ with Composer
213- Code style
214    - Reformated (almost) all PHP files to keep basic code style
215    - Removed trailing whitespaces
216    - Converted all txt, php, css, and htm files to utf8
217    - Removed closing PHP tags
218    - Change all else if calls to elseif
219- Added base PHPUnit tests
220- Added Travis CI integration with unit tests
221- Changed all `mPDF::Error` and `die()` calls to throwing `MpdfException`
222- PDF Import changes
223    - FPDI updated to 1.6.0 to fix incompatible licenses
224    - FPDI loaded from Composer or manually only
225- Removed iccprofiles/CMYK directory
226- Renamed example files: change spaces to underscores to make scripting easier
227- Fixed `LEDGER` and `TABLOID` paper sizes
228- Implemented static cache for mpdf function `ConvertColor`.
229- Removed PHP4 style constructors
230- Work with HTML tags separated to `Tag` class
231- Fixed most Strict standards PHP errors
232- Add config constant so we can define custom font data
233- HTML
234    - fax & tel support in href attribute
235    - Check $html in `$mpdf->WriteHTML()` to see if it is an integer, float, string, boolean or
236      a class with `__toString()` and cast to a string, otherwise throw exception.
237- PHP 7
238    - Fix getting image from internal variable in PHP7 (4dcc2b4)
239    - Fix PHP7 Fatal error: `'break' not in the 'loop' or 'switch' context` (002bb8a)
240- Fixed output file name for `D` and `I` output modes (issue #105, f297546)
241
242mPDF 6.0
243===========================
244
245### 20/12/2014
246
247New features / Improvements
248---------------------------
249- Support for OpenTypeLayout tables / features for complex scripts and Advances Typography.
250- Improved bidirectional text handling.
251- Improved line-breaking, including for complex scripts e.g. Lao, Thai and Khmer.
252- Updated page-breaking options.
253- Automatic language mark-up and font selection using autoScriptToLang and autoLangToFont.
254- Kashida for text-justification in arabic scripts.
255- Index collation for non-ASCII characters.
256- Index mark-up allowing control over layout using CSS.
257- `{PAGENO}` and `{nbpg}` can use any of the number types as in list-style e.g. set in `<pagebreak>` using pagenumstyle.
258- CSS support for lists.
259- Default stylesheet - `mpdf.css` - updated.
260
261Added CSS support
262-----------------
263- lang attribute selector e.g. :lang(fr), [lang="fr"]
264- font-variant-position
265- font-variant-caps
266- font-variant-ligatures
267- font-variant-numeric
268- font-variant-alternates - Only [normal | historical-forms] supported (i.e. most are NOT supported)
269- font-variant - as above, and except for: east-asian-variant-values, east-asian-width-values, ruby
270- font-language-override
271- font-feature-settings
272- text-outline is now supported on TD/TH tags
273- hebrew, khmer, cambodian, lao, and cjk-decimal recognised as values for "list-style-type" in numbered lists and page numbering.
274- list-style-image and list-style-position
275- transform (on `<img>` only)
276- text-decoration:overline
277- image-rendering
278- unicode-bidi (also `<bdi>` tag)
279- vertical-align can use lengths e.g. 0.5em
280- line-stacking-strategy
281- line-stacking-shift
282
283mPDF 5.7.4
284================
285
286### 15/12/2014
287
288Bug Fixes & Minor Additions
289---------------------------
290- SVG images now support embedded images e.g. `<image xlink:href="image.png" width="100px" height="100px" />`
291- SVG images now supports `<tspan>` element e.g. `<tspan x,y,dx,dy,text-anchor >`, and also `<tref>`
292- SVG images now can use Autofont (see top of `classes/svg.php` file)
293- SVG images now has limited support for CSS classes (see top of `classes/svg.php` file)
294- SVG images - style inheritance improved
295- SVG images - improved handling of comments and other extraneous code
296- SVG images - fix to ensure opacity is reset before another element
297- SVG images - font-size not resetting after a `<text>` element
298- SVG radial gradients bug (if the focus [fx,fy] lies outside circle defined by [cx,cy] and r) cf. pservers-grad-15-b.svg
299- SVG allows spaces in attribute definitions in `<use>` or `<defs>` e.g. `<use x = "0" y = "0" xlink:href = "#s3" />`
300- 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)
301- SVG images - support automatic font selection and (minimal) use of CSS classes - cf. the defined constants at top of svg.php file
302- SVG images - text-anchor now supported as a CSS style, as well as an HTML attribute
303- CSS support for :nth-child() selector improved to fully support the draft CSS3 spec - http://www.w3.org/TR/selectors/#nth-child-pseudo
304    [NB only works on table columns or rows]
305- text-indent when set as "em" - incorrectly calculated if last text in line in different font size than for block
306- CSS not applying cascaded styles on `<A>` elements - [changed MergeCSS() type to INLINE for 'A', LEGEND, METER and PROGRESS]
307- fix for underline/strikethrough/overline so that line position(s) are based correctly on font-size/font in nested situations
308- Error: Strict warning: Only variables should be passed by reference - in PHP5.5.9
309- bug accessing images from some servers (HTTP 403 Forbidden whn accessed using fopen etc.)
310- Setting page format incorrectly set default twice and missed some options
311- bug fixed in Overwrite() when specifying replacement as a string
312- barcode C93 - updated C93 code from TCPDF because of bug - incorrect checksum character for "153-2-4"
313- Tables - bug when using colspan across columns which may have a cell width specified
314    cf. http://www.mpdf1.com/forum/discussion/2221/colspan-bug
315- Tables - cell height (when specified) is not resized when table is shrunk
316- Tables - if table width specified, but narrower than minimum cell wdith, and less than page width - table will expand to
317    minimum cell width(s) as long as $keep_table_proportions = true
318- Tables - if using packTableData, and borders-collapse, wider border is overwriting content of adjacent cell
319    Test case:
320    ```
321    <table style="border-collapse: collapse;">
322    <tr><td style="border-bottom: 42px solid #0FF; "> Hallo world </td></tr>
323    <tr><td style="border-top: 14px solid #0F0; "> Hallo world </td></tr>
324    </table>
325    ```
326- Images - image height is reset proportional to original if width is set to maximum e.g. `<img width="100%" height="20mm">`
327- URL handling changed to work with special characters in path fragments; affects `<a>` links, `<img>` images and
328    CSS url() e.g background-image
329    - also to ignore `../` included as a query value
330- Barcodes with bottom numerals e.g. EAN-13 - incorrect numeral size when using core fonts
331
332--------------------------------
333
334NB Spec. for embedded SVG images:
335as per http://www.w3.org/TR/2003/REC-SVG11-20030114/struct.html#ImageElement
336Attributes supported:
337- x
338- y
339- xlink:href (required) - can be jpeg, png or gif image - not vector (SVG or WMF) image
340- width (required)
341- height (required)
342- preserveAspectRatio
343
344Note: all attribute names and values are case-sensitive
345width and height cannot be assigned by CSS - must be attributes
346
347mPDF 5.7.3
348================
349
350### 24/8/2014
351
352Bug Fixes & Minor Additions
353---------------------------
354
355- Tables - cellSpacing and cellPadding taking preference over CSS stylesheet
356- Tables - background images in table inside HTML Footer incorrectly positioned
357- Tables - cell in a nested table with a specified width, should determine width of parent table cell
358    (cf. http://www.mpdf1.com/forum/discussion/1648/nested-table-bug-)
359- Tables - colspan (on a row after first row) exceeds number of columns in table
360- Gradients in Imported documents (mPDFI) causing error in some browsers
361- Fatal error after page-break-after:always on root level block element
362- Support for 'https/SSL' if file_get_contents_by_socket required (e.g. getting images with allow_url_fopen turned off)
363- Improved support for specified ports when getting external CSS stylesheets e.g. www.domain.com:80
364- error accessing local .css files with dummy queries (cache-busting) e.g. mpdfstyleA4.css?v=2.0.18.9
365- start of end tag in PRE incorrectly changed to &lt;
366- error thrown when open.basedir restriction in effect (deleting temporary files)
367- image which forces pagebreak incorrectly positioned at top of page
368- [changes to avoid warning notices by checking if (isset(x)) before referencing it]
369- text with letter-spacing set inside table which needs to be resixed (shrunk) - letter-spacing was not adjusted
370- nested table incorrectly calculating width and unnecessarily wrapping text
371- vertical-align:super|sub can be nested using `<span>` elements
372- inline elements can be nested e.g. text `<sup>text<sup>13</sup>text</sup>` text
373- CSS vertical-align:0.5em (or %) now supported
374- underline and strikethrough now use the parent inline block baseline/fontsize/color for child inline elements *** change in behaviour
375    (Adjusts line height to take account of superscript and subscript except in tables)
376- nested table incorrectly calculating width and unnecessarily wrapping text
377- tables - font size carrying over from one nested table to the next nested table
378- tables - border set as attribute on `<TABLE>` overrides border set as CSS on `<TD>`
379- tables - if table width set to 100% and one cell/column is empty with no padding/border, sizing incorrectly
380    (http://www.mpdf1.com/forum/discussion/1886/td-fontsize-in-nested-table-bug-#Item_5)
381- `<main>` added as recognised tag
382- CSS style transform supported on `<img>` element (only)
383    All transform functions are supported except matrix() i.e. translate(), translateX(), translateY(), skew(), skewX(), skewY(),
384    scale(), scaleX(), scaleY(), rotate()
385    NB When using Columns or Keep-with-table (use_kwt), cannot use transform
386- CSS background-color now supported on `<img>` element
387- @page :first not recognised unless @page {} has styles set
388- left/right margins not allowed on @page :first
389
390mPDF 5.7.2
391================
392
393### 28/12/2013
394
395Bug Fixes
396---------
397
398- `<tfoot>` not printing at all (since v5.7)
399- list-style incorrectly overriding list-style-type in cascading CSS
400- page-break-after:avoid not taking into account bottom padding and margin when estimating if next line can fit on page
401- images not displayed when using "https://" if images are referenced by src="//domain.com/image"
402- +aCJK incorrectly parsed when instantiating class e.g. new mpDF('ja+aCJK')
403- line-breaking - zero-width object at end of line (e.g. index entry) causing a space left untrimmed at end of line
404- ToC since v5.7 incorrectly handling non-ascii characters, entities or tags
405- cell height miscalculated when using hard-hyphenate
406- border colors set with transparency not working
407- transparency settings for stroke and fill interfering with one another
408- 'float' inside a HTML header/footer - not clearing the float before first line of text
409- error if script run across date change at midnight
410- temporary file name collisions (e.g. when processing images) if numerous users
411- `<watermarkimage>` position attribute not working
412- `<` (less-than sign) inside a PRE element, and NOT start of a valid tag, was incorrectly removed
413- file attachments not opening in Reader XI
414- JPG images not recognised if not containing JFIF or Exif markers
415- instance of preg_replace with /e modifier causing error in PHP 5.5
416- correctly handle CSS URLs with no scheme
417- Index entries causing errors when repeat entries are used within page-break-inside:avoid, rotated tables etc.
418- table with fixed width column and long word in cell set to colspan across this column (adding spare width to all columns)
419- incorrect hyphenation if multiple soft-hyphens on line before break
420- SVG images - objects contained in `<defs>` being displayed
421- SVG images - multiple, or quoted fonts e.g. style="font-family:'lucida grande', verdana" not recognised
422- SVG images - line with opacity=0 still visible (only in some PDF viewers/browsers)
423- text in an SVG image displaying with incorrect font in some PDF viewers/browsers
424- SVG images - fill:RGB(0,0,0) not recognised when uppercase
425- background images using data:image\/(jpeg|gif|png);base64 format - error when reading in stylesheet
426
427New CSS support
428---------------
429
430- added support for style="opacity:0.6;" in SVG images - previously only supported style="fill-opacity:0.6; stroke-opacity: 0.6;"
431- improved PNG image handling for some cases of alpha channel transparency
432- khmer, cambodian and lao recognised as list-style-type for numbered lists
433
434SVG Images
435----------
436
437- Limited support for `<use>` and `<defs>`
438
439mPDF 5.7.1
440================
441## 01/09/2013
442
4431) FILES: mpdf.php
444
445Bug fix; Dollar sign enclosed by `<pre>` tag causing error.
446Test 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>`
447
448-----------------------------
449
4502) FILES: includes/functions.php AND mpdf.php
451
452Changes to `preg_replace` with `/e` modifier to use `preg_replace_callback`
453(/e depracated from PHP 5.5)
454
455-----------------------------
456
4573) FILES: classes/barcode.php
458
459Small change to function `barcode_c128()` which allows ASCII 0 - 31 to be used in C128A e.g. chr(13) in:
460`<barcode code="5432&#013;1068" type="C128A" />`
461
462-----------------------------
463
4644) FILES: mpdf.php
465
466Using $use_kwt ("keep-[heading]-with-table") if `<h4></h4>` before table is on 2 lines and pagebreak occurs after first line
467the first line is displayed at the bottom of the 2nd page.
468Edited so that $use_kwt only works if the HEADING is only one line. Else ignores (but prints correctly)
469
470-----------------------------
471
4725) FILES: mpdf.php
473
474Clearing old temporary files from `_MPDF_TEMP_PATH` will now ignore "hidden" files e.g. starting with a "`.`" `.htaccess`, `.gitignore` etc.
475and also leave `dummy.txt` alone
476
477
478mPDF 5.7
479===========================
480
481### 14/07/2013
482
483Files changed
484-------------
485- config.php
486- mpdf.php
487- classes/tocontents.php
488- classes/cssmgr.php
489- classes/svg.php
490- includes/functions.php
491- includes/out.php
492- examples/formsubmit.php [Important - Security update]
493
494Updated Example Files in /examples/
495-----------------------------------
496
497- All example files
498- mpdfstyleA4.css
499
500config.php
501----------
502
503Removed:
504- $this->hyphenateTables
505- $this->hyphenate
506- $this->orphansAllowed
507Edited:
508- "hyphens: manual" - Added to $this->defaultCSS
509- $this->allowedCSStags now includes '|TEXTCIRCLE|DOTTAB'
510New:
511- $this->decimal_align = array('DP'=>'.', 'DC'=>',', 'DM'=>"\xc2\xb7", 'DA'=>"\xd9\xab", 'DD'=>'-');
512- $this->h2toc = array('H1'=>0, 'H2'=>1, 'H3'=>2);
513- $this->h2bookmarks = array('H1'=>0, 'H2'=>1, 'H3'=>2);
514- $this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin (used with CJK script)
515
516
517Backwards compatability
518-----------------------
519
520Changes in mPDF 5.7 may cause some changes to the way your documents appear. There are two main differences:
5211) Hyphenation. To retain appearance compatible with earlier versions, set the CSS property "hyphens: auto" whenever
522    you previously used $mpdf->hyphenate=true;
5232) 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:
524    - No indent (previous default of 5mm) - ($tocindent is ignored)
525    - Any font, font-size set ($tocfont or $tocfontsize) will not work
526    - HyperLinks will appear with your default appearance - usually blue and underlined
527    - line spacing will be narrower (can use line-height or margin-top in CSS)
528
529New features / Improvements
530---------------------------
531- Layout of Table of Content ToC now controlled using CSS styles
532- Text alignment on decimal mark inside tables
533- Automatically generated bookmarks and/or ToC entries from H1 - H6 tags
534- Support for unit of "rem" as size e.g. font-size: 1rem;
535- Origin and clipping for background images and gradients controlled by CSS i.e. background-origin, background-size, background-clip
536- Text-outline controlled by CSS (compatible with CSS3 spec.)
537- Use of `<dottab>` enhanced by custom CSS "outdent" property
538- Image HTML attributes `<img>` added: max-height, max-width, min-height and min-width
539- Spotcolor can now be defined as it is used e.g. color: spot(PANTONE 534 EC, 100%, 85, 65, 47, 9);
540- Lists - added support for "start" attribute in `<ol>` e.g. `<ol start="5">`
541- Hyphenation controlled using CSS, consistent with CSS3 spec.
542- Line breaking improved to avoid breaks within words where HTML tags are used e.g. H<sub>2<sub>0
543- Line breaking in CJK scripts improved (and ability to force hanging punctuation)
544- Numerals in a CJK script are kept together
545- RTL improved support for phrases containing numerals and \ and /
546- Bidi override codes supported - Right-to-Left Embedding [RLE] U+202B, Left-to-Right Embedding [LRE] U+202A,
547    U+202C POP DIRECTIONAL FORMATTING (PDF)
548- Support for `<base href="">` in HTML - uses it to SetBasePath for relative URLs.
549- HTML tag - added support for `<wbr>` or `<wbr />` - converted to a soft-hyphen
550- CSS now takes precedence over HTML attribute e.g. `<table bgcolor="black" style="background-color:yellow">`
551
552Added CSS support
553-----------------
554- max-height, max-width, min-height and min-width for images `<img>`
555- "hyphens: none|manual|auto" as per CSS3 spec.
556- Decimal mark alignment e.g. text-align: "." center;
557- "rem" accepted as a valid (font)size in CSS e.g. font-size: 1.5rem
558- text-outline, text-outline-width and text-outline-color supported everywhere except in tables (blur not supported)
559- background-origin, background-size, background-clip are now supported everywhere except in tables
560- "visibility: hidden|visible|printonly|screenonly" for inline elements e.g. `<span>`
561- Colors: device-cmyk(c,m,y,k) as per CSS3 spec. For consistency, device-cmyka also supported (not CSS3 spec)
562- "z-index" can be used to utilise layers in the PDF document
563- Custom CSS property added: "outdent" - opposite of indent
564
565The HTML elements `<dottab>` and `<textcircle>` can now have CSS properties applied to them.
566
567Bug fixes
568---------
569- SVG images - path including e.g. 1.234E-15 incorrectly parsed (not recognising capital E)
570- Tables - if a table starts when the Y position on page is below bottom margin caused endless loop
571- Float-ing DIVs - starting a float at bottom of page and it causes page break before anything output, second new page is forced
572- Tables - Warning notice now given in Table footer or header if `<tfoot>` placed after `<tbody>` and table spans page
573- Columns - block with border-width wider than the length of the border line, line overflows
574- Columns - block with no padding containing a block with borders but no backgound colour, borders not printed
575- Table in Columns - when background color set by surrounding block element - colour missing for height of half bottom border.
576- TOCpagebreakByArray() when called by function was not adding the pagebreak
577- Border around block element - dashed not showing correctly (not resetting linewidth between different edges)
578- Double border in table - when background colour set in surrounding block element - shows as black line between the 2 bits of double
579- Borders around DIVs - "double" border problem if not all 4 sides equally - fixed
580- Borders around DIVs - solid (and double) borders overlap as in tables - now fixed so mitred joins as in browser
581    [Inadvertently improves borders in Columns because of change in LineCap]
582- Page numbering - $mpdf->pagenumSuffix etc not suppressed in HTML headers/footers if number suppressed
583- Page numbering - Page number total {nbpg} incorrect  - e.g. showing decreasing numbers through document, when ToC present
584- RTL numerals - incorrectly reversing a number followed by a comma
585- Transform to uppercase/lowercase not working for chars > ASCII 128 when using core fonts
586- TOCpagebreak - Not setting TOC-FOOTER
587- TOCpagebreak - toc-even-header-name etc. not working
588- Parsing some relative URLs incorrectly
589- Textcircle - when moved to next page by "page-break-inside: avoid"
590- Bookmarks will now work if jump more than one level e.g. 0,2,1  Inserts a new blank entry at level 1
591- Paths to img or stylesheets - incorrectly reading "//www.domain.com" i.e. when starting with two /
592- data:image as background url() - incorrectly adjusting path on server if MPDF_PATH not specified (included in release mPDF 5.6.1)
593- Image problem if spaces or commas in path using http:// URL (included in release mPDF 5.6.1)
594- Image URL parsing rewritten to handle both urlencoded URLs and not urlencoded (included in release mPDF 5.6.1)
595- `<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
596- Table {colsum} summed figures in table header
597- list-style-type (custom) colour not working
598- `<tocpagebreak>` toc-preHTML and toc-postHTML can now contain quotes
599
600mPDF 5.6
601===========================
602
603### 20/01/2013
604
605Files changed
606-------------
607- mpdf.php
608- config.php
609- includes/functions.php
610- classes/meter.php
611- classes/directw.php
612
613
614config.php changes
615------------------
616
617- $this->allowedCSStags - added HTML5 tags + textcircle AND
618- $this->outerblocktags - added HTML5 tags
619- $this->defaultCSS  - added default CSS properties
620
621New features / Improvements
622---------------------------
623CSS support added for for min-height, min-width, max-height and max-width in `<img>`
624
625Images embedded in CSS
626- `<img src="data:image/gif;base64,....">` improved to make it more robust, and background: `url(data:image...` now added to work
627
628HTML5 tags supported
629- as generic block elements: `<article><aside><details><figure><figcaption><footer><header><hgroup><nav><section><summary>`
630- as in-line elements: `<mark><time><meter><progress>`
631- `<mark>` has a default CSS set in config.php to yellow highlight
632- `<meter>` and `<progress>` support attributes as for HTML5
633- custom appearances for `<meter>` and `<progress>` can be made by editing `classes/meter.php` file
634- `<meter>` and `<progress>` suppress text inside the tags
635
636Textcircle/Circular
637- font: "auto" added: automatically sizes text to fill semicircle (if both set) or full circle (if only one set)
638    NB for this AND ALL CSS on `<textcircle>`: does not inherit CSS styles
639- attribute: divider="[characters including HTML entities]" added
640- `<textcircle r="30mm" top-text="Text Circular Text Circular" bottom-text="Text Circular Text Circular"
641    divider="&nbsp;&bull;&nbsp;" style="font-size: auto" />`
642
643&raquo; &rsquo; &sbquo; &bdquo; are now included in "orphan"-management at the end of lines
644
645Improved CJK line wrapping (if CJK character at end of line, breaks there rather than previous wordspace)
646
647NB mPDF 5.5 added support for `<fieldset>` and `<legend>` (omitted from ChangeLog)
648
649Bug fixes
650---------
651
652- embedded fonts: Panose string incorrectly output as decimals - changed to hexadecimal
653    Only a problem in limited circumstances.
654    *****Need to delete all ttfontdata/ files in order for fix to have effect.
655- `<textCircle>` background white even when set to none/transparent
656- border="0" causing mPDF to add border to table CELLS as well as table
657- iteration counter in THEAD crashed in some circumstances
658- CSS color now supports spaces in the rgb() format e.g. border: 1px solid rgb(170, 170, 170);
659- CJK not working in table following changes made in v5.4
660- images fixed to work with Google Chart API (now mPDF does not urldecode the query part of the src)
661- CSS `<style>` within HTML page crashed if CSS is too large  (? > 32Kb)
662- SVG image nested int eht HTML failed to show if code too large (? > 32Kb)
663- cyrillic character p &#1088; at end of table cell caused cell height to be incorrectly calculated
664
665mPDF 5.5
666===========================
667
668### 02/03/2012
669
670Files changed
671-------------
672
673- mpdf.php
674- classes/ttfontsuni.php
675- classes/svg.php
676- classes/tocontents.php
677- config.php
678- config_fonts.php
679- utils/font_collections.php
680- utils/font_coverage.php
681- utils/font_dump.php
682
683Files added
684-----------
685
686classes/ttfontsuni_analysis.php
687
688config.php changes
689------------------
690
691To avoid just the border/background-color of the (empty) end of a block being moved on to next page (`</div></div>`)
692
693`$this->margBuffer = 0; // Allow an (empty) end of block to extend beyond the bottom margin by this amount (mm)`
694
695config_fonts.php changes
696------------------------
697
698Added to (arabic) fonts to allow "use non-mapped Arabic Glyphs" e.g. for Pashto
699    'unAGlyphs' => true,
700
701Arabic text
702-----------
703
704Arabic text (RTL) rewritten with improved support for Pashto/Sindhi/Urdu/Kurdish
705    Presentation forms added:
706    U+0649, U+0681, U+0682, U+0685, U+069A-U+069E, U+06A0, U+06A2, U+06A3, U+06A5, U+06AB-U+06AE,
707    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
708    Joining improved:
709    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,
710    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
711
712Note - Some characters in Pashto/Sindhi/Urdu/Kurdish do not have Unicode values for the final/initial/medial forms of the characters.
713However, some fonts include these characters "un-mapped" to Unicode (including XB Zar and XB Riyaz, which are bundled with mPDF).
714    `'unAGlyphs' => true`, added to the config_fonts.php file for appropriate fonts will
715
716This requires the font file to include a Format 2.0 POST table which references the glyphs as e.g. uni067C.med or uni067C.medi:
717    e.g. XB Riyaz, XB Zar, Arabic Typesetting (MS), Arial (MS)
718
719NB 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" - if it exists, it may work!
720Using "unAGlyphs" forces subsetting of fonts, and will not work with SIP/SMP fonts (using characters beyond the Unicode BMP Plane).
721
722mPDF maps these characters to part of the Private Use Area allocated by Unicode U+F500-F7FF. This could interfere with correct use
723if the font already utilises these codes (unlikely).
724
725mPDF now deletes U+200C,U+200D,U+200E,U+200F zero-widthjoiner/non-joiner, LTR and RTL marks so they will not appear
726even though some fonts contain glyphs for these characters.
727
728
729Other New features / Improvements
730---------------------------------
731Avoid just the border/background-color of the (empty) end of a block being moved on to next page (`</div></div>`)
732using configurable variable: `$this->margBuffer`;
733
734
735The TTFontsUni class contained a long function (extractcoreinfo) which is not used routinely in mPDF
736
737This has been moved to a new file: classes/ttfontsuni_analysis.php.
738
739The 3 utility scripts have been updated to use the new extended class:
740
741- utils/font_collections.php
742- utils/font_coverage.php
743- utils/font_dump.php
744
745
746Bug fixes
747---------
748- Border & background when closing 2 blocks (e.g. `</div></div>`) incorrectly being moved to next page because incorrectly
749    calculating how much space required
750- Fixed/Absolute-positioned elements not inheriting letter-spacing style
751- Rotated cell - error if text-rotate set on a table cell, but no text content in cell
752- SVG images, text-anchor not working
753- Nested table - not resetting cell style (font, color etc) after nested table, if text follows immediately
754- Nested table - font-size 70% set in extenal style sheet; if repeated nested tables, sets 70% of 70% etc etc
755- SVG setting font-size as percent on successive `<text>` elements gives progressively smaller text
756- mPDF will check if magic_quotes_runtime set ON even >= PHP 5.3 (will now cause an error message)
757- not resetting after 2 nested tags of same type e.g. `<b><b>bold</b></b>` still bold
758- When using charset_in other than utf-8, HTML Footers using tags e.g. `<htmlpageheader>` do not decode correctly
759- ToC if nested > 3 levels, line spacing reduces and starts to overlap
760
761Older changes can be seen [on the documentation site](https://mpdf.github.io/about-mpdf/changelog.html).
762