mPDF 6.0

A PHP class for rendering HTML content as PDF output
Can be used to output UTF-8 encoded web pages on the fly.

Based on FPDF and HTML 2 FPDF.

Main features:

  • UTF-8 encoded HTML is accepted
  • Bookmarks and Meta tag information are supported in all character sets
  • Right-to-left languages are supported
  • Automatic detection of RTL characters within a document
  • A single stylesheet can be used for all pages, with font substitution automatically for CJK characters.
  • Character substitution
  • Word spacing and character spacing are both used to justify text
  • Nested block-level elements (e.g. P, DIV) are supported
  • CSS style attributes now fully support font, font-size, color, and background color (for highlighting) plus many more
  • Table cell padding and borders are supported
  • Text-indent for 1st line of paragraph, and hanging indents are supported
  • List indenting can be defined
  • Multiple columns can be started and stopped anywhere on the page with column height adjusted (and optionally aligned to justify)
  • Tables can be rotated, or autosized - font-size is reduced if required to fit the page. Background colour for TR rows is supported
  • Odd and even paging can be used with inner and outer margins alternated
  • A more complex definition of headers and footers allows left/center/right parts to be defined, each with their own font-styles, and including code to allow the date/time to be inserted as well as page numbers
  • A table of contents can be generated automatically, which can be inserted at the front of the document, based on custom tags used throughout the HTML code
  • An index can be generated at the end of the document based on custom tags used throughout the HTML code
  • Non-breaking space is supported when using fonts that have a character representing chr(160) (not all of them)
  • A watermark can be used e.g. for 'DRAFT', and will appear as a transparency over other elements
  • Intelligent word-wrapping will avoid 'orphan' punctuation or superscript moving to the next line
  • All HTML entities are supported, as well as decimal and hex
  • Password protection can be set for the PDF file
  • NB The original commands from FPDF can be used

last updated on:
December 15th, 2014, 14:14 GMT
license type:

GPL: GNU General Public License

developed by:
Ian Back
operating system(s):
Windows / Linux / Mac OS / BSD / Solaris
C: \ PHP Classes
Download Button

In a hurry? Add it to your Download Basket!

user rating 7



Rate it!
What's New in This Release:
  • Support for complex scripts.
read full changelog

Add your review!