Dompdf v0.7.0 Release Notes

Release Date: 2016-05-12 // almost 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').