=========================== mPDF v4.1.1 (21/12/2009) =========================== Error corrected in /makefont/makefonts.php file =========================== mPDF v4.1 (20/12/2009) =========================== MySQL support for embedded font subsets abandoned, and replaced with file-based. Files no longer required ------------------------ config_db.php /unifont/RUNME.php /unifont/*.ufm and /unifont/*.t1a font files MySQL Database no longer required Files Updated ------------- mpdf.php /classes/t1asm.php /makefont/makefonts.php New files --------- /unifont/*.dat and /unifont/*.dat.php font files Bug-fixes --------- - Image - If automatically resizing to fit maximum page size incorrectly subtracted margin-header - Annotation and textarea in same HTML chunk causes mPDF to crash (preg_replace textarea with /u modifier in AdjustHTML) - set_magic_quotes_runtime error ($mgr not $mqr) - Table align did not reverse when using RTL document Alteration: Image - if writing Image in fixedpos div position:absolute - to allow Image to be resized to full page size =========================== mPDF v4.0 (17/12/2009) =========================== Major additions --------------- - Ability to embed font subsets (creating much smaller files) - Much improved support for Arabic languages - Support for Indic languages including consonant conjuncts - Support for Fixed position block elements - New utility to help create your own fonts - PNG alpha channel transparency supported - New utility to create smaller mpdf script with reduced functionality (less memory) - Multiple Barcode types supported ********************************************************************************************** * For more details see the documentation manual: http://mpdf1.com/manual/index.php?tid=410 * ********************************************************************************************** Bug fixes (parsing CSS) ----------------------- - 1 space between words - #Content p em { font-style:italic; } was applied to "#Content p" - @import url() embedded in a stylesheet file requires path fixed relative to stylesheet file - background-image url() embedded in a stylesheet file requires path fixed relative to stylesheet file - comment tags inside CSS works; is removed Bug fixes (other) ----------------- - clear (CSS property for floating elements) caused properties for that element to reset to defaults - width: auto caused collapse of border and padding on L & R of ordinary block elements - text-indent not inherited correctly (including em and % values) - named colour "steelblue" corrected RRGGBB hex code - table cell widths in %: if width of table cells set to >=100%, and not all columns are set This was fixed in 3.2 but led to problem where 2 cols: 1) 80% and 2) not set (see Table sizing test) Now fixed again to work for both(?) - parse PNG error fixed - bachground-image not correctly positioned in HTMLFooter and HTMLHeader (Not fixed properly in 3.2!) - fonts not supported with 0-9 in the name - font list in GetCodepage() in htmltoolkit.php (now config_cp.php) containing space " " not recognised - list number positioning - list font size set in CSS for UL/OL not working for first level list - table width (real value, not %) not working in nested table - GIF file failed if PDF file not compressed - list-style-type incorrectly inherited - line-height inheritance in lists - SetColumns added a new line - not required if at start of document/page - footer_line_spacing did not work - table cellPadding="" overwrote cell padding set on cell CSS - could not turn off Default non-HTML foter LINE - border specified as "em" - default values set in mpdf.css overriden by inherited properties e.g.
... (not supported, but tolerated) - Index: Created dividing letters separately for Uppercase and lowercase - Incorrectly changing input character set when encountering e.g. charset=iso-8859-1 in the text of the document - Changed so only detects it if within
... - 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 - Background-image used in HTML footer not appearing (correctly) - RTL tables: nested tables will not automatically transpose L->R - "Keep heading with table" - changed to allowAutomatic generation of graphs from data in tables (requires integration with JPGraph) (cf. Graphs in manual) Other Changes ------------- IMPORTANT - User rights removed as not working with newer version of Adobe Reader 9 (affects Active forms and ability for users to modify annotations) Corrects text alignment when using {nb} or {nbpg} in (non-HTML) headers/footers Sets default timezone if not already set (at top of mpdf.php) to prevent E_STRICT ERROR message Suppresses E_NOTICE error reporting (at top of mpdf.php) Error capture in Output() to avoid PDF header being sent when error messages generated A function str_ireplace added to htmltoolkit to allow PHP4 to function Bug fixes --------- WMF images incorrectly positioned when in-line PNG images > 8kB failed to load - (fix in 2.3 didn't work - fixed properly this time) Annotations containing a new line (\n) causing an error Evaluation oftext: "[TAB] " evaluated incorrect number of spaces to follow to align tabs, because < was calculated as 4 chars (<) =========================== mPDF v2.3 (22/03/2009) =========================== New Features ------------ - Optionally detect language and when to use special fonts i.e. RTL (arabic), CJK (chinese), Thai (see SetAutoFont() etc.) - Supports HTML attribute "lang" in all tags and uses special fonts when required (see $useLang) - Joins Arabic and Farsi/Persian text into presentation forms - Import another PDF file and use as templates in your document (see UseTemplate() and mPDFI in the manual.) - Replace specified text strings in an existing PDF file (see OverWrite() etc.) - More than one Table of Contents can be used in a document (see tocpagebreak etc.) - Restore properties of open HTML block elements after a page break (variable $restoreBlockPagebreaks or new tag
) - can now accept characters <>'"& as htmlentities - htmlspecialchars(..., ENT_QUOTES) - can now accept "\n" for new line - support for opacity (CSS3 property) for images - specify the number of spaces to substitute for TAB when parsing tags - greater control over margins and display when changing page orientation during document (see $forcePortraitMargins and $displayDefaultOrientation) Bug fixes --------- Fonts in CSS - Not parsing font-family: Trebuchet MS; correctly as trebuchet Fonts in CSS - CSS font-family: [unknown]; setting first $available_unifont rather than ignoring Images - not displaying on IIS platform Images - .wmf not displaying if (allow_url_fopen) not set Table borders - in defaultCSS, 'MARGIN-COLLAPSE'=> collapase not quoted therefore not working Line-break inside table - printing a blank background across page rather than just going down a line Form fields inside tables - will now resize if the table is autosized (shrunk)containing a '<' was changed to '<' Tabs insidewere all changed to 8 spaces, not the remainder following a string Header on first page was inset by 1mm left and right ($cMarginL and $cMarginR not set to zero) Table nested inside a cell with colspan > 1 was incorrectly handled PNG file crashed (?incorrectly defined PNG file) [adapted _parsepng to account for unexpected] Table or Cell - if font-size not recognised, mPDF set font-size to zero Font-sizes - [xx-small|x-small|small|medium|large|x-large|xx-large] were not recognised in tables =========================== mPDF v2.2.1 (17/02/2009) =========================== Bug fix - (bug introduced in 2.2) Table - header row did not return to top of page when repeating across pages. =========================== mPDF v2.2 (15/02/2009) =========================== Updated files from mPDF 2.1 mpdf.php htmltoolkit.php mpdf.css (new) =========================== New files from mPDF <2.0 (only required for EAN Barcodes) font/ocrb.xx (several) unifont/ocrb.xx (several) IMPORTANT - you need to make sure the ocrb font is added to the config.php file - add 'ocrb' to the end of 3 arrays: $this->available_fonts $this->available_unifonts and $this->mono_fonts =========================== Summary of changes - external stylesheet file (mpdf.css) is used to configure default values ($useDefaultCSS2 and $defaultCSS2 are no longer used) - special comment tags to hide mPDF tags from browsers: - AddColumn() function added (equivalent to) - annotations - pop-up messages the reader can move or delete (if you set permissions) - support for WMF images as well as GIF, JPG, PNG - watermark image can be set instead of, or as well as text - nested tables can include other content - improved control over table layout - margin: auto now supported for table and block elements A number of methods and variables have been renamed or reCapitalised for consistency. Changes should be backwards comaptible. All user methods start with a Capital, all user-defined variables start with lowercase. Affected: Reference() -> IndexEntry() CreateReference() -> CreateIndex() $TopicIsUnvalidated -> $showWatermark setUnvalidatedText() -> SetWatermarkText() PHP appears at present to be case-insensitive for function/method names All the following functions have been renamed in the script with a capital first letter: setUserRights() setBasePath() setAnchor2Bookmark() setHeader() setFooter() defHeaderByName() defFooterByName() setHeaderByName() setFooterByName() setHTMLHeader() setHTMLFooter() defHTMLHeaderByName() defHTMLFooterByName() setHTMLHeaderByName() setHTMLFooterByName() shaded_box() writeBarcode() Variable names changed to lowercase first letter: (Variables are case-sensitive therefore aliases have been set up) Anchor2Bookmark BiDirectional KeepColumns AliasNbPg AliasNbPgGp ========= Bug fixes ========= Columns - $keepColumns=true was incorrectly calculating the place to continue printing after 1 and half columns (of 3) 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 HR in Table cell - if table cell contains only HR (and column otherwise empty), HR was printed outside cell HR in Table cell - if table cell ended with a HR, height was one line too much Table page-break-inside:avoid - caused mPDF into permanent loop in some circumstances Paging - Total Pages/Group {nb} and {nbgp} didn't work in CJK CSS - Border size thin, medium and thick were only recognised in lowercase Table-header - rowspan not correctly output in THEAD Default CSS - table empty-cell:hide changed to show (CSS specification) =========================== mPDF v2.1 (24/01/2009) =========================== New Features in Version 2.1 --------------------------- - CSS support improved generally (especially for cascading CSS, lists) - TableHeader changed to allow multiple rows in THEAD CSS changes ----------- - display: none (block elements only - not lists or tables, nor HR) - width (TD/TH) - list-style-type (will also recognise the list-style-type from list-style) (OL/UL) recognised values: disc|circle|square|decimal|lower-roman|upper-roman|lower-latin|upper-latin|lower-alpha|upper-alpha|none - CSS support for : 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) - 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 Numbered Lists -------------- Variables set at the top of mpdf.php can be set to change: - text alignment of numbers in numbered lists (default Right) var $list_align_style = 'R'; - content to follow a numbered list marker e.g. '.' gives 1. or IV. whereas ')' gives 1) or a) var $list_number_suffix = '.'; (These can be altered at run time, but are not changeable through stylesheets or in-line style) Writing broken segments of HTML ------------------------------- 2 new parameters have been added to WriteHTML() function WriteHTML($html,$sub=0,$init=true,$close=true) { $close - Leaves buffers/variables etc. in current state, so that it can continue to write the HTML where it leaves off $init - Clears and resets buffers/variables (N.B. You must end with a WriteHTML that calls $close=true) Example: $mpdf->WriteHTML(' This is the beginning...', 2, true, false); $mpdf->WriteHTML('...this is the middle...', 2, false, false); $mpdf->WriteHTML('...and this is the end
', 2, false, true); Rotated text in table cells --------------------------- NB This UPDATE will change expected output from previous versions****** Prior to v2.1 any cell set to rotate text anticlockwise was forced to vertical align = bottom. 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. ========= Bug fixes ========= - List - list starting after "Then some text not in a block element" incorrectly output - Tables - if cell font-size set smaller than default for the table, does not shrink the cell height - Columns (tables) - columns breaking across rows e.g. in the middle of a table cell - Tables - if table width set to e.g. 100% but cols are less, was not making up to set width - Watermark - was not printing if using HTMLFooter - Lists - not aligning numbering correctly if different font sizes used for bullet & text etc. - Lists - indent of text did not correctly allow for Maximum number in
list - Table does not always move correctly to a new page - Table cell incorrectly calculated height causing text to overflow cell when printed - 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) - Table cell width if set as a percent was being downsized when autosizing table - Table CSS was buggy - improved - SetBasePath (when fetching remote website) - now handles string with query string on it e.g. http://www.domain.com/index.php?tid=42 - Table cells with Rotated text - text not positioned correctly - Page number totals not working in utf-8 mode ============================ Code efficiency improvements ============================ - BIG speed improvement (compared with 2.0) with tables (especially large tables) - considerable increase in speed if writing long HTML segments to mPDF - speed improvement for tables (may be very significant if some cells have a lot of text in them causing uneven column widths) NB To speed up program more, consider setting $mpdf->useSubstitutions=false; if you do not use any characters outside the codepage selected =============== Keep-with-table =============== (This was introduced in v2.0 but I forgot to document it) If you set $this->use_kwt = true; 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) See Known Issues re: Using kwt inside a div with border/background (doesn't work) =========================== mPDF v2.0 (07/12/2008) =========================== Main New Features in Version 2.0 - nested tables are supported - supports both models of table border: separate and collapsed - improved parsing of CSS stylesheets, and better handling of styles throughout - additional recognised CSS styles - page orientation, size, and margins can be changed within the document, using PHP script or custom HTML - some limited support for @page CSS to define page-box areas, with crop/cross marks for printing - improved control over headers and footers (including HTML headers/footers) - improved presentation of Form elements including image-type input fields - generates an EAN barcode suitable for a book/printed publication - active forms can be generated - EXPERIMENTAL at present - change document permissions to allow the user to make annotations - EXPERIMENTAL at present NB Lines are commented in mPDF script as changes for mPDF 1.4 - this became v2.0 ========= UPGRADING ========= 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. To upgrade from v<=1.3 to v2.0 you only need to copy and overwrite the following 2 files: mpdf.php htmltoolkit.php Plus (optionally) if you want to use the EAN Barcode function, you will also need: font/ocrb.xx (several) unifont/ocrb.xx (several) IMPORTANT - you need to make sure the ocrb font is added to the config.php file - add 'ocrb' to the end of 3 arrays: $this->available_fonts $this->available_unifonts and $this->mono_fonts ========== Bug Fixes ==========
did not turn off columns - Fixed Margins as % - e.g. margin-right: 50% set from CSS incorrectly applied 50% of the fontsize (Fixed - adding parameter to fn. ConvertSize in htmltoolkit.php and in calls to that function) DIV Width - e.g. div style="width: 50% was not working (Fixed - fn.SetCSS and OpenTag()'DIV') CSS values as Zero - p { margin: 0; } did not work in stylesheet unless 0 had a unit Multiple Non-breaking spaces collapsed - e.g. "1 2" - was contracted to "1 2" (Fixed - fn.adjustHTML in htmltoolkit.php) 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 (Fixed in fn.WriteFlowingBlock) Font size by inline style for form elements