dompdf

HTML to PDF converter for PHP

LGPL-2.1 License

Downloads
108.6M
Stars
10.4K
Committers
158
dompdf - Dompdf 0.8.2

Published by bsweeney almost 7 years ago

This release has been superseded by version 0.8.3

Change highlights since 0.8.1

  • Bug Fix: "no block level parent found" errors
  • Bug Fix: links to external resources broken
  • Bug Fix: Image rendering issues when using IMagick
  • Margin collapse logic now handles negative margins
  • Additional object type checking

The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

We would like to extend our gratitude to the community members who helped make this release possible.

Requirements

dompdf 0.8.2 requires the following:

  • PHP 5.4 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http) or the curl PHP extension
  • php-font-lib v0.5.x
  • php-svg-lib v0.3.x (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

Download Instructions

The dompdf team recommends that you use Composer for easier dependency management.

If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. Click the link labeled "dompdf_0-8-2.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

dompdf - Dompdf 0.8.1

Published by bsweeney almost 7 years ago

This release has been superseded by version 0.8.2

Change highlights since 0.8.0

  • Improves compatibility with PHP 7.1
  • Improves table rendering around page breaks and margins
  • Fixes paging of generated content
  • Improves handling of CSS selectors, media queries, and inherited properties
  • Fixes Unicode support in (encrypted) PDF documents

View all changes since the previous release in the commit history.

Updated dependencies

  • php-svg-lib 0.5.1
  • php-svg-lib 0.3

We would like to extend our gratitude to the community members who helped make this release possible.

Requirements

dompdf 0.8.1 requires the following:

  • PHP 5.4 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http) or the curl PHP extension
  • php-font-lib v0.5.x
  • php-svg-lib v0.3.x (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

Download Instructions

The dompdf team recommends that you use Composer for easier dependency management.

If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. Click the link labeled "dompdf_0-8-1.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

dompdf - Dompdf 0.8.0

Published by bsweeney over 7 years ago

This release has been superseded by version 0.8.1

Change highlights since 0.7.0

  • Improves compatibility with PHP 7.1
  • Adds support for width: auto CSS styling
  • Adds support for RGB-alpha and HEX-alpha CSS color values
  • Falls back to curl for remote resource fetching
  • Adds support for HTML5 elements
  • Improves CSS support for the following: float, nth-child/nth-of-type, :matches pseudo-class
  • Adds support for in-document linking using element ID
  • Adds preliminary support for media queries (width, height, and orientation)
  • Improves performance in various areas
  • Updates DejaVu Fonts to 2.37

Updated dependencies

  • php-font-lib 0.5
  • php-svg-lib 0.2

We would like to extend our gratitude to the community members who helped make this release possible.

Requirements

dompdf 0.7.0 requires the following:

  • PHP 5.3 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http) or the curl PHP extension
  • php-font-lib v0.5.x
  • php-svg-lib v0.2 (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

Download Instructions

The dompdf team recommends that you use Composer for easier dependency management.

If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. Click the link labeled "dompdf_0-8-0.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

dompdf - dompdf 0.7.0

Published by bsweeney over 8 years ago

This release has been superseded by version 0.8.0

Change highlights since 0.6.2

  • Incorporate relevant security updates from the 0.6.2 code base
  • Add namespace support
  • Restructure code for implementation of the PSR coding standard
  • Drop support for the dompdf_config.inc.php configuration file; see the migration section below for more details
  • Remove non-library utility code (load_font.php, dompdf.php, the www content)
  • Add initial support for SVG

The majority of work in this release went towards support for namespaces, PSR, and SVG support but a few code improvements were also made. Highlights include:

  • Update DejaVu fonts to v2.34
  • Optimize performance by removing support for versions of PHP prior to 5.3
  • Improve PDF structure produced by CPDF
  • Add rendered document page selection support to the GD adapter
  • Take Unicode and float support out of "beta"
  • Add support for unit testing

We would like to extend our gratitude to the community members who helped make this release possible.

Requirements

dompdf 0.7.0 requires the following:

  • PHP 5.3 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http)
  • php-font-lib v0.4.x
  • php-svg-lib v0.1 (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

The dompdf team recommends that you use Composer for easier dependency management. If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. The release package is titled dompdf_0-7-0.zip.

Notes on migrating from an earlier version of dompdf

  1. Because the dompdf_config.inc.php file has been removed from this release (and is no longer referenced) all dompdf options should be set at run time.
  2. The class naming conventions required a change to the dompdf_font_family_cache.php file. Though we have attempted to accommodate this change your first step when encountering bugs (if you don't know where to start) might be to reset your font directory (i.e. remove custom font files and the related font metrics files, and remove the non-dist, generated, font family cache file).
  3. Though a font loading script is no longer provided with dompdf you may continue to use the @font-face CSS rule to install fonts at run time. If you wish to pre-load fonts you may find a copy of the load_font.php script updated to run with this release of dompdf in the dompdf-utils project.
  4. The FontMetrics class is now instantiated instead of static. To simplify migration of embedded scripts from earlier versions of dompdf we provide access to the instantiated FontMetrics class via the $fontMetrics variable. Please update your embedded scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->getFont('helvetica').
dompdf - dompdf 0.7.0 beta 3

Published by bsweeney almost 9 years ago

Change highlights since 0.6.2

  • Incorporate relevant security updates from the 0.6.2 code base
  • Add namespace support
  • Restructure code for implementation of the PSR coding standard
  • Drop support for the dompdf_config.inc.php configuration file; see the migration section below for more details
  • Remove non-library utility code (load_font.php, dompdf.php, the www content)
  • Add initial support for SVG

The majority of work in this release went towards support for namespaces, PSR, and SVG support but a few code improvements were also made. Highlights include:

  • Update DejaVu fonts to v2.34
  • Optimize performance by removing support for versions of PHP prior to 5.3
  • Improve PDF structure produced by CPDF
  • Add rendered document page selection support to the GD adapter
  • Take Unicode and float support out of "beta"
  • Add support for unit testing

Requirements

The dompdf 0.7.0 beta 3 requires the following:

  • PHP 5.3 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http)
  • php-font-lib v0.4.x
  • php-svg-lib v0.1 (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

The dompdf team recommends that you use Composer for easier dependency management. If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. The beta package is titled dompdf_0-7-0_beta3.zip.

Notes on migrating from an earlier version of dompdf

  1. Because the dompdf_config.inc.php file has been removed from this release (and is no longer referenced) all dompdf options will have to be set at run time. To simplify your in-code instantiation you can implement an intermediary script to instantiate dompdf and set the options, referencing this intermediate script in your project. We may provide such a script in the final release to help with migration.
  2. The class naming conventions required a change to the dompdf_font_family_cache.php file. Though we have attempted to accommodate this change your first step when encountering bugs (if you don't know where to start) might be to reset your font directory (i.e. remove custom font files, font metrics files, and the font family cache file).
  3. During the beta period the utilities for pre-loading fonts are not available. We hope to make these utilities available for the final release (in a separate project). You may continue to use the @font-face CSS rule to install fonts at run time.
  4. The FontMetrics class is now instantiated instead of static. To simplify migration we provide access to it via the $fontMetrics variable. Please update your embedded scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->getFont('helvetica').
dompdf - DOMPDF 0.6.2

Published by bsweeney almost 9 years ago

This release is superseded by version 0.7.0

This is a security-focused release that addresses a number of vulnerabilities that can expose your system to exploitation. In tandem with this release we have also posted a document to the wiki with advice for securing dompdf. Please read the new document and take appropriate measures to protect your systems.

We urge all users to upgrade to this release if you are using dompdf 0.6.1 or earlier.

Change Summary for 0.6.2

This update addresses the following announced vulnerabilities:

Vulnerability Reference Type Severity
Remote Code Execution (complement of CVE-2014-2383) CVE-2014-5013 Remote Code Execution Low; Critical (depending on configuration)
Denial Of Service Vector CVE-2014-5012 Information Disclosure Medium
Information Disclosure CVE-2014-5011 Information Disclosure Medium
Arbitrary file read in dompdf using PHP stream filters CVE-2014-2383 Information Disclosure Medium

Change Summary for 0.6.1

  • Removed pre-processing of PHP code when DOMPDF_ENABLE_PHP is true (this does not affect embedded script).
  • Prior to this release dompdf was vulnerable to an information disclosure vulnerability. Thanks to Portcullis Computer Security Ltd. for reporting the issue. See the security advisory for additional details: Arbitrary file read in dompdf.

This update addresses the following announced vulnerabilities:

Vulnerability Reference Type Severity
Arbitrary file read in dompdf using PHP stream filters CVE-2014-2383 Information Disclosure Medium
PHP remote file inclusion vulnerability in dompdf.php CVE-2010-4879 Remote File Inclusion Low; Critical (depending on configuration)

Change Summary for 0.6.0

  • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
  • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
  • HTML: HTML5 Parser cleans your HTML syntax
  • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
  • Performance improvements
  • The project is now hosted on GitHub (the Google Code project is being temporarily maintained).

Download Instructions

Click the link labeled "dompdf-0.6.2.zip" to download the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

dompdf - dompdf 0.7.0 beta 2

Published by bsweeney about 9 years ago

Change highlights since 0.6.2

  • Add namespace support
  • Restructure code for implementation of the PSR coding standard
  • Drop support for the dompdf_config.inc.php configuration file; see the migration section below for more details
  • Remove non-library utility code (load_font.php, dompdf.php, the www content)
  • Add initial support for SVG

The majority of work in this release went towards support for namespaces, PSR, and SVG support but a few code improvements were also made. Highlights include:

  • Update DejaVu fonts to v2.34
  • Optimize performance by removing support for versions of PHP prior to 5.3
  • Improve PDF structure produced by CPDF
  • Add rendered document page selection support to the GD adapter
  • Take Unicode and float support out of "beta"
  • Add support for unit testing

Requirements

The dompdf 0.7.0 beta 2 requires the following:

  • PHP 5.3 or greater
  • MBString
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving stylesheets or images via http)
  • php-font-lib v0.4.x
  • php-svg-lib v0.1 (if rendering SVG)

For full requirements and recommendations see the requirements page on the wiki.

The dompdf team recommends that you use Composer for easier dependency management. If you're not yet using Composer you can download a packaged release of dompdf which includes all the files you need to use the library. The beta package is titled dompdf_0-7-0_beta2.zip.

Notes on migrating from an earlier version of dompdf

  1. Because the dompdf_config.inc.php file has been removed from this release (and is no longer referenced) all dompdf options will have to be set at run time. To simplify your in-code instantiation you can implement an intermediary script to instantiate dompdf and set the options, referencing this intermediate script in your project. We may provide such a script in the final release to help with migration.
  2. The class naming conventions required a change to the dompdf_font_family_cache.php file. Though we have attempted to accommodate this change your first step when encountering bugs (if you don't know where to start) might be to reset your font directory (i.e. remove custom font files, font metrics files, and the font family cache file).
  3. During the beta period the utilities for pre-loading fonts are not available. We hope to make these utilities available for the final release (in a separate project). You may continue to use the @font-face CSS rule to install fonts at run time.
  4. The FontMetrics class is now instantiated instead of static. To simplify migration we provide access to it via the $fontMetrics variable. Please update your inline scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->getFont('helvetica').
dompdf - dompdf 0.7.0 beta

Published by bsweeney over 9 years ago

Change highlights since 0.6.2

  • Added namespace support
  • Restructured code for the implementation of the PSR-2 coding standard
  • Dropped support for the configuration file (dompdf_config.inc.php); see the migration section below for more details
  • Removed non-library code (load_font.php, dompdf.php, the www content)

The majority of work in this release went towards support for namespaces and PSR-2, but a few code improvements were also made.

  • Updated DejaVu fonts to v2.34
  • Optimized performance by removing pre-5.3 code
  • Improved PDF structure produced by CPDF

Requirements

The dompdf 0.7.0 beta requires the following:

  • PHP 5.3 or greater
  • GD (for image processing)
  • allow_url_fopen set to true (for retrieving images via http)
  • php-font-lib v0.3.x

For full requirements and recommendations see the requirements page on the wiki.

The dompdf team recommends that you use Composer for easier dependency management. If you're not yet using Composer you can download an archived release of dompdf which includes all the files you need to use the library. The beta download is titled dompdf_0.7.0.beta.zip.

Notes on migrating from an earlier version of dompdf

  1. Because the dompdf_config.inc.php file has been removed from this release (and is no longer referenced) all dompdf options will have to be set at run time. To simplify your in-code instantiation you can implement an intermediary script to instantiate dompdf and set the options, referencing this intermediate script in your project. We may provide such a script in the final release to help with migration.
  2. The class naming conventions required a change to the dompdf_font_family_cache.php file. Though we have attempted to accommodate this change your first step when encountering bugs (if you don't know where to start) might be to reset your font directory (i.e. remove custom font files, font metrics files, and the font family cache file).
  3. During the beta period the utilities for pre-loading fonts are not available. We hope to make these utilities available for the final release (in a separate project). You may continue to use the @font-face CSS rule to install fonts at run time.
  4. The FontMetrics class is now instantiated instead of static. To simplify migration we provide access to it via the $fontMetrics variable. Please update your inline scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->get_font('helvetica').
dompdf - DOMPDF 0.6.1

Published by bsweeney over 10 years ago

This release is superseded by version 0.6.2

dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

Change highlights since 0.6.0

  • Removed pre-processing of PHP code when DOMPDF_ENABLE_PHP is true (this does not affect inline script).
  • Prior to this release dompdf was vulnerable to an information disclosure vulnerability. Thanks to Portcullis Computer Security Ltd. for reporting the issue. See the security advisory for additional details: Arbitrary file read in dompdf.

Change highlights since 0.5.2

  • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
  • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
  • HTML: HTML5 Parser cleans your HTML syntax
  • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
  • Performance improvements
  • The project is now hosted on GitHub (the Google Code project is being temporarily maintained).

Download Instructions

The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

dompdf - DOMPDF 0.6.0

Published by bsweeney over 10 years ago

This release is superseded by version 0.6.2

dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

Change highlights since 0.5.2

  • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
  • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
  • HTML: HTML5 Parser cleans your HTML syntax
  • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
  • Performance Improvements

Download Instructions

The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

dompdf - DOMPDF 0.5.2

Published by bsweeney about 11 years ago

This release is superseded by version 0.6.2

dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

More information on this release

dompdf - DOMPDF 0.6.0 beta 3

Published by bsweeney about 11 years ago

New Features

HTML/CSS/Images support

  • Limited support for CSS float (disabled by default). See DOMPDF_ENABLE_CSS_FLOAT (svn: r407, r408, r415, r438, r457, r459, r471)
  • Support for nth-child selectors (svn: r407, r419)
  • Support for @font-face (svn: r407, r413)
  • Font sub-setting now available (disabled by default). See DOMPDF_ENABLE_FONTSUBSETTING (svn: r466, r468, r469)
  • Added an HTML5 Parser to enable improved document parsing/correction (disabled by default). See DOMPDF_ENABLE_HTML5PARSER (svn: r429, r430, r431, r441)
  • Added support for ID in anchors tags (svn: r373)
  • Added a message for broken images and updated the broken_image.png file to something less aggressive (svn: r377)
  • Added support for transparent PNG in background-image and improved background-image handling (svn: r380, r404, r450, r453)
  • Improved absolute positioning (svn: r387, r409, r459, r460)
  • Added support for the "rem" CSS unit (svn: r389)
  • Improved support for the "ex" CSS unit (svn: r390)
  • When parsing tables, TR elements not contained by TBODY, TFOOT, or THEAD are automatically encapsulated by TBODY (svn: r390)
  • Added support for the CSS declaration word-wrap: break-word (svn: r391)
  • Added support for @page :left, :right, :first, :odd, and :even (svn: r393)
  • Added support for CSS visibility and empty-cells properties (svn: r393)
  • Type selectors (e.g. h1) are now case insensitive (svn: r417)
  • Image type detection is now based on file header instead of filename extension (svn: r422)
  • Added support for HTML5-style charset metatag (<meta charset=”utf-8”>) (svn: r430)
  • Added support for nested CSS counters (svn: r438)
  • Replaced TTF2UFM with php-font-lib and remove all dependencies on TTF2UFM (svn: r447)
  • Table columns widths are now consistent across pages (svn: r462)
  • Added limited support for table captions (svn: r456)
  • Reduced rendering time by using caches (svn: r469)

Installation / configuration / debugging

  • Added frame (i.e. discreet document element) count to the sample website debugger output (svn: r399)
  • DOMPDF_ENABLE_REMOTE is no longer needed for stylesheet references that use a URL with domain component (svn: r407)
  • Added a ready-to-use web-based font installer to the sample website (www/fonts.php) (svn: r417, r418)
  • Added the Unicode-compatible DejaVu Fonts as part of the base installation (svn: r388)

Major bug fixes

  • Fixes compatibility with the Symfony framework autoloader (disabled by default). See DOMPDF_AUTOLOAD_PREPEND (svn: r374)
  • Fixes errors in how margins were collapsed between siblings (svn: r375)
  • Improves the way lines are aligned vertically (see the css_baseline example) (svn: r375)
  • Corrects the bounding box used for drawing backgrounds (svn: r377)
  • Fixes the z-index rendering process (svn: r377, r378, r379, r393)
  • Adds support for color styling inheritance (svn: r390)
  • Fixes bugs with nested tables and HTML attributes (svn: r393)
  • Fixes handling of URLs with non-ascii chars in the CPDF adapter (svn: r394)
  • Fixes a rgb()-style color parsing bug (svn: r402)
  • Fixes RLE4 compressed bitmap image support (svn: r405)
  • Fixes bug that caused generated content to occasionally display multiple times (svn: r406)
  • Improves background image clipping (svn: r417)
  • Fixes table layout bug caused by zero-height rows (svn: r464)
  • Fixes layout bug caused by 100% width tables centered with margin auto (svn: r465)