diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4d3e198 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [2.0.0-beta1] + +### Added +- Upgraded to use dompdf/dompdf 2.x +- `setOption` to change only the specified option(s), instead of replace all options. +- Magic methods to allow calls to Dompdf methods easier. (#892) +- `default_paper_orientation` option has been added to the defaults. +- Add option to set public path (#890) + +### Changed +- HTML5 parser option is deprecated, because this is always on. +- `orientation` option was never used. Removed in favor of `options.default_paper_orientation` + +### Deprecated +- `setOptions` is now deprecated. Use `setOption` instead. diff --git a/config/dompdf.php b/config/dompdf.php index 1c43493..8ad2022 100644 --- a/config/dompdf.php +++ b/config/dompdf.php @@ -13,6 +13,8 @@ */ 'show_warnings' => false, // Throw an Exception on warnings from dompdf + 'public_path' => null, // Override the public path if needed + /* * Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show € and £. */ @@ -74,7 +76,7 @@ * should be an absolute path. * This is only checked on command line call by dompdf.php, but not by * direct class use like: - * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); + * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); */ "chroot" => realpath(base_path()), diff --git a/readme.md b/readme.md index f52f1a1..3a6dcf2 100644 --- a/readme.md +++ b/readme.md @@ -73,7 +73,7 @@ The defaults configuration settings are set in `config/dompdf.php`. Copy this fi You can still alter the dompdf options in your code before generating the pdf using this command: ```php - PDF::setOptions(['dpi' => 150, 'defaultFont' => 'sans-serif']); + PDF::setOption(['dpi' => 150, 'defaultFont' => 'sans-serif']); ``` Available options and their defaults: