=========================== mPDF v5.0 (30/09/2010) =========================== New Features ------------ - Font handling simplified, reads TrueType font files directly Minor Enhancements ------------------ - rotation of fixed-position block elements (see example 10 and manual for supported CSS) - support for CSS Small-Caps font-variant added - utility scripts in /utils/ folder to help font management - new simplified functions AddPageByArray() and TOCPageBreakByArray() added - progress bar simplified and customisable - improved word-wrapping for CJK langauges - improved recognition of CJK/Indic/Arabic characters - invalid UTF-8 input now outputs a meaningful error by displaying input html with errors marked - GIF or PNG images with transparency/interlaced/non-standard compression handled as internal data if /tmp/ folder is not present or writeable - support for - support for "display: none" on inline elements - annotations supported in fixed-position block elements Bug fixes --------- -
preceded by space does not correctly text-align to right - zero-width character in middle of line caused line-break (e.g. diacritic or U+200C = ZWNJ) - HTML attributes not recognised if spaces e.g. 'src = "..."' - Headers changed for output - problem reported on IE8 64-bit using SSL - using SetAutoPageBreak(false) used caused unexpected behaviour with table rows at page break - (from Beta) incorrect check for temporary font data folder causing errors - artificial Bold/Italic not working in table cell when using rotated text - allow to inherit font color correctly - SVG now works with Adobe 7 - background in header overwriting text - vertical text in table header not correctly horizontally positioned when repeated - compatibility with PHP >= 4.3 (htmlspecialchars_decode, stripos) - updated depracated script PHP 5.3.0 ($string{1} to $string[1], $var =& new Object(), set_magic_quotes_runtime) - index (CreateIndex) number string incorrect if arabic(rtl) text anywhere in document - MultiCell incorrectly calculate string length/width when using core fonts - page-break-inside:avoid - used with non-HTML footer had space inserted for footer height - page-break-inside:avoid - error if more than 1 page height but not enough to trigger second pagebreak - page-break-inside:avoid - incorrectly layering page backgrounds (headers and content brought forward) Changes from 5.0 Beta --------------------- If you are upgrading from the Beta version - you MUST delete all files in the /ttfontdata/ temporary directory - config.php file has been changed (extra CJK characters to recognise CJK blocks) - $this->backupSubsFont (in config_fonts.php) optionally now takes an array - no need to define 'cjk'=>true or 'sip|smp'=>true in config_fonts.php (ignored; cf. $this->BMPonly) - Indic language fonts have been altered to add Latin and Latin-1 Supplement characters - progress bars now has an external progbar.css and configurable main heading - added initial parameter new mPDF('+aCJK') or '-aCJK' to override default useAdobeCJK at runtime - QRCode is not included in main download (but as an extra package) BACKWARD COMPATIBILITY ---------------------- If you have been using earlier versions of mPDF, most scripts should work as before. But note: - Arial, Helvetica, Times and Courier are now treated like any other font - the whole CSS font string is parsed e.g. style="font-family:'Lucida Grande';" will look for a font 'lucidagrande' and not 'lucida' Configurable variables (see config.php file): ---------------------- - $mpdf->useSubstitutionsMB is now depracated, but will work as an alias for $mpdf->useSubstitutions The initial parameters e.g. new mPDF('utf-8') have all changed. Old ones may be recognised, or will be ignored. - $mpdf->useOnlyCoreFonts is now depracated and is ignored. Use new mPDF('c') - $this->use_CJK_only is now depracated and is ignored. See $this->useAdobeCJK and new mPDF('+aCJK') or '-aCJK' Control SmallCaps appearance - $mpdf->smCapsScale = 0.75; // Factor of 1 to scale capital letters - $mpdf->smCapsStretch = 115; // % to stretch small caps horizontally Customisable Progress bar - $mpdf->progbar_heading = 'mPDF file progress'; - $mpdf->progbar_altHTML = ''; Control fonts/subsetting - $mpdf->maxTTFFilesize = 2000; - $mpdf->percentSubset = 30; - $mpdf->debugfonts // show font errors and warnings Replaceable alias - $mpdf->iterationCounter = false; // Allow use of {iteration varname} in THEAD =========================== mPDF v5.0Beta (21/07/2010) =========================== New features ------------ The main change in mPDF v5 is the handling of TTF and TTC fonts directly. See README.txt and FONT INFO.txt for more information QR-code (2-dimensional barcode) Added ------------------------------------- type="QR" Size=1 is an arbitrary 25mm widthxheight. error="L|M|H|Q" text="" can be numeric, alphanumeric or binary(?) Required whitespace is always included around it Enhancements ------------ - progress-bar is simplified (no javascript class) - dir="rtl" supported in or tag Bug fixes --------- - artificial Bold/Italic now working in table cells with rotated text - "-" is now allowed in a font name e.g. sun-exta - now inherits font color correctly - SVG class bugs fixed (was crashing in Adobe Reader v 7) - background color/image in header no longer overwrites the header text Changed Config variables ------------------------ $this->useSubstitutionsMB is depracated Character substitution always occurs when using core fonts. Use $this->useSubstitutions for all cases. New Configurable variables -------------------------- $this->useAdobeCJK = true; // Uses Adobe CJK fonts for CJK languages // default TRUE; only set false if you have defined some available fonts that support CJK // If true this will not stop other CJK fonts if specified by font-family: // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont() // Set maximum size of TTF font file to allow non-subsets - in kB // Used to avoid e.g. Arial Unicode MS (perhaps used for substituteCharsMB) to ever be fully embedded // NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB) $this->maxTTFFilesize = 2000; // If not -s (i.e. forced subset) this value determines whether to subset or not // 0 - 100 = percent characters // i.e. if ==40, mPDF will embed whole font if >40% characters in that font // or embed subset if <40% characters // 0 will force whole file to be embedded // 100 will force always to subset $this->percentSubset = 30; $this->debugfonts - show errors and warnings for font parsing Config variables removed ------------------------ $this->use_CJK_only $this->useOnlyCoreFonts ================================================================================ ==== 4.6 ==== mPDF files changed: mpdf.php config.php makefonts/makefonts.php class/t1asm.php class/svg.php graph.php examples_04 (images) config var added: $this->tableMinSizePriority 4.5.015 Bug fix: Complex page with ToC entries ++ (example_ToC_bug4_5_015.php) caused Apache to crash AdjustHTML() preg_pattern for matching ... - 2 numbers (12) crash, 1 didn't!!! 4.5.014 Bug fix: 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, because Font reference /F1 still present in doc pointing to non-existent resource. Edited so that the reference is now removed from the page if font unused. 4.5.013 Enhancement TrueTypeUnicode fonts width array inserted as shortened form array (smaller file size) 4.5.012 Bug fix: Incorrect handling orphan characters in table (cf. http://mpdf.bpm1.com/forum/comments.php?DiscussionID=193 fixed in 4.2 - but going back to it still problems) If xxxxx. fits but xxxxx.. doesn't: WriteFlowingBlock wraps it to next line, TableWordWrap sqeezed it onto one line TableWordWrap fixed to only allow one orphan char. even if it fits with that one. 4.5.011 Added Windows BMP image support 4.5.010 SVG class: - improved recognition of lineargradients/radialgradients referenced by xlink:href - does not die if empty text string - support for many text properties as style="" as well as currently as attributes (bold, fill etc) - if using MB font, was respecting "Times" and "Courier" from the SVG file but using as ANSI not utf-8 4.5.009 graph.php updated to include SVG - need to define in graph.php (as well as set up TTF fonts) (SVG graph does not include CSIM, 3D skew.) 4.5.008 t1asm.php has an error in the error message if .dat fontfile not found (".char.dat") 4.5.007 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! Also problem shifting images - fixed Also wasn't shifting WMF/SVG images - fixed 4.5.006 New config var $this->tableMinSizePriority = false; If page-break-inside:avoid but cannot fit on full page without exceeding autosize; setting this value to true will force respsect for autosize, and disable the page-break-inside:avoid [NB edit Manual Table>>autolayout algorithm] 4.5.005 Bug fix Table set to avoid page-break-inside: in some circumstances entered loop with recalculating size Fudge factor added of 0.001 in tbsqrt to calculate shrink factor 4.5.004 Bug fix If table set to avoid page-break-inside and table height (resized) exactly==remaining page - was triggering page break Fudge factor added of 0.001 in tablewrite to query pagebreak 4.5.003 Bug fix in makefonts/makefonts.php Also changed the links in Step4 & 8 which move the newly created files to the font directory - will now show error message if error - will NOT overwrite existing files. (Put in manual already) 4.5.002 Bug fix in class/t1asm.php If you have magic_quotes_runtime set On - problems using embedded subset. 4.5.001 JPG "Exif" file recognised from header, and handled much more quickly and efficiently (not using GD) =========================== mPDF v4.5 (21/04/2010) =========================== New Features ------------ The main change in 4.5 is the improved class for importing SVG images. (See details below) Font files ---------- Some bugs in the "makefonts" utility caused some errors in the files produced for embedding font subsets. Surprisingly these are not easily detectable (I have yet to find one!). All the font files used for embedding font subsets (the .dat and .dat.php files in /unifont/ folder) have been re-generated. Download them if you are having problems with any fonts - otherwise, you probably don't need to bother. Minor Enhancements ------------------ If keepColumns = true (i.e. disable readjustment of column length), mPDF will now reproduce table header/footer rows in each column [4.4.015] A number of changes to improve processing time [4.4.012] [Thanks to carlholmberg http://mpdf.bpm1.com/forum/comments.php?DiscussionID=274&page=1#Item_3] JPG files with header marked as "progressive DCT-based JPEG" are now supported [4.4.004] Configurable variable (config.php) $dpi can be set to vary size interpreted from "px" values in HTML/CSS NB Recommended that $dpi should always be set the same as $img_dpi Support added for "ex" as a size value (approximates "ex" as half of font height) Configurable variable (config.php) $watermarkImgAlphaBlend will determine how watermark images will blend with underlying objects. Bug fixes --------- - Make-fonts utility : makefonts/makefonts.php [4.4.016] (All font files have been updated) - Table header of only one column width - not printing right border [4.4.014] - WMF and SVG images not rotating correctly to 90 or -90 degrees [4.4.013] - Using templates, error if imported doc contains templates itself [4.4.001] Updated Files ------------- mpdf.php config.php classes/svg.php makefonts/makefonts.php ALL subset font files (/unifont/ .dat and .dat.php files), and all garuda and norasi files New files --------- None New config variables -------------------- $this->watermarkImgAlphaBlend $this->dpi BACKWARD COMPATIBILITY ---------------------- All but one changes in mPDF 4.5 are fully backwards compatible. The configurable variable $this->watermarkImgBehind was introduced in v4.4 and was unintentionally set to TRUE In v4.5 this is set to FALSE in the config.php file. SVG Images ---------- [svg.php CHANGED] - Text stroke-width default changed to 1 [4.4.011] - Text stroke - line-join type changed [4.4.010] - Default value for fill changed to "black" [4.4.008] - Bug fixes: * to correct calculation of text-length (and therefore alignment R and C) [4.4.009] * Corrected errors in path implementation esp. quadratic Bezier curves * rounded corners to rectangles - error corrected * Recognition of font-family improved * remove \n (and other non-printable chars) from text * zero length shapes are not output e.g. zero-width rectangle, zero-length line, zero-radius circle - Support added for: * gradient stop offsets and gradientUnits="userSpaceOnUse" [4.4.007] In mpdf.php enabled define inner radius for radial gradients - only used internally by SVG at present * user defined cf. 'render-elems-03-t.svg' in SVG Test Suite [4.4.006] * "color" attribute and "currentColor" value for fill and stroke [4.4.005] * fill:url(#...) in a style as well as attribute * xlink:href for gradients * 1.3002e-005 in svg path * text-style changes (e.g. text-anchor) set on element - not just on * fill-rule=evenodd|nozero * dashed lines / stroke-dasharray & stroke-dashoffset * gradientUnits=userSpaceOnUse; * units e.g. 3mm or 14pt in Rectangle, Circle, Ellipse, Line and Text position * transform on element * stroke as well as fill on text NB The following are still NOT supported for SVG - filters - - images - DOM - - textlength; lengthadjust; tspan, tref, toap, textPath; - - gradient on stroke/text; - - text-underline and strikethrough - text opacity - colors as rgb(87%, 56%, 25%) - rect using units for dimensions - Only uses default spreadMethod = "pad" for gradients =========================== mPDF v4.4 (24/03/2010) =========================== New Features ------------ - Support SVG image files (partial) - Rotate images or graphs (by multiples of 90 degrees) - Set opacity (transparency) for background images - Control resizing of background images - Set whether to print watermark images behind or in front of page contents - Reduced memory usage when printing tables (partly configurable) - Option to set path to folder for temporary files - Improved compliance for CSS text-align justify - Increased support for CSS "media" - Improved performance when accessing local image files Minor Enhancements ------------------ - Allows space in output file name e.g. $mpdf->Output('t est.pdf','D'); [4.3.007B] - Header changed in Output to improve compatability with IE6 (affects 'D' and 'I') [4.3.012B] - background-images do not show noimage.jpg if missing [4.3.012D] - simpleTables (which improves performance) now also allows: background-color, -gradient and -image, padding and rotated text to be set for each cell. Only borders are not supported cell-by-cell. [4.3.006] Bug fixes --------- - Page width not correctly reset when defining default page margins (L/R) by @page [4.3.007C] - Table row with a background-color, paints the whole row, including the spaces between cells [4.3.005] NB This should have been fixed in [4.2.028] but got left out! - UseSubstitutionsMB causes errors inside