github dompdf/dompdf v0.7.0-beta
dompdf 0.7.0 beta

latest releases: v2.0.8, v2.0.7, v2.0.6...
pre-release8 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').

Don't miss a new dompdf release

NewReleases is sending notifications on new releases.