CHANGELOG.txt 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  1. ===========================
  2. mPDF v4.6 (07/06/2010)
  3. ===========================
  4. Improvements
  5. ------------
  6. Added Windows BMP image support [4.5.011]
  7. Improved support and bug fixes for SVG images [4.5.010]
  8. - improved recognition of lineargradients/radialgradients referenced by xlink:href
  9. - does not die if empty text string
  10. - support for many text properties as style="" as well as currently as attributes (bold, fill etc)
  11. - if using MB font, was respecting "Times" and "Courier" from the SVG file but using as ANSI not utf-8
  12. JPG image files with "Exif" header now recognised and supported [4.5.001]
  13. Configuration variable added (config.php):
  14. ----------------------------
  15. $this->tableMinSizePriority [4.5.006]
  16. Default value false
  17. Use: When page-break-inside:avoid set on table but cannot fit on full page without
  18. exceeding autosize; setting this value to true will force respsect for the autosize,
  19. and disable the page-break-inside:avoid
  20. Bug fixes
  21. ---------
  22. - Apache crashing when writing complex heading with multiple ToC entries + index entry [4.5.015]
  23. - Error message appeared after printing in Adobe Reader [4.5.014]
  24. - Error in Text wrapping in table cells [4.5.012]
  25. - Incorrect error message(!) using embedded font subsets if .dat fontfile not found (".char.dat") [4.5.008]
  26. - Errors when using page-break-inside:avoid, with text elements and images incorrectly moved [4.5.007]
  27. - Triggering unnecessary page break, or entering endless loop when using table with page-break-inside:avoid [4.5.004, 4.5.005]
  28. - Utility "makefonts" moving newly created files to wrong directory [4.5.003]
  29. - Error using embedded font subsets when magic_quotes_runtime set On [4.5.002]
  30. Files changed
  31. -------------
  32. mpdf.php
  33. config.php
  34. makefonts/makefonts.php
  35. class/t1asm.php
  36. class/svg.php
  37. ===========================
  38. mPDF v4.5 (21/04/2010)
  39. ===========================
  40. New Features
  41. ------------
  42. The main change in 4.5 is the improved class for importing SVG images. (See details below)
  43. Font files
  44. ----------
  45. Some bugs in the "makefonts" utility caused some errors in the files produced for embedding font subsets.
  46. Surprisingly these are not easily detectable (I have yet to find one!).
  47. All the font files used for embedding font subsets (the .dat and .dat.php files in /unifont/ folder)
  48. have been re-generated. Download them if you are having problems with any fonts - otherwise, you probably
  49. don't need to bother.
  50. Minor Enhancements
  51. ------------------
  52. If keepColumns = true (i.e. disable readjustment of column length), mPDF will now reproduce
  53. table header/footer rows in each column [4.4.015]
  54. A number of changes to improve processing time [4.4.012]
  55. [Thanks to carlholmberg http://mpdf.bpm1.com/forum/comments.php?DiscussionID=274&page=1#Item_3]
  56. JPG files with header marked as "progressive DCT-based JPEG" are now supported [4.4.004]
  57. Configurable variable (config.php) $dpi can be set to vary size interpreted from "px" values in HTML/CSS
  58. NB Recommended that $dpi should always be set the same as $img_dpi
  59. Support added for "ex" as a size value (approximates "ex" as half of font height)
  60. Configurable variable (config.php) $watermarkImgAlphaBlend will determine how watermark images
  61. will blend with underlying objects.
  62. Bug fixes
  63. ---------
  64. - Make-fonts utility : makefonts/makefonts.php [4.4.016]
  65. (All font files have been updated)
  66. - Table header of only one column width - not printing right border [4.4.014]
  67. - WMF and SVG images not rotating correctly to 90 or -90 degrees [4.4.013]
  68. - Using templates, error if imported doc contains templates itself [4.4.001]
  69. Updated Files
  70. -------------
  71. mpdf.php
  72. config.php
  73. classes/svg.php
  74. makefonts/makefonts.php
  75. ALL subset font files (/unifont/ .dat and .dat.php files), and all garuda and norasi files
  76. New files
  77. ---------
  78. None
  79. New config variables
  80. --------------------
  81. $this->watermarkImgAlphaBlend
  82. $this->dpi
  83. BACKWARD COMPATIBILITY
  84. ----------------------
  85. All but one changes in mPDF 4.5 are fully backwards compatible.
  86. The configurable variable $this->watermarkImgBehind was introduced in v4.4 and was unintentionally set to TRUE
  87. In v4.5 this is set to FALSE in the config.php file.
  88. SVG Images
  89. ----------
  90. [svg.php CHANGED]
  91. - Text stroke-width default changed to 1 [4.4.011]
  92. - Text stroke - line-join type changed [4.4.010]
  93. - Default value for fill changed to "black" [4.4.008]
  94. - Bug fixes:
  95. * to correct calculation of text-length (and therefore alignment R and C) [4.4.009]
  96. * Corrected errors in path implementation esp. quadratic Bezier curves
  97. * rounded corners to rectangles - error corrected
  98. * Recognition of font-family improved
  99. * remove \n (and other non-printable chars) from text
  100. * zero length shapes are not output e.g. zero-width rectangle, zero-length line, zero-radius circle
  101. - Support added for:
  102. * gradient stop offsets and gradientUnits="userSpaceOnUse" [4.4.007]
  103. In mpdf.php enabled define inner radius for radial gradients - only used internally by SVG at present
  104. * user defined <ENTITY /> cf. 'render-elems-03-t.svg' in SVG Test Suite [4.4.006]
  105. * "color" attribute and "currentColor" value for fill and stroke [4.4.005]
  106. * fill:url(#...) in a style as well as attribute
  107. * xlink:href for gradients
  108. * 1.3002e-005 in svg path
  109. * text-style changes (e.g. text-anchor) set on <g> element - not just on <text>
  110. * fill-rule=evenodd|nozero
  111. * dashed lines / stroke-dasharray & stroke-dashoffset
  112. * gradientUnits=userSpaceOnUse;
  113. * units e.g. 3mm or 14pt in Rectangle, Circle, Ellipse, Line and Text position
  114. * transform on <text> element
  115. * stroke as well as fill on text
  116. NB The following are still NOT supported for SVG
  117. - filters
  118. - <marker>
  119. - images
  120. - DOM
  121. - <pattern>
  122. - textlength; lengthadjust; tspan, tref, toap, textPath;
  123. - <use ../>
  124. - gradient on stroke/text;
  125. - <clipPath>
  126. - text-underline and strikethrough
  127. - text opacity
  128. - colors as rgb(87%, 56%, 25%)
  129. - rect using units for dimensions
  130. - Only uses default spreadMethod = "pad" for gradients
  131. ===========================
  132. mPDF v4.4 (24/03/2010)
  133. ===========================
  134. New Features
  135. ------------
  136. - Support SVG image files (partial)
  137. - Rotate images or graphs (by multiples of 90 degrees)
  138. - Set opacity (transparency) for background images
  139. - Control resizing of background images
  140. - Set whether to print watermark images behind or in front of page contents
  141. - Reduced memory usage when printing tables (partly configurable)
  142. - Option to set path to folder for temporary files
  143. - Improved compliance for CSS text-align justify
  144. - Increased support for CSS "media"
  145. - Improved performance when accessing local image files
  146. Minor Enhancements
  147. ------------------
  148. - Allows space in output file name e.g. $mpdf->Output('t est.pdf','D'); [4.3.007B]
  149. - Header changed in Output to improve compatability with IE6 (affects 'D' and 'I') [4.3.012B]
  150. - background-images do not show noimage.jpg if missing [4.3.012D]
  151. - simpleTables (which improves performance) now also allows: background-color, -gradient and -image, padding
  152. and rotated text to be set for each cell. Only borders are not supported cell-by-cell. [4.3.006]
  153. Bug fixes
  154. ---------
  155. - Page width not correctly reset when defining default page margins (L/R) by @page [4.3.007C]
  156. - Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.3.005]
  157. NB This should have been fixed in [4.2.028] but got left out!
  158. - UseSubstitutionsMB causes errors inside <textarea> and <select> so now disabled in these 2 situations [4.3.004]
  159. - CSS background: 'none' did not cancel background-image/background-color if it comes later [4.3.002, 4.3.011]
  160. - Warning message 'depracated' (as of PHP 5.3) when using Templates [4.3.007]
  161. - AutoFont incorrectly altering multibyte characters ending in \xa0 [4.3.012C]
  162. - "Initial" default value for border-width changed from 1px to 'medium' e.g. border-top: solid #000000; [4.3.010]
  163. - WMF image sometimes inverted [4.3.016]
  164. Updated Files
  165. -------------
  166. mpdf.php
  167. config.php
  168. changelog.txt
  169. New files
  170. ---------
  171. classes/svg.php
  172. New config variables
  173. --------------------
  174. $this->justifyB4br=false;
  175. $this->CSSselectMedia='print';
  176. $this->watermarkImgBehind = false;
  177. BACKWARD COMPATIBILITY
  178. ----------------------
  179. All changes are backwards compatible except the handling of some background-images - please see notes below.
  180. Watermark Image z-order
  181. -----------------------
  182. By default mPDF prints watermarks on top of the page contents to ensure that they are not hidden by backgrounds
  183. (especially table cells).
  184. You can specify watermark images to be printed behind page contents by setting a configurable variable:
  185. $this->watermarkImgBehind = true; // default=false
  186. [4.3.018]
  187. Rotating Images and Graphs
  188. --------------------------
  189. Images or graphs can be rotated (by multiples of 90 degrees) using a custom HTML attribute e.g.
  190. <img rotate="90|-90|180" ... />
  191. <jpgraph rotate="90" ... />
  192. Valid options are: 90|-90|180.
  193. Positive values are clockwise.
  194. If width is specified e.g. width="3cm" this is applied to the rotated image i.e. will be width 3cm after rotating
  195. [4.3.016]
  196. Background Image Opacity
  197. ------------------------
  198. A custom CSS property "background-image-opacity": is now supported on BODY, DIV+ (block elements) and TD
  199. Takes values between 0 and 1.0
  200. Resizing Background Images
  201. --------------------------
  202. A custom CSS property "background-image-resize": is now supported on BODY, DIV+ (block elements) and TD
  203. 0 - No resizing (default)
  204. 1 - Shrink-to-fit w (keep aspect ratio)
  205. 2 - Shrink-to-fit h (keep aspect ratio)
  206. 3 - Shrink-to-fit w and/or h (keep aspect ratio)
  207. 4 - Resize-to-fit w (keep aspect ratio)
  208. 5 - Resize-to-fit h (keep aspect ratio)
  209. 6 - Resize-to-fit w and h
  210. N.B. Prior to v4.4 background-images were incorrectly constrained to maximum width of the containing block.
  211. The default is now to do NO resizing on background-images. Setting "background-image-resize:3" should be used
  212. for backwards compatibility.
  213. [4.3.015, 4.3.012D]
  214. SVG Image files
  215. ---------------
  216. SVG image files are now partially supported (but as for WMF - not as background-images).
  217. viewBox (preserveAspectRatio is not supported) viewBox="0 0 400 200" width="400" height="200"
  218. Takes viewBox in preference to width/height if present on <svg>
  219. If neither present, will size to width of page (square) as the containing box.
  220. Units are interpreted as pixels if undefined.
  221. Doesn't recognise internal CSS <style> elements
  222. Gradients only take 2 colours which are taken as stop-offset 0% and 100%
  223. [4.3.013 & 4.3.017]
  224. Reduced Memory Usage printing Tables
  225. ------------------------------------
  226. mPDF uses a lot of memory when processing large tables. Parts of the script have been rewritten to
  227. reduce memory consumption when writing tables which use collapsed borders (10-25% saving).
  228. Memory usage can be reduced further by setting a configurable variable:
  229. $this->packTableData = true; // default=false
  230. but note that this causes a significant increase in processing time.
  231. [4.3.008, 4.3.019, 4.3.014]
  232. User-defined path to Temporary folder
  233. -------------------------------------
  234. mPDF uses a folder to write and store temporary files when processing images. By default this is the
  235. [your_path_to_mpdf]/tmp/
  236. This is now user-definable by defining the constant _MPDF_TEMP_PATH before including mpdf.php script.
  237. Text Justification
  238. ------------------
  239. In a justified text block, an inline image, textarea, input, or select causing a new line will now force
  240. the previous line to be justified. HR and BR do NOT force justification (as in browsers).
  241. For optional compliance of MS Word behaviour, there is a new configurable variable:
  242. $this->justifyB4br = false; // Change to true to force justification before a <BR> (as in MS Word)
  243. [4.3.003]
  244. CSS support for @media
  245. ----------------------
  246. Now supports media-dependent CSS styles e.g.
  247. @media print {
  248. p { color: red; }
  249. }
  250. as well as
  251. <style media="...">...</style> and
  252. <link rel="stylesheet" media="print" href="..." />
  253. Proper matching of CSS media to select using configurable variable:
  254. $this->CSSselectMedia='print'; // default="print" set in config.php : screen, print, or any other CSS @media type (not "all")
  255. N.B. $this->disablePrintCSS in now depracated
  256. [4.3.001]
  257. ===========================
  258. mPDF v4.3 (28/02/2010)
  259. ===========================
  260. NEW FEATURES
  261. ------------
  262. - Page (sheet) size can be reset within document (http://mpdf1.com/manual/index.php?tid=436) [4.2.024, 4.2.025]
  263. - PDF/A1-b compliant files (http://mpdf1.com/manual/index.php?tid=420)
  264. - Improve performance using simpleTables (http://mpdf1.com/manual/index.php?tid=430)
  265. - mPDFI incorporated into main mPDF class (http://mpdf1.com/manual/index.php?tid=432)
  266. - <dottab> added as custom HTML tag: inserts dots to the following text, which is right-aligned [4.2.031]
  267. See Example files 38 and 39 for PDFA compliant file and <dottab>
  268. BACKWARD COMPATIBILITY
  269. ----------------------
  270. All changes are backwards compatible except the use of mPDFI. You will need to make minor changes to your scripts.
  271. See the manual http://mpdf1.com/manual/index.php?tid=432 for details.
  272. BUG FIXES
  273. ---------
  274. - When using Table of Contents and not resetting page numbers: HTML headers/footers showed incorrect page number [4.2.020]
  275. - Table of Contents: last page not printing page background-color [4.2.023]
  276. - Image file with space " " in the file name failing [4.2.016]
  277. - Image file path unnecessarily resolved to full URI - changed to use relative path if possible [4.2.029] ***
  278. - Table - not calculating height of cell correctly [4.2.015, 4.2.012, 4.2.011, 4.2.009]
  279. - Table row breaking after/during cell when image in cell taller than font-height [4.2.008]
  280. - When Table row(cell) greater height than the page-height but requiring resizing greater than allowed by autosize - not resizing [4.2.005]
  281. - Table cell border not resized correctly [4.2.002]
  282. - Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.2.028] ****
  283. - Background-image in HTMLFooter not correctly setting 0,0 origin [4.2.014]
  284. - Background-image set as an in-line style not working [4.2.013]
  285. - Background-image set in CSS @page or <body> was being constrained to less than page size [4.2.032]
  286. - Imported Templates overwriting Headers (with images or gradients) [4.2.004]
  287. - When using imports/templates, HTML header with background-image causing page to disappear [4.2.001]
  288. - block-style element breaking over more than 2 pages incorrectly adjusting L/R margins [4.2.022]
  289. - CSS @page property "size" set on :left :right or :first pseudo-selectors - disabled [4.2.022]
  290. - Annotations default colour incorrectly set in PDF as [100 100 0] corrected to [1 1 0] (seemed to work ok?) [4.2.026]
  291. - Overwrite() now parses input file more tolerantly recognising more source files [4.2.030]
  292. **** Bug fix 4.2.028 never got into the release of v4.3 Included in next release [4.3.005]
  293. **** Bug fix 4.2.029 never not fully implmented in v4.3 Included in next release [4.3.012]
  294. Changed files
  295. -------------
  296. mpdf.php
  297. compress.php
  298. config.php
  299. classes/t1asm.php
  300. includes/functions.php
  301. mpdfi/fpdi_pdf_parser.php
  302. Added files/folder: /mpdfi/filters/*.*
  303. Added file/folder: /iccprofiles/sRGB_IEC61966-2-1.icc
  304. mpdfi/mpdfi.php (no longer required)
  305. New Configuration variables
  306. ---------------------------
  307. [config.php]
  308. $this->enableImports
  309. $this->simpleTables
  310. $this->PDFA
  311. $this->ICCProfile
  312. $this->PDFAauto
  313. Minor changes
  314. -------------
  315. Increased PDF file compatibility with spec 1.4
  316. - PDF version changed to 1.4
  317. - A binary file marker (a comment line with 4 characters > 127 ASCII) is added just after the first line
  318. - %%EOF no longer has line break after it [4.2.010]
  319. - /ID object is added to trailer object when not encrypted [4.2.010]
  320. When using progress bars, one of the JS scripts is now referenced as an external file
  321. to allow it to be cached by user's browser and improve performance for end-user [4.2.007]
  322. Importing external PDF files: LZW encoded PDF files are now supported
  323. When adding an annotation, the popup window can be set be either open or closed when the document is opened [4.2.027]
  324. - size and position of the popup can also be specified
  325. ===========================
  326. mPDF v4.2 (27/01/2010)
  327. ===========================
  328. NEW FEATURES
  329. ------------
  330. - image handling improved
  331. - table layout - additional control over resizing
  332. - vertical-alignment of images - better support for all CSS types
  333. - top and bottom margins collapse between block elements
  334. - improved support for CSS line-height
  335. - display progress bar whilst generating file
  336. - CSS @page selector can be specified when adding a pagebreak
  337. - CSS @page selector allows different margins, backgrounds, headers/footers on :first :left and :right pages
  338. - PNG images with alpha channel fully supported
  339. - ability to generate italic and bold font variants from base font file
  340. - CJK fonts to embed as subsets
  341. - "double" border on block elements
  342. - character substitution for missing characters in UTF-8 fonts
  343. - direct passing of dynamically produced image data
  344. - background-gradient and background-image can now co-exist
  345. Bug fixes
  346. ---------
  347. - empty variable (undefined var, false, null, array() etc.) sent to WriteHTML produced error message "Invalid UTF-8"
  348. - CJK in tables when not using CJK (utf-8-s) autosized very small as characters did not word-wrap
  349. - parsing stylesheets: background image not recognised if containbed uppercase characters in file name
  350. - "double" border on table used white between the lines instead of current background colour
  351. - $this->shrink_tables_to_fit = 0 or false caused fatal errors
  352. - background color or images not printing correctly when breaking across pages
  353. - background not printed for List inside a block element
  354. - columns starting near end of page with no room for a line triggering column change (resulting in text misplaced) not page break
  355. - table cell not calculating cell height correctly when "orphan" characters (;:,.?! etc.) at end of line
  356. - table breaking page in column 2 when col 1 is rowspan'ned
  357. - margin-collapse at top of page not working if bookmark/annotation/indexentry/toc
  358. - column break triggered by HR triggering a second column break
  359. - an empty 'position:fixed' element with no/auto width or height caused fatal error
  360. - mPDFI: template documents were overwriting HTML headers
  361. - mPDFI: function Overwrite (to change text in existing PDF) - fatal error if using with encrypted file
  362. Bug - not fixed
  363. - WriteHTML('',2) with '2' parameter not recognising 'margin-collapse:collapse' for DIVs or 'line-height' set in default CSS 'BODY'
  364. New or Updated Files
  365. --------------------
  366. mpdf.php
  367. compress.php
  368. config.php
  369. config_cp.php
  370. config_fonts.php
  371. mpdf.css
  372. classes/gif.php
  373. classes/indic.php
  374. includes/subs_core.php
  375. mpdfi/mpdfi.php
  376. unifont/ar_k_001.uni2gn.php
  377. All files in new folder: /progress/*.*
  378. NEW FOLDER /tmp/ required with read/write permissions - used for temporary image files or progress bars
  379. ===========================
  380. mPDF v4.1.1 (21/12/2009)
  381. ===========================
  382. Error corrected in /makefont/makefonts.php file (moved completed Unicode files to font folder instead of unifont)
  383. ===========================
  384. mPDF v4.1 (20/12/2009)
  385. ===========================
  386. MySQL support for embedded font subsets abandoned, and replaced with file-based.
  387. Files no longer required
  388. ------------------------
  389. config_db.php
  390. /unifont/RUNME.php
  391. /unifont/*.ufm and /unifont/*.t1a font files
  392. MySQL Database no longer required
  393. Files Updated
  394. -------------
  395. mpdf.php
  396. /classes/t1asm.php
  397. /makefont/makefonts.php
  398. New files
  399. ---------
  400. /unifont/*.dat and /unifont/*.dat.php font files
  401. Bug-fixes
  402. ---------
  403. - Image - If automatically resizing to fit maximum page size incorrectly subtracted margin-header
  404. - Annotation and textarea in same HTML chunk causes mPDF to crash (preg_replace textarea with /u modifier in AdjustHTML)
  405. - set_magic_quotes_runtime error ($mgr not $mqr)
  406. - Table align did not reverse when using RTL document
  407. Alteration: Image - if writing Image in fixedpos div position:absolute - to allow Image to be resized to full page size
  408. ===========================
  409. mPDF v4.0 (17/12/2009)
  410. ===========================
  411. Major additions
  412. ---------------
  413. - Ability to embed font subsets (creating much smaller files)
  414. - Much improved support for Arabic languages
  415. - Support for Indic languages including consonant conjuncts
  416. - Support for Fixed position block elements
  417. - New utility to help create your own fonts
  418. - PNG alpha channel transparency supported
  419. - New utility to create smaller mpdf script with reduced functionality (less memory)
  420. - Multiple Barcode types supported
  421. **********************************************************************************************
  422. * For more details see the documentation manual: http://mpdf1.com/manual/index.php?tid=410 *
  423. **********************************************************************************************
  424. Bug fixes (parsing CSS)
  425. -----------------------
  426. - <link href="" ... was not recognised if > 1 space between words
  427. - #Content p em { font-style:italic; } was applied to "#Content p"
  428. - @import url() embedded in a stylesheet file requires path fixed relative to stylesheet file
  429. - background-image url() embedded in a stylesheet file requires path fixed relative to stylesheet file
  430. - comment tags inside CSS <style> embedded in the HTML were removed
  431. Now fixed so <style><!-- ... --></style> works; <!-- <style>...</style> --> is removed
  432. Bug fixes (other)
  433. -----------------
  434. - clear (CSS property for floating elements) caused properties for that element to reset to defaults
  435. - width: auto caused collapse of border and padding on L & R of ordinary block elements
  436. - text-indent not inherited correctly (including em and % values)
  437. - named colour "steelblue" corrected RRGGBB hex code
  438. - table cell widths in %: if width of table cells set to >=100%, and not all columns are set
  439. This was fixed in 3.2 but led to problem where 2 cols: 1) 80% and 2) not set (see Table sizing test)
  440. Now fixed again to work for both(?)
  441. - parse PNG error fixed
  442. - bachground-image not correctly positioned in HTMLFooter and HTMLHeader (Not fixed properly in 3.2!)
  443. - fonts not supported with 0-9 in the name
  444. - font list in GetCodepage() in htmltoolkit.php (now config_cp.php) containing space " " not recognised
  445. - list number positioning
  446. - list font size set in CSS for UL/OL not working for first level list
  447. - table width (real value, not %) not working in nested table
  448. - GIF file failed if PDF file not compressed
  449. - list-style-type incorrectly inherited
  450. - line-height inheritance in lists
  451. - SetColumns added a new line - not required if at start of document/page
  452. - footer_line_spacing did not work
  453. - table cellPadding="" overwrote cell padding set on cell CSS
  454. - could not turn off Default non-HTML foter LINE
  455. - border specified as "em"
  456. - default values set in mpdf.css overriden by inherited properties e.g. <div><h1>Here</h1></div> lost font-size for H1
  457. ===========================
  458. mPDF v3.2 (25/10/2009)
  459. ===========================
  460. Bug fixes
  461. ---------
  462. - 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
  463. - Ouput download file changed to allow compatability with IE6 (http://mpdf.bpm1.com/forum/comments.php?DiscussionID=120&page=1#Item_4)
  464. - 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]
  465. - Table: if font changed in cell, font was not retoring properly afterwards causing errors (restoreInlineProperties())
  466. - Lists: list items containing <br />, font not restoring after bullet
  467. - Graceful support for block elements inside list items e.g. <li><p>... (not supported, but tolerated)
  468. - Index: Created dividing letters separately for Uppercase and lowercase
  469. - Incorrectly changing input character set when encountering e.g. charset=iso-8859-1 in the text of the document
  470. - Changed so only detects it if within <head>...</head>
  471. - 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
  472. - Background-image used in HTML footer not appearing (correctly)
  473. - RTL tables: nested tables will not automatically transpose L->R
  474. - "Keep heading with table" - changed to allow <h1 style=".."> not just <h1>
  475. - "Keep heading with table" - backgrounds (bgcolor, image or gradient) incorrectly handled - now removed
  476. - Rotated table spread over more than 1 page caused enclosing block background colours to be be rotated along with table
  477. - CSS text-indent % now correctly suported (% of containing block width)
  478. - CSS width em on a block element e.g. DIV now correctly suported
  479. - calculating _tableheight, if remainingpage==0, get error (div by zero)
  480. - Table moved to next page with page-break-inside=avoid, produced an enlarged table (font)
  481. - RTL text-align override on BODY text was not working consistently
  482. - Arab characters: Character &#x647; (HEH) appearing in Final presentation form instead of Isolated
  483. - Vertical position of background-image on whole page incorrect
  484. - SetProtection can now be used with no permissions set (was not working unless at least one permission set)
  485. Developers
  486. ----------
  487. Some more undefined indexes and variables declared (courtesy of DSmart http://mpdf.bpm1.com/forum/comments.php?DiscussionID=117&page=1#Item_0 )
  488. Comment lines removed for < v3.0 to tidy up code
  489. Enhancements
  490. ------------
  491. CSS style height now partially supported on block elements DIV, P, H1 etc. --IF--
  492. - block is all on one page
  493. - will extend the block but not shorten it
  494. - will not force a pagebreak (max. at bottom of page)
  495. - % is interpreted as % of printable page height (inside margins)
  496. <TFOOT> now supported (placed at start as in HTML spec) displays at end of table, and repeats as a footer
  497. Background-image and background-gradient now supported in TD and TH (works in all cases except: background-image is not rotated or
  498. positioned correctly if table is rotated)
  499. NB Background images and background-gradients do not work if Columns are being used, or if $use_kwt is TRUE (keep-with-table),
  500. or if page-break-inside:avoid is active.
  501. Updated files
  502. -------------
  503. mpdf.php
  504. htmltoolkit.php
  505. ===========================
  506. mPDF v3.1 (30/08/2009)
  507. ===========================
  508. Bug fixes
  509. ---------
  510. - Image error if relative path used on domain root (e.g. img src="image.png" and basepath is http://www.yourdomain.com
  511. was giving http://www.yourdomain.com//image.png) [3.1]
  512. - Errors in parsing background CSS (background-repeat, background-position etc) [3.1]
  513. - Textarea did not corectly convert width or height in units relating to font e.g. em [3.0beta_01]
  514. - If page margin-bottom set to zero, SetHTMLfooter() crashes with "Division by zero" error [3.0beta_01]
  515. - Table with header row and rowspan in tbody, not calculating maxrowheightcorrectly
  516. - Prevent Index breaking column just after a dividing letter
  517. - Select or input form field when text around it is justified had text in the form field justified
  518. - TocBookMarkText needs to be htmlspecialchar-ed - decoded when entered inside <tocpagebreak>
  519. - <img src="" /> caused crash
  520. - DisplayPreferences used as a variable name and a function: function renamed to SetDisplayPreferences()
  521. - Image with src file not including a "." incorrectly parsed (e.g. http://www.domain.com/imagegenerator?params=23)
  522. New Features
  523. ------------
  524. - var $debug (true|false) default false; show or hide error reporting at output stage [3.1]
  525. - var $autoPageBreak (true|false) default true; allows overriding of automatic page breaks [3.0beta_02]
  526. - <indexinsert /> HTML equivalent of CreateIndex() [was CreateReference()]
  527. - 2nd attribute/parameter "xref" in IndexEntry() and <indexentry> - works like IndexEntrySee() as cross-reference entry
  528. - function SetWatermarkText allows null parameters to be passed i.e. SetWatermarkText() - will clear the WatermarkText
  529. - <watermarktext content="" alpha="" /> - HTML equivalent of SetWatermarkText()
  530. - <watermarkimage src="" alpha="" position="" size="" /> - HTML equivalent of SetWatermarkImage()
  531. Documentation
  532. -------------
  533. See Manual at http://mpdf.bpm1.com/manual/ for more information - especially:
  534. - User's Guide>>What Else Can I Do?>>Backgrounds & Borders
  535. - User's Guide>>What Else Can I Do?>>Floating blocks
  536. Files updated:
  537. -------------
  538. mpdf.php
  539. htmltoolkit.php
  540. graph.php
  541. Developers only
  542. ---------------
  543. 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.
  544. $arr = array();
  545. ...
  546. if ($arr['index'] == 5 ) {...}
  547. To prevent this, lines were added at the start of the mpdf.php script to turn error notices OFF.
  548. In a move towards making mPDF able to run with full error_reporting on, a large amount of the script has been altered
  549. e.g. the line above would be changed to:
  550. if (isset($arr['index'] && $arr['index'] == 5 ) {...}
  551. 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
  552. off in mPDF 3.1
  553. If you care to test it, please uncomment line 43 (//error_reporting(E_ALL);) and report any warning notices that you get.
  554. NB This has added about 40kB to the script size.
  555. ===========================
  556. mPDF v3.0beta (14/06/2009)
  557. ===========================
  558. New Features
  559. ------------
  560. - CSS "float" partially supported (as well as clear:left|right|both)
  561. - CSS "background-image" "background-position" "background-repeat" "background-color" "background" supported for block-level elements
  562. - CSS background-color and background-image for <body > element added: this covers the whole page i.e. not just inside the "margins"
  563. - CSS background-color and background-image can be defined for CSS @page{}
  564. - Background gradients (linear or radial) can be defined using a custom CSS style property
  565. - Border radius can be defined to give rounded edges to block elements (uses draft CSS3 spec.)
  566. - page number can be reset to any value during the document (in AddPage() <pagebreak> etc.)
  567. - PNG images: Interlaced and alpha-channel-set PNG images now supported
  568. - internal links supported in Indexes (parameter added to CreateIndex()/CreateReference(): $useLinking=true;)
  569. - HTML Headers and footers now support hyperlinks
  570. - improved handling of <br>, block elements, and text lines inside table - approximates better to browser handling
  571. - borders of block-level elements & table cell borders supported (partially) in columns
  572. - optional error reporting for problems with Images ($showImageErrors)
  573. - ToC will word-wrap long entries
  574. - internal links (Bookmarks, IndexEntry and ToCEntry) rewritten to give more accurate positioning (when used as <tag>)
  575. - autofont algorithm improved for CJK languages
  576. - define text before and after page numbers ($pagenumPrefix; $pagenumSuffix; $nbpgPrefix; $nbpgSuffix;)
  577. - Additional color names supported - full list from SVG1.0
  578. Bug fixes
  579. ---------
  580. - Column width not resetting after an automatic pagebreak, or after setting HTMLheader
  581. - using AutoFont unnecssarily changed htmlspecialchars to code causing errors
  582. - Lists inside a table - incorrectly calculating table cell height
  583. - CJK - 4-byte utf-8 chars not displaying properly (includes HKCS characters)
  584. - mailto: links incorrectly handled
  585. - TOCpagebreak() - usePaging default clarified: true unless specified as '', 0, '0' or false; (null ->true)
  586. - <tocpagebreak> (as html tag) with no "name" defined, used at start of page, added a further blank page(s)
  587. - Lists - inaccurate calculation of space required for numbers in certain circumstances
  588. - Generated images (.php) only working if cURL enabled - (fixed, but rquires allow_url_fopen if remote file)
  589. - flag added to turn off error reporting when buffering used ($allow_output_buffering = false;)
  590. - 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)
  591. - TOC - if not using ODD/EVEN paging, did not add extra page and messed up
  592. - Rotated table which did not fit on remaining page resized to bigger than default
  593. - HR of width less than 100% - text continued on line after it
  594. - HR alignment not working (fixed so both CSS text-align and margin: 0 0 0 auto etc work)
  595. - HR in table did not correctly re-size when necessary
  596. - characters in symbols/zapfdingbats which in non-utf-8 mode are represented as chr(173) incorrectly handled as soft-hyphens
  597. (bug introduced 2.5 with soft-hyphens - affects symbols &#8593; arrow-up and Zapfdingbats &#9313; encircled 2)
  598. - Internal links (anchors) - Annotation/Bookmarks etc. incorrectly positioned when page orientation changed
  599. - ToC - when using multiple ToCs, internal links were not correctly adjusted
  600. - anchor (a name="") used inside a table was incorrectly positioned at the end of table
  601. - Tables: cell height calculated incorrectly when BR used
  602. - Table rotated with "page-break-inside:avoid" not kept on one page
  603. - Table rotated and split over > 1 page - vertical alignment inaccurate
  604. - Headers/Footers (non_html) when no style set caused errors
  605. - Table: breaking page when using rowspan error (line 17142)
  606. - ToC: If no indent defined in HTML tag <tocpagebreak> or defined as 0 gave error
  607. Note
  608. ----
  609. In mPDF 3.0 the following sections of code have been significantly rewritten:
  610. - painting of borders and background colours for block-elements
  611. - table of contents
  612. - Index
  613. - vertical justification in columns (uses scaling to stretch vertically)
  614. NB changed htmltoolkit AdjustHTML - does not now remove <br> before </div>
  615. Warning - may display differently in normal text as well as tables
  616. Files updated:
  617. -------------
  618. mpdf.php
  619. htmltoolkit.php
  620. Developers only
  621. ---------------
  622. - Background-color handling in CSS changed so only inherited/cascaded when Columns active or Keep-block-together
  623. - otherwise would overwrite background image with inherited color
  624. - all %.2f used in sprintf() changed to %.3f in htmltoolkit.php and mpdf.php to increase accuracy of div border lines in columns etc.
  625. - variable $use_embeddedfonts_1252 renamed to $useOnlyCoreFonts as more precise: depracated but still supported.
  626. - this version included quite abit of tidying up/future-proofing some code:
  627. $var{0} changed to substr($var,0,1) etc. (due to go in PHP6)
  628. ereg_ changed to preg_ (depracated in PHP5.3) - (NB mainly in htmltoolkit.php)
  629. ===========================
  630. mPDF v2.5 (01/05/2009)
  631. ===========================
  632. New Features
  633. ------------
  634. - Automatic Hyphenation added, and support for soft-hyphens
  635. - Encryption works now for CJK language documents
  636. - Improved text justification
  637. - Support for 'generated' images e.g. "../ontheflyimage.php"
  638. Bug fixes
  639. ---------
  640. - Tables: cell height did not reduce if font-size used was smaller than table default
  641. - Columns: if setcolumns() to the same number already active - did not print out last bit of previous columns
  642. - 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)
  643. - <HR> in table cell was printing in incorrect position (bug introduced in mPDF 2.4)
  644. - Justification
  645. - if only one word on line, did not respect maximum character spacing
  646. - last character of line incorrectly had character spacing applied
  647. - Space at the end of last line of a Right Justify block - e.g. "end. </p>" now correctly ignored
  648. - &nbsp; incorrectly treated as a character when justifying text with word/char spacing
  649. - CJK punctuation (.,) added as 'orphans' to keep at end of line
  650. - PNG files - was still buggy reading larger PNG files (due to fread)
  651. Files updated:
  652. -------------
  653. mpdf.php
  654. htmltoolkit.php
  655. CJKdata.php
  656. /patterns/.. (new files)
  657. Developers only
  658. ---------------
  659. Variables renamed as more accurate or appropriate:
  660. - var $isunicode renamed as $is_MB
  661. - var $usingembeddedfonts renamed as $usingCoreFont
  662. CJK changed to act internally as UTF-8 encoded
  663. - (NB CJK Half-widths not supported from 2.5+ i.e. big5-hw gb-hw)
  664. ===========================
  665. mPDF v2.4 (23/04/2009)
  666. ===========================
  667. Files updated
  668. -------------
  669. mpdf.php
  670. htmltoolkit.php
  671. mpdfi/mpdfi.php
  672. New files
  673. ---------
  674. graph.php
  675. Graphs - Requires new folder: path_to_mpdf/graph_cache/ (must be writeable)
  676. New features
  677. ------------
  678. Annotations improved so they appear as a pop-up
  679. Re-use Document Templates (cf. RestartDocTemplate() in manual)
  680. Limited support for CSS float property on an IMG element allowing text wrapping e.g. <img style="float: right;"> (cf. Images in manual)
  681. Utility function PreparePreText() allows output of a text file which may include <pre>
  682. Automatic generation of graphs from data in tables (requires integration with JPGraph) (cf. Graphs in manual)
  683. Other Changes
  684. -------------
  685. IMPORTANT - User rights removed as not working with newer version of Adobe Reader 9 (affects Active forms and ability for users to modify annotations)
  686. Corrects text alignment when using {nb} or {nbpg} in (non-HTML) headers/footers
  687. Sets default timezone if not already set (at top of mpdf.php) to prevent E_STRICT ERROR message
  688. Suppresses E_NOTICE error reporting (at top of mpdf.php)
  689. Error capture in Output() to avoid PDF header being sent when error messages generated
  690. A function str_ireplace added to htmltoolkit to allow PHP4 to function
  691. Bug fixes
  692. ---------
  693. WMF images incorrectly positioned when in-line
  694. PNG images > 8kB failed to load - (fix in 2.3 didn't work - fixed properly this time)
  695. Annotations containing a new line (\n) causing an error
  696. Evaluation of <pre> text: "<code>[TAB] " evaluated incorrect number of spaces to follow to align tabs, because < was calculated as 4 chars (&lt;)
  697. ===========================
  698. mPDF v2.3 (22/03/2009)
  699. ===========================
  700. New Features
  701. ------------
  702. - Optionally detect language and when to use special fonts i.e. RTL (arabic), CJK (chinese), Thai (see SetAutoFont() etc.)
  703. - Supports HTML attribute "lang" in all tags and uses special fonts when required (see $useLang)
  704. - Joins Arabic and Farsi/Persian text into presentation forms
  705. - Import another PDF file and use as templates in your document (see UseTemplate() and mPDFI in the manual.)
  706. - Replace specified text strings in an existing PDF file (see OverWrite() etc.)
  707. - More than one Table of Contents can be used in a document (see tocpagebreak etc.)
  708. - Restore properties of open HTML block elements after a page break (variable $restoreBlockPagebreaks or new tag <formfeed>)
  709. - <annotation> <bookmark> <indexentry> <tocentry> can now accept characters <>'"& as htmlentities - htmlspecialchars(..., ENT_QUOTES)
  710. - <annotation> can now accept "\n" for new line
  711. - support for opacity (CSS3 property) for images
  712. - specify the number of spaces to substitute for TAB when parsing <pre> tags
  713. - greater control over margins and display when changing page orientation during document (see $forcePortraitMargins and $displayDefaultOrientation)
  714. Bug fixes
  715. ---------
  716. Fonts in CSS - Not parsing font-family: Trebuchet MS; correctly as trebuchet
  717. Fonts in CSS - CSS font-family: [unknown]; setting first $available_unifont rather than ignoring
  718. Images - not displaying on IIS platform
  719. Images - .wmf not displaying if (allow_url_fopen) not set
  720. Table borders - in defaultCSS, 'MARGIN-COLLAPSE'=> collapase not quoted therefore not working
  721. Line-break inside table - printing a blank background across page rather than just going down a line
  722. Form fields inside tables - will now resize if the table is autosized (shrunk)
  723. <pre> containing a '<' was changed to '&lt;'
  724. Tabs inside <pre> were all changed to 8 spaces, not the remainder following a string
  725. Header on first page was inset by 1mm left and right ($cMarginL and $cMarginR not set to zero)
  726. Table nested inside a cell with colspan > 1 was incorrectly handled
  727. PNG file crashed (?incorrectly defined PNG file) [adapted _parsepng to account for unexpected]
  728. Table or Cell - if font-size not recognised, mPDF set font-size to zero
  729. Font-sizes - [xx-small|x-small|small|medium|large|x-large|xx-large] were not recognised in tables
  730. ===========================
  731. mPDF v2.2.1 (17/02/2009)
  732. ===========================
  733. Bug fix - (bug introduced in 2.2)
  734. Table - header row did not return to top of page when repeating across pages.
  735. ===========================
  736. mPDF v2.2 (15/02/2009)
  737. ===========================
  738. Updated files from mPDF 2.1
  739. mpdf.php
  740. htmltoolkit.php
  741. mpdf.css (new)
  742. ===========================
  743. New files from mPDF <2.0 (only required for EAN Barcodes)
  744. font/ocrb.xx (several)
  745. unifont/ocrb.xx (several)
  746. IMPORTANT - you need to make sure the ocrb font is added to the config.php file
  747. - add 'ocrb' to the end of 3 arrays: $this->available_fonts $this->available_unifonts and $this->mono_fonts
  748. ===========================
  749. Summary of changes
  750. - external stylesheet file (mpdf.css) is used to configure default values ($useDefaultCSS2 and $defaultCSS2 are no longer used)
  751. - special comment tags to hide mPDF tags from browsers: <!--mpdf ... mpdf-->
  752. - AddColumn() function added (equivalent to <columnbreak>)
  753. - annotations - pop-up messages the reader can move or delete (if you set permissions)
  754. - support for WMF images as well as GIF, JPG, PNG
  755. - watermark image can be set instead of, or as well as text
  756. - nested tables can include other content
  757. - improved control over table layout
  758. - margin: auto now supported for table and block elements
  759. A number of methods and variables have been renamed or reCapitalised for consistency.
  760. Changes should be backwards comaptible.
  761. All user methods start with a Capital, all user-defined variables start with lowercase.
  762. Affected:
  763. Reference() -> IndexEntry()
  764. CreateReference() -> CreateIndex()
  765. $TopicIsUnvalidated -> $showWatermark
  766. setUnvalidatedText() -> SetWatermarkText()
  767. PHP appears at present to be case-insensitive for function/method names
  768. All the following functions have been renamed in the script with a capital first letter:
  769. setUserRights()
  770. setBasePath()
  771. setAnchor2Bookmark()
  772. setHeader()
  773. setFooter()
  774. defHeaderByName()
  775. defFooterByName()
  776. setHeaderByName()
  777. setFooterByName()
  778. setHTMLHeader()
  779. setHTMLFooter()
  780. defHTMLHeaderByName()
  781. defHTMLFooterByName()
  782. setHTMLHeaderByName()
  783. setHTMLFooterByName()
  784. shaded_box()
  785. writeBarcode()
  786. Variable names changed to lowercase first letter:
  787. (Variables are case-sensitive therefore aliases have been set up)
  788. Anchor2Bookmark
  789. BiDirectional
  790. KeepColumns
  791. AliasNbPg
  792. AliasNbPgGp
  793. =========
  794. Bug fixes
  795. =========
  796. Columns - $keepColumns=true was incorrectly calculating the place to continue printing after 1 and half columns (of 3)
  797. 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
  798. HR in Table cell - if table cell contains only HR (and column otherwise empty), HR was printed outside cell
  799. HR in Table cell - if table cell ended with a HR, height was one line too much
  800. Table page-break-inside:avoid - caused mPDF into permanent loop in some circumstances
  801. Paging - Total Pages/Group {nb} and {nbgp} didn't work in CJK
  802. CSS - Border size thin, medium and thick were only recognised in lowercase
  803. Table-header - rowspan not correctly output in THEAD
  804. Default CSS - table empty-cell:hide changed to show (CSS specification)
  805. ===========================
  806. mPDF v2.1 (24/01/2009)
  807. ===========================
  808. New Features in Version 2.1
  809. ---------------------------
  810. - CSS support improved generally (especially for cascading CSS, lists)
  811. - TableHeader changed to allow multiple rows in THEAD
  812. CSS changes
  813. -----------
  814. - display: none (block elements only - not lists or tables, nor HR)
  815. - width (TD/TH)
  816. - list-style-type (will also recognise the list-style-type from list-style) (OL/UL)
  817. recognised values: disc|circle|square|decimal|lower-roman|upper-roman|lower-latin|upper-latin|lower-alpha|upper-alpha|none
  818. - 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)
  819. - 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
  820. Numbered Lists
  821. --------------
  822. Variables set at the top of mpdf.php can be set to change:
  823. - text alignment of numbers in numbered lists (default Right)
  824. var $list_align_style = 'R';
  825. - content to follow a numbered list marker e.g. '.' gives 1. or IV. whereas ')' gives 1) or a)
  826. var $list_number_suffix = '.';
  827. (These can be altered at run time, but are not changeable through stylesheets or in-line style)
  828. Writing broken segments of HTML
  829. -------------------------------
  830. 2 new parameters have been added to WriteHTML()
  831. function WriteHTML($html,$sub=0,$init=true,$close=true) {
  832. $close - Leaves buffers/variables etc. in current state, so that it can continue to write the HTML where it leaves off
  833. $init - Clears and resets buffers/variables
  834. (N.B. You must end with a WriteHTML that calls $close=true)
  835. Example:
  836. $mpdf->WriteHTML('<p>This is the beginning...', 2, true, false);
  837. $mpdf->WriteHTML('...this is the middle...', 2, false, false);
  838. $mpdf->WriteHTML('...and this is the end</p>', 2, false, true);
  839. Rotated text in table cells
  840. ---------------------------
  841. NB This UPDATE will change expected output from previous versions******
  842. Prior to v2.1 any cell set to rotate text anticlockwise was forced to vertical align = bottom.
  843. 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.
  844. =========
  845. Bug fixes
  846. =========
  847. - List - list starting after "<div>Then some text not in a block element<ol>" incorrectly output
  848. - Tables - if cell font-size set smaller than default for the table, does not shrink the cell height
  849. - Columns (tables) - columns breaking across rows e.g. in the middle of a table cell
  850. - Tables - if table width set to e.g. 100% but cols are less, was not making up to set width
  851. - Watermark - was not printing if using HTMLFooter
  852. - Lists - not aligning numbering correctly if different font sizes used for bullet & text etc.
  853. - Lists - indent of text did not correctly allow for Maximum number in <ol> list
  854. - Table does not always move correctly to a new page
  855. - Table cell incorrectly calculated height causing text to overflow cell when printed
  856. - 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)
  857. - Table cell width if set as a percent was being downsized when autosizing table
  858. - Table CSS was buggy - improved
  859. - SetBasePath (when fetching remote website) - now handles string with query string on it e.g. http://www.domain.com/index.php?tid=42
  860. - Table cells with Rotated text - text not positioned correctly
  861. - Page number totals not working in utf-8 mode
  862. ============================
  863. Code efficiency improvements
  864. ============================
  865. - BIG speed improvement (compared with 2.0) with tables (especially large tables)
  866. - considerable increase in speed if writing long HTML segments to mPDF
  867. - speed improvement for tables (may be very significant if some cells have a lot of text in them causing uneven column widths)
  868. NB To speed up program more, consider setting $mpdf->useSubstitutions=false; if you do not use any characters outside the codepage selected
  869. ===============
  870. Keep-with-table
  871. ===============
  872. (This was introduced in v2.0 but I forgot to document it)
  873. If you set $this->use_kwt = true;
  874. 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)
  875. See Known Issues re: Using kwt inside a div with border/background (doesn't work)
  876. ===========================
  877. mPDF v2.0 (07/12/2008)
  878. ===========================
  879. Main New Features in Version 2.0
  880. - nested tables are supported
  881. - supports both models of table border: separate and collapsed
  882. - improved parsing of CSS stylesheets, and better handling of styles throughout
  883. - additional recognised CSS styles
  884. - page orientation, size, and margins can be changed within the document, using PHP script or custom HTML
  885. - some limited support for @page CSS to define page-box areas, with crop/cross marks for printing
  886. - improved control over headers and footers (including HTML headers/footers)
  887. - improved presentation of Form elements including image-type input fields
  888. - generates an EAN barcode suitable for a book/printed publication
  889. - active forms can be generated - EXPERIMENTAL at present
  890. - change document permissions to allow the user to make annotations - EXPERIMENTAL at present
  891. NB Lines are commented in mPDF script as changes for mPDF 1.4 - this became v2.0
  892. =========
  893. UPGRADING
  894. =========
  895. 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.
  896. To upgrade from v<=1.3 to v2.0 you only need to copy and overwrite the following 2 files:
  897. mpdf.php
  898. htmltoolkit.php
  899. Plus (optionally) if you want to use the EAN Barcode function, you will also need:
  900. font/ocrb.xx (several)
  901. unifont/ocrb.xx (several)
  902. IMPORTANT - you need to make sure the ocrb font is added to the config.php file
  903. - add 'ocrb' to the end of 3 arrays: $this->available_fonts $this->available_unifonts and $this->mono_fonts
  904. ==========
  905. Bug Fixes
  906. ==========
  907. <columns column-count="0"> did not turn off columns - Fixed
  908. Margins as % - e.g. margin-right: 50% set from CSS incorrectly applied 50% of the fontsize
  909. (Fixed - adding parameter to fn. ConvertSize in htmltoolkit.php and in calls to that function)
  910. DIV Width - e.g. div style="width: 50% was not working
  911. (Fixed - fn.SetCSS and OpenTag()'DIV')
  912. CSS values as Zero - p { margin: 0; } did not work in stylesheet unless 0 had a unit
  913. Multiple Non-breaking spaces collapsed - e.g. "1&nbsp; &nbsp; &nbsp;2" - was contracted to "1 2"
  914. (Fixed - fn.adjustHTML in htmltoolkit.php)
  915. 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
  916. (Fixed in fn.WriteFlowingBlock)
  917. Font size by inline style for form elements <input> <textarea> gave wrong size when using a relative size 0.9em
  918. (Fixed - fn.ConvertSize in htmltoolkit.php)
  919. Creation Date not correctly showing
  920. (Fixed - did not need to convert to UTF16)
  921. New block element started at end of page - block borders not painted
  922. (Fixed - fn.AddPage)
  923. DL did not close block correctly
  924. (Fixed - mistype in fn. CloseTag)
  925. Transparent not recognised as color/background-color
  926. (Attempted a fix by setting to ignore it! - fn. convertcolor in htmltoolkit.php)
  927. Zero (0) not displaying if only thing in table cell or tags e.g. <td>0</td> <p>0</p>
  928. (Fixed - fn.WriteHTML)
  929. 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.
  930. (Fixed)
  931. Could not copy from a completed PDF doc to clipboard when using a TrueTypeUnicode font
  932. (Fixed - fn._puttruetypeunicode - added CIDToGIDMap)
  933. Creating an Index (confusing called CreateReference in mPDF) based on only 1 column (i.e. columns off) caused it to print FAIL
  934. (Fixed - fn. CreateReference())
  935. Table of Contents - If a ToC entry reached other side of page a warning notice was produced
  936. Fixed - printing is now suppressed and it is moved down a line (but not when using rtl)
  937. "Keep Block Together" (i.e. page-break-inside: avoid for a block element)
  938. 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
  939. (Fixed)
  940. NB This is now ALWAYS disabled when it meets a table - can use page-break-inside:avoid for the table
  941. @import url(style.css) without quotation marks "" was not picked up, although it is valid HTML
  942. (Fixed - fn.ReadCSS())
  943. Reading CSS from external style sheets included all media
  944. Now set by default to ignore media="aural|braille"
  945. Allows media="print" but can exclude by: $mpdf->disablePrintCSS = true; (default = false)
  946. Works on both <link... and <style media="print">@import...
  947. See the web page example - this stops the CSS stylesheets specifically marked for "print" to be ignored
  948. Table borders (in collapsed model) incorrectly calculated which border had dominance (mPDF <=1.3 determined the overriding border by its color)
  949. (Fixed to follow CSS 2.1 specifications: width >> CSS dominance (cell>table) >> T & L > B & R)
  950. In the border-collapse=collapse mode, the following rules determine which border style "wins" in case of a conflict:
  951. 1. Borders with the 'border-style' of 'hidden' take precedence over all other conflicting borders.
  952. 2. narrow borders are discarded in favor of wider ones.
  953. 3. styles are preferred in this order: 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'.
  954. 4. If border styles differ only in color, then a style set on a cell wins over one on a table.
  955. 5. When two elements of the same type conflict, then the one further to the left or top wins out.
  956. Parsing CSS, a missed level would not be picked up i.e. CSS = div.refstr1 p {...} would not pick up:
  957. <div class="refstr1"> <div class="another"> <p>...
  958. (Fixed - fn. MergeCSS by carrying everything forwards)
  959. Note: I removed - && !$this->blk[$this->blklvl-1]['cascadeCSS']['CLASS>>'.$attr['CLASS']]['depth']
  960. Not sure why I put it there in the first place!
  961. In a later bit of function - && $this->blk[$this->blklvl-1]['cascadeCSS'][$tag]['depth']>1
  962. Haven't removed this, but is it needed???
  963. 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)
  964. (Fixed)
  965. CSS properties color, font-weight, and font-style set on a table were not inherited by the table cells
  966. (Fixed - var $base_table_properties)
  967. When rotating a table, the text following was positioned incorrectly
  968. (Fixed - fn. printtablebuffer)
  969. When rotating a table, links were not adjusted in position e.g. <a href="">...
  970. (Fixed - fn. printtablebuffer)
  971. 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
  972. (Fixed)
  973. 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>
  974. (Fixed - var $listjustfinished;)
  975. 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)
  976. (Fixed - fn.WriteHTML)
  977. <link href="..." rel="stylesheet"> was not recognised (because the href comes before the rel)
  978. (Fixed)
  979. Read linked CSS stylesheet OR @import stylesheet - now includes both.
  980. <tag class="class1 class2"> did not set either class1 or class2. Fixed so that it will now pick out class1 (better than nothing!)
  981. CSS line-height as % - interpreted 120% as 120 (x the font-size) - Fixed so it now accepts % and numbers
  982. Setting the basepath (used for relative links/external stylesheets etc) with $mpdf->setBasePath() was generally buggy!
  983. Now allows a domain e.g. $mpdf->setBasePath("http://www.domain.com"); (previously needed slash on end)
  984. (Fixed - hopefully!)
  985. 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(...
  986. =============
  987. Improvements(?)
  988. =============
  989. Unsupported image files - mPDF died with an error message if image files didn't meet expected format e.g. an interlaced PNG file
  990. Changed so images are now replaced by the NOIMG image.
  991. Footer margin (HTML and normal footers) now determines the lowest point that is printed (rather than the place to start printing the footer)
  992. NB IMPORTANT CHANGE - not backwards comaptible
  993. 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]
  994. To insert the total number of pages in the document anywhere in the doc, just use '{nb}'
  995. The line: $mpdf->AliasNbPages();
  996. has now been uncommented allowing {nb} to be used
  997. NB This will always give the total no. of pages in the whole document regardless of any changes you have made to page numbering.
  998. You can change the default placeholder '{nb}' to any string using: $mpdf->AliasNbPages('[**my Chars**]');
  999. $mpdf->AliasNbPageGroups(); default="{nbpg}"
  1000. Can be used to set the total number of pages in the current group i.e. between where page numbering is reset
  1001. CSS border correctly fixes "solid 3mm #000000" i.e. (style width color) - (not a bug, but this is often incorrectly specified)
  1002. Can now print div background behind a rotated table.
  1003. You can keep columns as they are i.e. 1st column will finish page then start on second, by setting
  1004. $mpdf->KeepColumns = true;
  1005. Image constrain
  1006. ===============
  1007. Image size is constrained to current margins and page position. Extra parameter added to end of fn. allows you to override this.
  1008. $mpdf->Image('files/images/frontcover.jpg',0,0,210,297,'jpg','',true, false); // e.g. the last "false" allows a full page picture
  1009. Useful for e.g. a cover page for your document
  1010. Cumulative CSS
  1011. ==============
  1012. In version <=1.3, if you call:
  1013. $mpdf->WriteHTML($stylesheet,1);
  1014. $mpdf->WriteHTML($html); // this one cleared the array $this->cascadeCSS; conatining cascaded CSS information from stylesheets
  1015. You were meant to call:
  1016. $mpdf->WriteHTML($html,2); // which doesn't re-parse the CSS information
  1017. v2.0 changed so that
  1018. $mpdf->WriteHTML($html); no longers clears the array $this->cascadeCSS and so can be used repeatedly;
  1019. ================================================
  1020. Additional CSSstyles & HTML attributes supported
  1021. ================================================
  1022. <BODY> - font-style, font-weight, color
  1023. <IMG> - html attributes width="" and height=""
  1024. <TABLE|TD|TH> - border: 'thin' 'medium' and 'thick' are now converted to 1px, 3px and 5px
  1025. <TABLE|TD|TH> - border now respects all types - e.g. 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and 'inset'
  1026. (NB mPDF only supports a full declaration of border e.g. "border: thin double #000000;")
  1027. <TD|TH> - CSS style="white-space: nowrap" and HTML attribute nowrap="nowrap"
  1028. <TABLE> - page-break-inside: avoid
  1029. <TABLE> - border-collapse: separate|collapse
  1030. <TABLE> - border-spacing: 2px 2px; (horizontal/vertical) or just one figure (both) NB same as cellSpacing
  1031. <TABLE> - empty-cells: hide|show (border-collapse:separate only)
  1032. <TABLE> - margin-left and margin-right (previously only supported top and bottom)
  1033. <TABLE> - padding: (this was incorrectly used for TD/TH before) (border-collapse:separate only)
  1034. <TD|TH> - padding:
  1035. <TABLE|TD|TH> - inline style "background" works (with a color only) the same as "background-color"
  1036. NB Table page-break-inside, autosize values and rotate are only respected for that set on first level table of nested tables
  1037. <TABLE> - cellSpacing and cellPadding HTML attributes:
  1038. NB cellSpacing is the same as CSS style "border-spacing"
  1039. NB cellPadding is a <table> attribute, but sets the cell padding - not table padding
  1040. <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)
  1041. <BLOCK ELEMENTS> - page-break-before: always|left|right - NB any surrounding block tags will be closed before the new page is inserted.
  1042. @page - see notes on Paged Media
  1043. ==========================
  1044. Unsupported HTML attribute
  1045. ==========================
  1046. <TD border="1"> - not valid HTML - no longer supported
  1047. =========
  1048. Additions
  1049. =========
  1050. "Keep-with-table"
  1051. $mpdf->use_kwt = true; // default=false
  1052. If set to true, will force any H1-H6 header immediately preceding a table to be kept together with the table
  1053. - automatically sets the table to fit on one page (i.e. page-break-inside=avoid) if it is a rotated table
  1054. - ignored if: Columns on, Keep-block-together active (page-break-inside=avoid for surrounding BLOCK), active Forms
  1055. =====
  1056. Notes
  1057. =====
  1058. NB Not a change - but note you can use this to allow you to feed html code encoded in other than utf-8:
  1059. $mpdf->allow_charset_conversion=true;
  1060. $mpdf->charset_in='windows-1252'; (needs suitable codes for iconv i.e. windows-1252 not win-1252)
  1061. Fixing Optional tags
  1062. ====================
  1063. php.net website has illegal nesting of <dt>.. <dd> .. </dd> .. </dt> and <p>.. <div> .. </div> .. </p>
  1064. The example wich parses the php.net webpage will not show correctly unless you change: $mpdf->allow_html_optional_endtags=false;
  1065. Trying to fix incorrect (X)HTML with $mpdf->allow_html_optional_endtags==true cancels the P when it meets a DIV etc.
  1066. EAN barcode
  1067. ===========
  1068. An EAN barcode can be generated
  1069. function writeBarcode($code, $showisbn=1, $x='', $y='', $size=1, $border=0, $paddingL=1, $paddingR=1, $paddingT=2, $paddingB=2) {
  1070. It accepts 12 or 13 digits with or without - hyphens as $code e.g.
  1071. $mpdf->writeBarcode('978-1234-567-890', 1, $mpdf->x, $mpdf->y);
  1072. NB - IMPORTANT***
  1073. A new font - OCR-B font/unifont is required, and needs to be added to the config.php file
  1074. cf. http://www.gs1uk.org/downloads/bar_code/Bar coding getting it right.pdf
  1075. Barcode size must be between 0.8 and 2.0 (80% to 200%)
  1076. CMYK Colors
  1077. ===========
  1078. Functions - SetDrawColor, SetTextColor and SetFillColor all now take an optional 4th parameter.
  1079. If defined this will interpret the input as CMYK color i.e.
  1080. SetDrawColor(15,82,0,10) // NB all values out of 100 - not 255 as for RGB
  1081. htmltoolkit.php fn.ConvertColor() - now interprets custom color definition: cmyk(15,82,0,10)
  1082. like rgb(r,g,b) except values out of 100
  1083. Intended to be used for calling the functions separately - BUT works in a limited way with CSS - does not get reset or inherited correctly
  1084. <p style="color:cmyk(215,31,15,10)"> does work
  1085. DEFAULT CSS
  1086. ===========
  1087. $defaultCSS has been updated to reflect better the standard HTML default e.g. using serif, table borders separate, cell vertical-align top
  1088. To keep mPDF 1.3 (my favourites) I have introduced:
  1089. $mpdf->useDefaultCSS2 = true;
  1090. ===================================
  1091. Permissions - forms and Annotations - Experimental!
  1092. ===================================
  1093. You can set the Permissions for the PDF file to allow the user to make Comments (annotations)
  1094. $mpdf->setUserRights($enabled=true[default]|false, $annots="/Create/Delete/Modify/Copy/Import/Export",
  1095. $form="/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate", $signature="/Modify") )
  1096. If you encrypt the file, make sure the permissions match e.g.:
  1097. $mpdf->setUserRights();
  1098. $mpdf->SetProtection(array('print','annots'),'yourPassword','myPassword');
  1099. To allow this, changed the PDF-file version to %PDF1.5 (NB Probably needs PDF version > 1.5 but can't test for this...)
  1100. NOTE: If you output the PDF file straight to the browser, it will only allow annotations after you save the document
  1101. ===========================
  1102. Active Forms - Experimental!
  1103. ===========================
  1104. At present , using active forms will prevent any internal and external links - that appear before active forms(?) - from working (why?)
  1105. May need to save form for proper use - see example, when scroll forwards and back, the form disappears??
  1106. Need to set Userrights (see above), and $mpdf->useActiveForms=true;
  1107. For Output options, see separate notes.
  1108. ============================
  1109. Internal Programming changes
  1110. ============================
  1111. NB fn. tablerotate in htmltoolkit no longer used; now uses a 'transform' to shift the whole block of PDF code
  1112. Graphics State
  1113. ==============
  1114. ExtGState does not need to be redefined - e.g. if a watermark added on every page, turning on and off alpha/transparency
  1115. Unnecessary file size.
  1116. function AddExtGState() edited to check if graphics state already exists before adding new one
  1117. ASCII-proof code
  1118. ================
  1119. "���" 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
  1120. Images
  1121. ======
  1122. 1) When copying remote images locally - incorrectly used "unset" now changed to "unlink"
  1123. 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.
  1124. NB Handling images was updated in v1.3 because my ISP changed allow_url_fopen to false
  1125. 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.
  1126. 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;
  1127. Else, if CURL is available and allow_url_fopen is false: then tries using CURL.
  1128. (Clear as mud???!!)
  1129. ===========================
  1130. mPDF v1.3 (21/09/2008)
  1131. ===========================
  1132. --------------
  1133. Page Numbering
  1134. --------------
  1135. Program changes:
  1136. fn. startPageNums() replaced with blank function
  1137. fn. stopPageNums() - deleted
  1138. fn. numPageNo() - deleted (all it did was return this->page anyway).
  1139. var $_numbering - deleted
  1140. var $_numberingFooter - deleted
  1141. var $_numPageNum - deleted
  1142. NEW
  1143. New: fn. AddPages() (as for AddPage but with type=NEXT-ODD or NEXT-EVEN see below)
  1144. Edited: fn. AddPage() - new parameters added
  1145. AddPage(orientation(NO),type="E|O", resetpagenum="1|0", pagenumstyle="I|i|A|a|1", suppress="on|off")
  1146. New: fn. docPageNum() - returns the document page number (or '') based on...
  1147. New : PageNumSubstitutions(array)
  1148. New attributes:
  1149. <pagebreak resetpagenum="1" // resets document page numbering to 1 from the new page onwards
  1150. <pagebreak suppress="on" // turns on suppression of page numbering i.e. in headers and footers, {PAGENO} is replaced by blank string
  1151. // ="0" turns suppression off
  1152. <pagebreak pagenumstyle="I|i|A|a|1" // (re)sets page number stle/type from the new page onwards - as for lists
  1153. // 1 - decimal; A/a - alpha (uppercase/lowercase); I/i - Roman (uppercase/lowercase)
  1154. <pagebreak type="NEXT-ODD" // always adds a page + another if required to make odd
  1155. <pagebreak type="NEXT-EVEN" // always adds a page + another if required to make even
  1156. Edited: fn. TOC() // sets the marker for a Table of Contents
  1157. New parameters allow the page-numbering details to be set
  1158. 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
  1159. new parameters as above for pagebreak resetpagenum="1|0", pagenumstyle="I|i|A|a|1", suppress="on|off"
  1160. Can also be set by attribute in the <TOC>
  1161. <TOC resetpagenum="1" pagenumstyle="I|i|A|a|1", suppress="on|off" />
  1162. --------------------------------------------
  1163. Changes to allow Rotated Text in table Cells
  1164. --------------------------------------------
  1165. Edited:
  1166. fn. OpenTag()
  1167. fn. _tableColumnWidth()
  1168. fn. _tableHeight()
  1169. fn. _tableWrite()
  1170. fn. tableHeader()
  1171. New custom style or attribute -- "text-rotate" -- can be set for either <tr> or <th|td>
  1172. Allowed values: 45 - 90 (written as integers) - rotates text anticlockwise, and -90 (clockwise)
  1173. Positive values less than 90 force cell to: vertical-align:bottom
  1174. Limitations:
  1175. Only allows single line of text;
  1176. Font, font-size, and style are determined by those set fro the cell, and cannot be changed;
  1177. No changes in font (or any other in-line changes e.g. <sup>) are supported within the text
  1178. Example: <tr style="text-rotate:90">...
  1179. ---------
  1180. Bug fixes
  1181. ---------
  1182. 1) HTML footer containing table was triggering page break.
  1183. Added $this->InHTMLFooter as flag to prevent page triggering in footers containing table
  1184. Set in fn.writeHTMLFooters() -> in fn.tableWrite() stops the pageBreak being reset
  1185. 2) Crashing when libcurl not installed.
  1186. Edited OpenTag() curl_init - added if (function_exists) to exclude crash when libcurl not installed
  1187. 3) Single cell with borders not showing the borders.
  1188. e.g. <table><tr><td style="border:1px solid #000000?>Hi</td></tr></table>
  1189. Problem: mPDF overrides cell border properties with table border properties for external borders. $defaultCSS had CSS defined for table as '0px solid #000000'
  1190. 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".
  1191. 4) Empty textarea incorrectly handled (the following HTML code being output in the textarea)
  1192. The html code for an empty textarea was incorrectly handled in htmltoolkit fn. AdjustHTML which has been edited
  1193. ===========================
  1194. mPDF v1.2 (2008-05-01)
  1195. ===========================
  1196. // Added v1.2 option to continue if invalid UTF-8 chars - used in function is_utf8()
  1197. var $ignore_invalid_utf8 = false;
  1198. Reading CSS in fn. ReadCSS() and applying in fn. MergeCSS() -
  1199. Edited to allow Tags, class and id with the same name to be distinct i.e. h5 {...} .h5 {...} #h5 {...}
  1200. * mPDF 1.2 This version supports: .class {...} / #id { .... }
  1201. * ADDED p {...} h1[-h6] {...} a {...} table {...} thead {...} th {...} td {...} hr {...}
  1202. * body {...} sets default font and fontsize
  1203. * It supports some cascaded CSS e.g. div.topic table.type1 td
  1204. * Does not support non-block level e.g. a#hover { ... }
  1205. Table: font-size, weight, style, family and color should all work
  1206. TD/TH: font-size, weight, style, family and color should all work
  1207. Added to htmltoolkit - fn.array_merge_recursive_unique()
  1208. memory_opt Removed in mPDF v1.2 - not working properly
  1209. fn. _begindoc() - changed to %PDF1.4 (was 1.3) as PDF version
  1210. Write HTML Headers and Footers
  1211. ------------------------------
  1212. fn. Close() - calls writeHTMLHeaders/Footers() before finishing doc
  1213. fn. WriteHTML() - added parameter
  1214. fn. _out - writes to outputbuffer when writing HTML footers/headers
  1215. New
  1216. fn. writeHTMLHeaders()
  1217. fn. writeHTMLFooters()
  1218. =======================
  1219. mPDF v1.1 (2008-05-01)
  1220. =======================
  1221. Programming changes to increase efficiency
  1222. ------------------------------------------
  1223. fn. WriteHTML() - added lines to combine substituted characters <tta> etc
  1224. Memory Optimization added (script from FPDF site) - edited fn. _putpages() and fn. _endpage()
  1225. fn. SetFont() edited to return val quicker if font already set (increase efficiency)
  1226. new vars chrs and ords are used to store chr() and ord() - quicker than using functions
  1227. fn.setMBencoding() - only call mb_internal_encoding if need to change
  1228. Bugs
  1229. ----
  1230. fn. SetDefaultFontSize() - edited to allow to override that set in defaultCSS
  1231. fn. Output() - Added temporary(?) disablement of encryption in CJK as it doesn't work!
  1232. fn. OpenTag() [LI] $this->blockjustfinished=false to prevents newline after first bullet of list within table
  1233. Uses of mb_ereg_replace removed, and mb_split changed - requires regex_encoding (regex_encoding only used as UTF-8)
  1234. fn. WriteHTML: attributes are trimmed with trim() to allow correct handling of e.g. class="bpmBook "
  1235. fn. printbuffer() and fn. openTag() to ensure
  1236. <div><div><p> outputs top margins/padding for both 1st and 2nd div
  1237. and </p></div></div> ...
  1238. fn. SetFont() added line - bug fixing in CJK fonts
  1239. CSS functionality
  1240. -----------------
  1241. Added special CSS 'thead-underline' (similar to topntail)
  1242. var $thead_font_weight; added (openTag) to enable setting of font-weight for <TH> cells
  1243. Fixed table border inheritance: Table border inherits border="1" to cells, but not table style="border..."
  1244. "page-break-inside: avoid" added (var keep_block_together) to allow a DIV or P to be kept on one page
  1245. - not compatible with table autosize or table rotate
  1246. - only works over maximum of 2 pages
  1247. Enhancements
  1248. ------------
  1249. Orphans in line justification: R. Bracket ) added to defined list of orphans
  1250. allow_url_open
  1251. --------------
  1252. 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.
  1253. - file_get_contents() changed to use libcurl (for CSS files)
  1254. - openTag('IMG') @fopen() and 3 functions _parsegif, _parseJPG, _parsePNG, edited to copy remote image files to local file to include images
  1255. FlowChart
  1256. ---------
  1257. Changes to enable mPDF work with a custom script producing Flowcharts:
  1258. - WriteHTML() second parameter=3 will allow HTML to be parsed but not output
  1259. - fn. Arrow() added
  1260. - TableWordWrap() added parameter to force array return