debian/0000755000000000000000000000000012244133130007157 5ustar debian/examples0000644000000000000000000000000612244131663010725 0ustar www/* debian/README.source0000644000000000000000000000300012244131663011340 0ustar Debian packaging for php-dompdf ------------------------------- The upstream source code was repacked. All sourceless minified JavaScript, sourceless font, OPL v1.0 files and other non-free or copyrighted material have been removed. This package uses snapshots of the upstream Git repository as sources. It follows git-buildpackage advices as on: The tarball created from Git is recorded using pristine-tar. A quick summary of how one can update the Debian packaging of php-dompdf, assuming that one already has the appropriate build-dependencies, `devscripts`, `pristine-tar`, and `git-buildpackage` installed. $VERSION is assumed to be the new upstream version: gbp clone git+ssh://git.debian.org/git/pkg-php/php-dompdf.git cd php-dompdf git checkout dfsg_clean git remote add upstream https://github.com/dompdf/dompdf uscan --verbose --rename git fetch upstream git checkout master gbp import-orig --upstream-vcs-tag=v$VERSION ../php-dompdf_$VERSION.orig.tar.gz [ check and eventually remove non DFSG compliant material ] git tag -s upstream/$VERSION+dfsg -m"Upstream version $VERSION+dfsg" git checkout master git merge upstream/$VERSION+dfsg [ Make here some adaptations, like updating debian/patches and debian/dompdf_config.inc.php (debian/maint-patches can come handy for keeping that last one up-to-date), if needed ] gbp buildpackage debian/gbp.conf0000644000000000000000000000015512244131663010610 0ustar [gbp-buildpackage] pristine-tar-commit = True compression = xz [gbp-import-orig] debian-branch = dfsg_clean debian/maint-patches/0000755000000000000000000000000012244131663011725 5ustar debian/maint-patches/dompdf_config.inc.php.patch0000644000000000000000000000060612244131663017104 0ustar --- dompdf_config.inc.php 2013-10-16 18:18:17.000000000 -0400 +++ debian/dompdf_config.inc.php 2013-10-16 18:25:35.000000000 -0400 @@ -85,7 +85,7 @@ * * *Please note the trailing slash.* */ -def("DOMPDF_FONT_DIR", DOMPDF_DIR . "/lib/fonts/"); +def("DOMPDF_FONT_DIR", DOMPDF_DIR . "/../../../../var/cache/php-dompdf/fonts/"); /** * The location of the DOMPDF font cache directory debian/source/0000755000000000000000000000000012244131663010470 5ustar debian/source/format0000644000000000000000000000001412244131663011676 0ustar 3.0 (quilt) debian/install0000644000000000000000000000067412244131663010570 0ustar debian/dompdf_config.inc.php usr/share/php/dompdf dompdf.php usr/share/php/dompdf dompdf_config.custom.inc.php etc/php-dompdf dompdf_config.inc.php etc/php-dompdf include usr/share/php/dompdf lib/class.pdf.php usr/share/php/dompdf/lib lib/fonts/dompdf_font_family_cache.dist.php var/cache/php-dompdf/fonts lib/html5lib usr/share/php/dompdf/lib lib/res usr/share/php/dompdf/lib load_font.php usr/share/php/dompdf debian/watch0000644000000000000000000000024512244132320010211 0ustar version=3 options="dversionmangle=s/\+dfsg[0-9]*//,uversionmangle=s/-?a/~alpha/i;s/-?b/~beta/i" \ http://githubredir.debian.net/github/dompdf/dompdf/ \ v(.+).tar.gz debian/rules0000755000000000000000000000420212244131663010246 0ustar #!/usr/bin/make -f %: dh $@ override_dh_install: dh_install # Regenerate dompdf_font_family_cache.dist.php and .ufm files cd $(CURDIR)/debian/php-dompdf/usr/share/php/dompdf/ \ && ./load_font.php 'dejavu sans' \ /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSans-Oblique.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf \ && ./load_font.php 'dejavu sans light' \ /usr/share/fonts/truetype/dejavu/DejaVuSans-ExtraLight.ttf \ && ./load_font.php 'dejavu sans condensed' \ /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Oblique.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-BoldOblique.ttf \ && ./load_font.php 'dejavu sans mono' \ /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf \ && ./load_font.php 'dejavu serif' \ /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerif-Italic.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerif-BoldItalic.ttf \ && ./load_font.php 'dejavu serif condensed' \ /usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-Bold.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-Italic.ttf \ /usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-BoldItalic.ttf override_dh_installchangelogs: dh_installchangelogs $(CURDIR)/debian/upstream-changelog override_dh_fixperms: dh_fixperms chown www-data:www-data $(CURDIR)/debian/php-dompdf/var/cache/php-dompdf/fonts chmod 2775 $(CURDIR)/debian/php-dompdf/var/cache/php-dompdf/fonts get-upstream-changelog: svn export --force \ http://dompdf.googlecode.com/svn/wiki/ReleaseNotes.wiki \ debian/upstream-changelog debian/postrm0000644000000000000000000000047712244131663010447 0ustar #!/bin/sh set -e #DEBHELPER# case "$1" in purge) # Remove generated fonts material rm -rf /var/cache/php-dompdf/fonts ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac exit 0 debian/compat0000644000000000000000000000000212244131663010366 0ustar 9 debian/patches/0000755000000000000000000000000012244131663010617 5ustar debian/patches/0005-Adapt-tcpdf-path.patch0000644000000000000000000000123712244131663015306 0ustar From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Wed, 16 Oct 2013 11:03:18 -0400 Subject: Adapt tcpdf path The Debian package depends on the needed classes instead of embedding them, i.e php-tcpdf. Forwarded: not-needed --- include/tcpdf_adapter.cls.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tcpdf_adapter.cls.php b/include/tcpdf_adapter.cls.php index 69f3a8b..69e3b58 100644 --- a/include/tcpdf_adapter.cls.php +++ b/include/tcpdf_adapter.cls.php @@ -7,7 +7,7 @@ * @version $Id$ */ -require_once(DOMPDF_LIB_DIR . '/tcpdf/tcpdf.php'); +require_once('tcpdf/tcpdf.php'); /** * TCPDF PDF Rendering interface debian/patches/series0000644000000000000000000000022012244131663012026 0ustar 0001-Adapt-main-path.patch 0002-Define-shebang.patch 0003-Adapt-fonts-path.patch 0004-Adapt-php-font-lib-path.patch 0005-Adapt-tcpdf-path.patch debian/patches/0004-Adapt-php-font-lib-path.patch0000644000000000000000000000313712244131663016505 0ustar From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Tue, 15 Oct 2013 21:22:43 -0400 Subject: Adapt php-font-lib path The Debian package depends on the needed classes instead of embedding them, i.e. php-font-lib. Forwarded: not-needed --- include/font_metrics.cls.php | 2 +- lib/class.pdf.php | 2 +- load_font.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/font_metrics.cls.php b/include/font_metrics.cls.php index 1b538f7..48624f8 100644 --- a/include/font_metrics.cls.php +++ b/include/font_metrics.cls.php @@ -10,7 +10,7 @@ */ require_once DOMPDF_LIB_DIR . "/class.pdf.php"; -require_once DOMPDF_LIB_DIR . "/php-font-lib/classes/font.cls.php"; +require_once "php-font-lib/classes/font.cls.php"; /** * Name of the font cache file diff --git a/lib/class.pdf.php b/lib/class.pdf.php index 16b77c8..77c4816 100644 --- a/lib/class.pdf.php +++ b/lib/class.pdf.php @@ -2340,7 +2340,7 @@ EOT; $data = file_get_contents($fbfile); } else { - require_once dirname(__FILE__)."/php-font-lib/classes/font.cls.php"; + require_once "php-font-lib/classes/font.cls.php"; $this->stringSubsets[$fontName][] = 32; // Force space if not in yet diff --git a/load_font.php b/load_font.php index 824c586..0c5896d 100755 --- a/load_font.php +++ b/load_font.php @@ -10,7 +10,7 @@ */ require_once "dompdf_config.inc.php"; -require_once "lib/php-font-lib/classes/font.cls.php"; +require_once "php-font-lib/classes/font.cls.php"; /** * Display command line usage debian/patches/0002-Define-shebang.patch0000644000000000000000000000061612244131663015021 0ustar From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Wed, 16 Oct 2013 12:42:12 -0400 Subject: Define shebang Actually make the script executable. --- dompdf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dompdf.php b/dompdf.php index a69f0a6..3d2b266 100755 --- a/dompdf.php +++ b/dompdf.php @@ -1,3 +1,4 @@ +#!/usr/bin/php Date: Wed, 16 Oct 2013 15:47:22 -0400 Subject: Adapt main path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t try to guess the actual path from the configuration file moved in /etc for the Debian package. --- dompdf_config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dompdf_config.inc.php b/dompdf_config.inc.php index 3978f01..ab08f15 100644 --- a/dompdf_config.inc.php +++ b/dompdf_config.inc.php @@ -17,7 +17,7 @@ PHP_VERSION >= 5.0 or die("DOMPDF requires PHP 5.0+"); /** * The root of your DOMPDF installation */ -define("DOMPDF_DIR", str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__)))); +define("DOMPDF_DIR", "/usr/share/php/dompdf"); /** * The location of the DOMPDF include directory debian/patches/0003-Adapt-fonts-path.patch0000644000000000000000000000245512244131663015340 0ustar From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Wed, 16 Oct 2013 14:32:08 -0400 Subject: Adapt fonts path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This directory must be writable, so it’s moved to /var/cache/. --- dompdf_config.inc.php | 2 +- lib/class.pdf.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dompdf_config.inc.php b/dompdf_config.inc.php index ab08f15..13dc276 100644 --- a/dompdf_config.inc.php +++ b/dompdf_config.inc.php @@ -85,7 +85,7 @@ def("DOMPDF_ADMIN_PASSWORD", "password"); * * *Please note the trailing slash.* */ -def("DOMPDF_FONT_DIR", DOMPDF_DIR . "/lib/fonts/"); +def("DOMPDF_FONT_DIR", "/var/cache/php-dompdf/fonts/"); /** * The location of the DOMPDF font cache directory diff --git a/lib/class.pdf.php b/lib/class.pdf.php index 39345eb..16b77c8 100644 --- a/lib/class.pdf.php +++ b/lib/class.pdf.php @@ -43,7 +43,7 @@ class Cpdf { * @var string The default font metrics file to use if no other font has been loaded. * The path to the directory containing the font metrics should be included */ - public $defaultFont = './fonts/Helvetica.afm'; + public $defaultFont = '/var/cache/php-dompdf/fonts/Helvetica.afm'; /** * @string A record of the current font debian/dompdf_config.inc.php0000644000000000000000000003055312244131663013255 0ustar * @author Helmut Tischer * @author Fabien Mnager * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @version $Id$ */ //error_reporting(E_STRICT | E_ALL | E_DEPRECATED); //ini_set("display_errors", 1); PHP_VERSION >= 5.0 or die("DOMPDF requires PHP 5.0+"); /** * The root of your DOMPDF installation */ define("DOMPDF_DIR", str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__)))); /** * The location of the DOMPDF include directory */ define("DOMPDF_INC_DIR", DOMPDF_DIR . "/include"); /** * The location of the DOMPDF lib directory */ define("DOMPDF_LIB_DIR", DOMPDF_DIR . "/lib"); /** * Some installations don't have $_SERVER['DOCUMENT_ROOT'] * http://fyneworks.blogspot.com/2007/08/php-documentroot-in-iis-windows-servers.html */ if( !isset($_SERVER['DOCUMENT_ROOT']) ) { $path = ""; if ( isset($_SERVER['SCRIPT_FILENAME']) ) $path = $_SERVER['SCRIPT_FILENAME']; elseif ( isset($_SERVER['PATH_TRANSLATED']) ) $path = str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']); $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($path, 0, 0-strlen($_SERVER['PHP_SELF']))); } /** Include the custom config file if it exists */ if ( file_exists(DOMPDF_DIR . "/dompdf_config.custom.inc.php") ){ require_once(DOMPDF_DIR . "/dompdf_config.custom.inc.php"); } //FIXME: Some function definitions rely on the constants defined by DOMPDF. However, might this location prove problematic? require_once(DOMPDF_INC_DIR . "/functions.inc.php"); /** * Username and password used by the configuration utility in www/ */ def("DOMPDF_ADMIN_USERNAME", "user"); def("DOMPDF_ADMIN_PASSWORD", "password"); /** * The location of the DOMPDF font directory * * If DOMPDF_FONT_DIR identical to DOMPDF_FONT_CACHE or user executing DOMPDF from the CLI, * this directory must be writable by the webserver process (). * *Please note the trailing slash.* * * Notes regarding fonts: * Additional .afm font metrics can be added by executing load_font.php from command line. * * Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must * be embedded in the pdf file or the PDF may not display correctly. This can significantly * increase file size and could violate copyright provisions of a font. Font subsetting is * not currently supported. * * Any font specification in the source HTML is translated to the closest font available * in the font directory. * * The pdf standard "Base 14 fonts" are: * Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, * Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic, * Symbol, * ZapfDingbats, * * *Please note the trailing slash.* */ def("DOMPDF_FONT_DIR", DOMPDF_DIR . "/../../../../var/cache/php-dompdf/fonts/"); /** * The location of the DOMPDF font cache directory * * Note this directory must be writable by the webserver process * This folder must already exist! * It contains the .afm files, on demand parsed, converted to php syntax and cached * This folder can be the same as DOMPDF_FONT_DIR */ def("DOMPDF_FONT_CACHE", DOMPDF_FONT_DIR); /** * The location of a temporary directory. * * The directory specified must be writeable by the webserver process. * The temporary directory is required to download remote images and when * using the PFDLib back end. */ def("DOMPDF_TEMP_DIR", sys_get_temp_dir()); /** * ==== IMPORTANT ==== * * dompdf's "chroot": Prevents dompdf from accessing system files or other * files on the webserver. All local files opened by dompdf must be in a * subdirectory of this directory. DO NOT set it to '/' since this could * allow an attacker to use dompdf to read any files on the server. This * 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(); */ def("DOMPDF_CHROOT", realpath(DOMPDF_DIR)); /** * Whether to use Unicode fonts or not. * * When set to true the PDF backend must be set to "CPDF" and fonts must be * loaded via load_font.php. * * When enabled, dompdf can support all Unicode glyphs. Any glyphs used in a * document must be present in your fonts, however. */ def("DOMPDF_UNICODE_ENABLED", true); /** * Whether to make font subsetting or not. */ def("DOMPDF_ENABLE_FONTSUBSETTING", false); /** * The PDF rendering backend to use * * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and * 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link * Canvas_Factory} ultimately determines which rendering class to instantiate * based on this setting. * * Both PDFLib & CPDF rendering backends provide sufficient rendering * capabilities for dompdf, however additional features (e.g. object, * image and font support, etc.) differ between backends. Please see * {@link PDFLib_Adapter} for more information on the PDFLib backend * and {@link CPDF_Adapter} and lib/class.pdf.php for more information * on CPDF. Also see the documentation for each backend at the links * below. * * The GD rendering backend is a little different than PDFLib and * CPDF. Several features of CPDF and PDFLib are not supported or do * not make any sense when creating image files. For example, * multiple pages are not supported, nor are PDF 'objects'. Have a * look at {@link GD_Adapter} for more information. GD support is new * and experimental, so use it at your own risk. * * @link http://www.pdflib.com * @link http://www.ros.co.nz/pdf * @link http://www.php.net/image */ def("DOMPDF_PDF_BACKEND", "CPDF"); /** * PDFlib license key * * If you are using a licensed, commercial version of PDFlib, specify * your license key here. If you are using PDFlib-Lite or are evaluating * the commercial version of PDFlib, comment out this setting. * * @link http://www.pdflib.com * * If pdflib present in web server and auto or selected explicitely above, * a real license code must exist! */ //def("DOMPDF_PDFLIB_LICENSE", "your license key here"); /** * html target media view which should be rendered into pdf. * List of types and parsing rules for future extensions: * http://www.w3.org/TR/REC-html40/types.html * screen, tty, tv, projection, handheld, print, braille, aural, all * Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3. * Note, even though the generated pdf file is intended for print output, * the desired content might be different (e.g. screen or projection view of html file). * Therefore allow specification of content here. */ def("DOMPDF_DEFAULT_MEDIA_TYPE", "screen"); /** * The default paper size. * * North America standard is "letter"; other countries generally "a4" * * @see CPDF_Adapter::PAPER_SIZES for valid sizes */ def("DOMPDF_DEFAULT_PAPER_SIZE", "letter"); /** * The default font family * * Used if no suitable fonts can be found. This must exist in the font folder. * @var string */ def("DOMPDF_DEFAULT_FONT", "serif"); /** * Image DPI setting * * This setting determines the default DPI setting for images and fonts. The * DPI may be overridden for inline images by explictly setting the * image's width & height style attributes (i.e. if the image's native * width is 600 pixels and you specify the image's width as 72 points, * the image will have a DPI of 600 in the rendered PDF. The DPI of * background images can not be overridden and is controlled entirely * via this parameter. * * For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI). * If a size in html is given as px (or without unit as image size), * this tells the corresponding size in pt. * This adjusts the relative sizes to be similar to the rendering of the * html page in a reference browser. * * In pdf, always 1 pt = 1/72 inch * * Rendering resolution of various browsers in px per inch: * Windows Firefox and Internet Explorer: * SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:? * Linux Firefox: * about:config *resolution: Default:96 * (xorg screen dimension in mm and Desktop font dpi settings are ignored) * * Take care about extra font/image zoom factor of browser. * * In images, size in pixel attribute, img css style, are overriding * the real image dimension in px for rendering. * * @var int */ def("DOMPDF_DPI", 96); /** * Enable inline PHP * * If this setting is set to true then DOMPDF will automatically evaluate * inline PHP contained within tags. * * Enabling this for documents you do not trust (e.g. arbitrary remote html * pages) is a security risk. Set this option to false if you wish to process * untrusted documents. * * @var bool */ def("DOMPDF_ENABLE_PHP", false); /** * Enable inline Javascript * * If this setting is set to true then DOMPDF will automatically insert * JavaScript code contained within tags. * * @var bool */ def("DOMPDF_ENABLE_JAVASCRIPT", true); /** * Enable remote file access * * If this setting is set to true, DOMPDF will access remote sites for * images and CSS files as required. * This is required for part of test case www/test/image_variants.html through www/examples.php * * Attention! * This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and * allowing remote access to dompdf.php or on allowing remote html code to be passed to * $dompdf = new DOMPDF(); $dompdf->load_html(...); * This allows anonymous users to download legally doubtful internet content which on * tracing back appears to being downloaded by your server, or allows malicious php code * in remote html pages to be executed by your server with your account privileges. * * @var bool */ def("DOMPDF_ENABLE_REMOTE", false); /** * The debug output log * @var string */ def("DOMPDF_LOG_OUTPUT_FILE", DOMPDF_FONT_DIR."log.htm"); /** * A ratio applied to the fonts height to be more like browsers' line height */ def("DOMPDF_FONT_HEIGHT_RATIO", 1.1); /** * Enable CSS float * * Allows people to disabled CSS float support * @var bool */ def("DOMPDF_ENABLE_CSS_FLOAT", false); /** * Prepend the DOMPDF autoload function the spl_autoload stack * * @var bool */ def("DOMPDF_AUTOLOAD_PREPEND", false); /** * Use the more-than-experimental HTML5 Lib parser */ def("DOMPDF_ENABLE_HTML5PARSER", false); require_once(DOMPDF_LIB_DIR . "/html5lib/Parser.php"); // ### End of user-configurable options ### require_once(DOMPDF_INC_DIR . "/autoload.inc.php"); /** * Ensure that PHP is working with text internally using UTF8 character encoding. */ mb_internal_encoding('UTF-8'); /** * Global array of warnings generated by DomDocument parser and * stylesheet class * * @var array */ global $_dompdf_warnings; $_dompdf_warnings = array(); /** * If true, $_dompdf_warnings is dumped on script termination when using * dompdf/dompdf.php or after rendering when using the DOMPDF class. * When using the class, setting this value to true will prevent you from * streaming the PDF. * * @var bool */ global $_dompdf_show_warnings; $_dompdf_show_warnings = false; /** * If true, the entire tree is dumped to stdout in dompdf.cls.php. * Setting this value to true will prevent you from streaming the PDF. * * @var bool */ global $_dompdf_debug; $_dompdf_debug = false; /** * Array of enabled debug message types * * @var array */ global $_DOMPDF_DEBUG_TYPES; $_DOMPDF_DEBUG_TYPES = array(); //array("page-break" => 1); /* Optionally enable different classes of debug output before the pdf content. * Visible if displaying pdf as text, * E.g. on repeated display of same pdf in browser when pdf is not taken out of * the browser cache and the premature output prevents setting of the mime type. */ def('DEBUGPNG', false); def('DEBUGKEEPTEMP', false); def('DEBUGCSS', false); /* Layout debugging. Will display rectangles around different block levels. * Visible in the PDF itself. */ def('DEBUG_LAYOUT', false); def('DEBUG_LAYOUT_LINES', true); def('DEBUG_LAYOUT_BLOCKS', true); def('DEBUG_LAYOUT_INLINE', true); def('DEBUG_LAYOUT_PADDINGBOX', true); debian/lintian-overrides0000644000000000000000000000015612244131663012553 0ustar # User www-data has to write here. php-dompdf: non-standard-dir-perm var/cache/php-dompdf/fonts/ 2775 != 0755 debian/changelog0000644000000000000000000000024612244132371011041 0ustar php-dompdf (0.6.0~beta3+dfsg0-1) unstable; urgency=low * Initial release (Closes: #567928) -- David Prévot Sat, 23 Nov 2013 10:00:18 -0400 debian/upstream-changelog0000644000000000000000000002144712244131663012710 0ustar #summary The DOMPDF project release notes #labels Featured = DOMPDF 0.6.0 beta 3 = == New Features == === HTML/CSS/Images support === * Limited support for CSS float (disabled by default). See [http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#301 DOMPDF_ENABLE_CSS_FLOAT] (r407, r408, r415, r438, r457, r459, r471) * Support for nth-child selectors (r407, r419) * Support for @font-face (r407, r413) * Font sub-setting now available (disabled by default). See [http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#134 DOMPDF_ENABLE_FONTSUBSETTING] (r466, r468, r469) * Added an HTML5 Parser to enable improved document parsing/correction (disabled by default). See [http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#316 DOMPDF_ENABLE_HTML5PARSER] (r429, r430, r431, r441) * Added support for ID in anchors tags (r373) * Added a message for broken images and updated the broken_image.png file to something less aggressive (r377) * Added support for transparent PNG in background-image and improved background-image handling (r380, r404, r450, r453) * Improved absolute positioning (r387, r409, r459, r460) * Added support for the "rem" CSS unit (r389) * Improved support for the "ex" CSS unit (r390) * When parsing tables, TR elements not contained by TBODY, TFOOT, or THEAD are automatically encapsulated by TBODY (r390) * Added support for the CSS declaration word-wrap: break-word (r391) * Added support for @page :left, :right, :first, :odd, and :even (r393) * Added support for CSS visibility and empty-cells properties (r393) * Type selectors (e.g. h1) are now case insensitive (r417) * Image type detection is now based on file header instead of filename extension (r422) * Added support for HTML5-style charset metatag (``) (r430) * Added support for nested CSS counters (r438) * Replaced TTF2UFM with php-font-lib and remove all dependencies on TTF2UFM (r447) * Table columns widths are now consistent across pages (r462) * Added limited support for table captions (r456) * Reduced rendering time by using caches (r469) === Installation / configuration / debugging === * Added frame (i.e. discreet document element) count to the sample website debugger output (r399) * DOMPDF_ENABLE_REMOTE is no longer needed for stylesheet references that use a URL with domain component (r407) * Added a ready-to-use web-based font installer to the sample website (www/fonts.php) (r417, r418) * Added the Unicode-compatible [http://dejavu-fonts.org DejaVu Fonts] as part of the base installation (r388) === Major bug fixes === * Fixes compatibility with the Symfony framework autoloader (disabled by default). See [http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#310 DOMPDF_AUTOLOAD_PREPEND] (r374) * Fixes errors in how margins were collapsed between siblings (r375) * Improves the way lines are aligned vertically (see the css_baseline example) (r375) * Corrects the bounding box used for drawing backgrounds (r377) * Fixes the z-index rendering process (r377, r378, r379, r393) * Adds support for color styling inheritance (r390) * Fixes bugs with nested tables and HTML attributes (r393) * Fixes handling of URLs with non-ascii chars in the CPDF adapter (r394) * Fixes a rgb()-style color parsing bug (r402) * Fixes RLE4 compressed bitmap image support (r405) * Fixes bug that caused generated content to occasionally display multiple times (r406) * Improves background image clipping (r417) * Fixes table layout bug caused by zero-height rows (r464) * Fixes layout bug caused by 100% width tables centered with margin auto (r465) For a full list of modifications since DOMPDF 0.6.0 beta 2 see the changes listed on this page of the [http://code.google.com/p/dompdf/source/list?num=88&start=472&path=/trunk repository changelog]. === Known Issues === * Table cells cannot be split over multiple pages * CSS float support is not yet perfected For a full list of known issues, see the [http://code.google.com/p/dompdf/issues/list issue tracker]. === Installation Notes === * Starting with DOMPDF 0.6.0 the dompdf.php script will no longer allow conversion of HTML document on the local file system that are located outside of the path specified by [http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#109 DOMPDF_CHROOT] * If you are installing DOMPDF on top of an existing installation you should remove any existing font metrics. This can be done manually or through the sample website (www/fonts.php). * When upgrading to a new version of DOMPDF you must replace dompdf_config.inc.php with the new one. To simplify the upgrade process you can store your configuration settings in dompdf_config.custom.inc.php (which does not need to be overwritten). === DOMPDF 0.6 Roadmap === * Improve Unicode support * Improve page breaks inside or outside tables * Improve support for CSS float * Reduce memory usage ---- = DOMPDF 0.6.0 beta 2 = == New Features == === HTML/CSS/Images support === * CSS3: opacity, 2D transforms * CSS2: outline, letter-spacing, z-index, position: relative, overflow: hidden * CSS Pseudo elements :before and :after with generated content * CSS2 pseudo-selectors (last-child, disabled, checked, enabled) * CSS3 attribute selectors (ends-width, starts-width, contains) * Improves absolute positioning * Adds fixed positioning * CMYK colors and CMYK Jpeg images * 32bit PNG with alpha channel (Cpdf backend) * BMP images (8, 24 and 32 bit) * Adds support for image embedding via “data” URI * Adds support for ordered list * Adds support for embedding PDF !JavaScript * Uses the HTML document title element and certain meta tags to populate the PDF’s meta information (title, author, keywords and subject) * Uses the “alt” attribute of an image when the image is inaccessible * Supports loading system fonts === Installation / configuration === * The demo page now shows the HTML file and the PDF document in an iframe * Adds a setup/configuration tool that provides information about the server configuration, dompdf parameters, and installed fonts. * The font metrics cache files can now be cleared using the setup/config tool * Adds a debug tool that shows side-by-side the HTML file, the rendered PDF, and a console showing memory consumption, rendering time, warning, and debug messages * Adds examples showing new features * Moves ttf2ufm out of the DOMPDF code repository and into an [http://code.google.com/p/ttf2ufm/ external project] * Disables inline PHP support by default * Disables direct input in the examples page for non-localhost access * Adds configuration option to help debugging (see DEBUG_LAYOUT) which draws rectangles around the different types of blocks and frames == Major bug fixes == * Addresses memory leaks from running eval() on the font metrics cache * Reduces memory consumption caused by the font metrics (when using the Cpdf backend) * Updates text wrapping to prevent splitting text into more lines than needed ([http://code.google.com/p/dompdf/issues/detail?id=198 issue 198]) * Implements a check against an infinite loop caused by table cells larger than a page * Improves text height and width calculations as well as placement (improves, for example, justified text rendering for text that is not iso-8859-1) * Updates the fallback MBString functions * Supports PHP 5.3 and includes improved compatibility with older versions of PHP 5 * Improves image placement * Addresses problems with table flow caused by empty table cells * Addresses warning/errors caused by unrecognized CSS rules or selectors For a full list of modifications since DOMPDF 0.6.0 beta 1 see the [http://code.google.com/p/dompdf/source/list?path=/tags/dompdf_0-6-0_beta2&num=104 repository changelog] == Known Issues == * Table cells cannot be split over multiple pages * Column widths of tables that span more than one page may not be consistent across pages == Installation Notes == * Starting with dompdf 0.6.0 dompdf.php will no longer allow conversion of HTML document on the local file system that are located outside of the path specified by DOMPDF_CHROOT * The format of the font metrics cache has changed as of this release. You should manually remove any existing font metrics prior to upgrading or use the setup/configuration tool to do so immediately after. * Inline PHP is *disabled* by default now (see DOMPDF_ENABLE_PHP) * Because additional configuration options have been added you will need to replace your dompdf_config.inc.php file with the new one. You may modify this file or copy your configuration settings to dompdf_config.custom.inc.php.debian/control0000644000000000000000000000217212244131663010575 0ustar Source: php-dompdf Section: php Priority: optional Maintainer: Debian PHP PEAR Maintainers Uploaders: David Prévot Build-Depends: debhelper (>= 9), fonts-dejavu, php-font-lib, php5-cli Standards-Version: 3.9.4 Homepage: http://dompdf.github.io/ Vcs-Git: git://anonscm.debian.org/pkg-php/php-dompdf.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-php/php-dompdf.git Package: php-dompdf Architecture: all Depends: fonts-dejavu, php-font-lib, php5 | php5-cli, sdop, ${misc:Depends} Suggests: php-tcpdf, php5-cli, php5-gd Description: HTML to PDF converter dompdf is a style-driven renderer that: * handles most CSS 2.1 and a few CSS3 properties, including @import, @media & @page rules * supports most presentational HTML 4.0 attributes * supports external stylesheets, either local or through HTTP/FTP (via fopen-wrappers) * supports complex tables, including row and column spans, separate and collapsed border models, individual cell styling * supports images: GIF, PNG (8-, 24- and 32-bit with alpha channel), BMP, and JPEG * supports inline PHP debian/copyright0000644000000000000000000001201512244132313011113 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: dompdf Upstream-Contact: Benj Carson Source: https://github.com/dompdf/dompdf Files: * Copyright: Benj Carson Fabien Ménager Helmut Tischer Orion Richardson Blake Ross Brian Sweeney 1998, mozilla.org License: LGPL-2.1+ Files: lib/class.pdf.php www/test/images/* Copyright: Wayne Munro Orion Richardson Helmut Tischer Ryan H. Masten Brian Sweeney Fabien Ménager License: CC-publicdomain Files: lib/fonts/*.afm Copyright: 1985, 1987, 1989-1993, 1997, Adobe Systems Incorporated. License: Adobe Comment: Stripped away from the package on FTP-master’s request Files: lib/html5lib/* www/cssSandpaper/js/EventHelpers.js Copyright: 2007, Jeroen van der Meer 2008, 2009, Edward Z. Yang 2009, Geoffrey Sneddon 2010, Zoltan Hawryluk License: Expat Files: www/test/images/dokuwiki-128.png Copyright: 2004-2012 Andreas Gohr and the DokuWiki Community License: GPL-2 License: Adobe This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. License: CC-publicdomain The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below. . A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain. . Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work. . Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: GPL-2 On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: LGPL-2.1+ On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file `/usr/share/common-licenses/LGPL-2.1'. debian/links0000644000000000000000000000737312244131663010245 0ustar etc/php-dompdf/dompdf_config.custom.inc.php usr/share/php/dompdf/dompdf_config.custom.inc.php etc/php-dompdf/dompdf_config.inc.php usr/share/php/dompdf/dompdf_config.inc.php usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf var/cache/php-dompdf/fonts/DejaVuSans-BoldOblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf var/cache/php-dompdf/fonts/DejaVuSans-Bold.ttf usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-BoldOblique.ttf var/cache/php-dompdf/fonts/DejaVuSansCondensed-BoldOblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf var/cache/php-dompdf/fonts/DejaVuSansCondensed-Bold.ttf usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Oblique.ttf var/cache/php-dompdf/fonts/DejaVuSansCondensed-Oblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf var/cache/php-dompdf/fonts/DejaVuSansCondensed.ttf usr/share/fonts/truetype/dejavu/DejaVuSans-ExtraLight.ttf var/cache/php-dompdf/fonts/DejaVuSans-ExtraLight.ttf usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf var/cache/php-dompdf/fonts/DejaVuSansMono-BoldOblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf var/cache/php-dompdf/fonts/DejaVuSansMono-Bold.ttf usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf var/cache/php-dompdf/fonts/DejaVuSansMono-Oblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf var/cache/php-dompdf/fonts/DejaVuSansMono.ttf usr/share/fonts/truetype/dejavu/DejaVuSans-Oblique.ttf var/cache/php-dompdf/fonts/DejaVuSans-Oblique.ttf usr/share/fonts/truetype/dejavu/DejaVuSans.ttf var/cache/php-dompdf/fonts/DejaVuSans.ttf usr/share/fonts/truetype/dejavu/DejaVuSerif-BoldItalic.ttf var/cache/php-dompdf/fonts/DejaVuSerif-BoldItalic.ttf usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf var/cache/php-dompdf/fonts/DejaVuSerif-Bold.ttf usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-BoldItalic.ttf var/cache/php-dompdf/fonts/DejaVuSerifCondensed-BoldItalic.ttf usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-Bold.ttf var/cache/php-dompdf/fonts/DejaVuSerifCondensed-Bold.ttf usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed-Italic.ttf var/cache/php-dompdf/fonts/DejaVuSerifCondensed-Italic.ttf usr/share/fonts/truetype/dejavu/DejaVuSerifCondensed.ttf var/cache/php-dompdf/fonts/DejaVuSerifCondensed.ttf usr/share/fonts/truetype/dejavu/DejaVuSerif-Italic.ttf var/cache/php-dompdf/fonts/DejaVuSerif-Italic.ttf usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf var/cache/php-dompdf/fonts/DejaVuSerif.ttf usr/share/sdop/fontmetrics/Courier.afm var/cache/php-dompdf/fonts/Courier.afm usr/share/sdop/fontmetrics/Courier-Bold.afm var/cache/php-dompdf/fonts/Courier-Bold.afm usr/share/sdop/fontmetrics/Courier-BoldOblique.afm var/cache/php-dompdf/fonts/Courier-BoldOblique.afm usr/share/sdop/fontmetrics/Courier-Oblique.afm var/cache/php-dompdf/fonts/Courier-Oblique.afm usr/share/sdop/fontmetrics/Helvetica.afm var/cache/php-dompdf/fonts/Helvetica.afm usr/share/sdop/fontmetrics/Helvetica-Bold.afm var/cache/php-dompdf/fonts/Helvetica-Bold.afm usr/share/sdop/fontmetrics/Helvetica-BoldOblique.afm var/cache/php-dompdf/fonts/Helvetica-BoldOblique.afm usr/share/sdop/fontmetrics/Helvetica-Oblique.afm var/cache/php-dompdf/fonts/Helvetica-Oblique.afm usr/share/sdop/fontmetrics/Symbol.afm var/cache/php-dompdf/fonts/Symbol.afm usr/share/sdop/fontmetrics/Times-Bold.afm var/cache/php-dompdf/fonts/Times-Bold.afm usr/share/sdop/fontmetrics/Times-BoldItalic.afm var/cache/php-dompdf/fonts/Times-BoldItalic.afm usr/share/sdop/fontmetrics/Times-Italic.afm var/cache/php-dompdf/fonts/Times-Italic.afm usr/share/sdop/fontmetrics/Times-Roman.afm var/cache/php-dompdf/fonts/Times-Roman.afm usr/share/sdop/fontmetrics/ZapfDingbats.afm var/cache/php-dompdf/fonts/ZapfDingbats.afm