Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #265 from Guite/release-1.3
Browse files Browse the repository at this point in the history
Update dompdf from 0.6.0 beta 2 to 0.6.0 beta 3
  • Loading branch information
Drak committed Feb 13, 2012
2 parents dda1acf + b5d069e commit 3f38627
Show file tree
Hide file tree
Showing 334 changed files with 98,893 additions and 53,337 deletions.
213 changes: 213 additions & 0 deletions src/plugins/DomPdf/lib/vendor/dompdf/changelog.txt
@@ -0,0 +1,213 @@

DOMPDF 0.6.0 beta 3 Release Notes


New Features


HTML/CSS/Images support

* Limited support for CSS float (disabled by default). See
DOMPDF_ENABLE_CSS_FLOAT
<http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#301>(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
DOMPDF_ENABLE_FONTSUBSETTING
<http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#134>
(r466, r468, r469)
* Added an HTML5 Parser to enable improved document parsing/correction
(disabled by default). See DOMPDF_ENABLE_HTML5PARSER
<http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#316>
(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 (<meta
charset=?utf-8?>) (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 DejaVu Fonts <http://dejavu-fonts.org>
as part of the base installation (r388)


Major bug fixes

* Fixes compatibility with the Symfony framework autoloader (disabled
by default). See DOMPDF_AUTOLOAD_PREPEND
<http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#310>
(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 repository changelog
<http://code.google.com/p/dompdf/source/list?num=88&start=472&path=/trunk>.


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 issue tracker
<http://code.google.com/p/dompdf/issues/list>.


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 DOMPDF_CHROOT
<http://code.google.com/p/dompdf/source/browse/tags/dompdf_0-6-0_beta3/dompdf/dompdf_config.inc.php#109>
* 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.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 external
project <http://code.google.com/p/ttf2ufm/>
* 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 (issue 198
<http://code.google.com/p/dompdf/issues/detail?id=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
repository changelog
<http://code.google.com/p/dompdf/source/list?path=/tags/dompdf_0-6-0_beta2&num=104>


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.



20 changes: 20 additions & 0 deletions src/plugins/DomPdf/lib/vendor/dompdf/docblox.dist.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<docblox>
<parser>
<target>docs</target>
</parser>
<transformer>
<target>docs</target>
</transformer>
<files>
<directory>.</directory>
<ignore>*/lib/fonts/*</ignore>
<ignore>*/lib/html5lib/*</ignore>
<ignore>*/lib/php-font-lib/*</ignore>
<ignore>*www/*</ignore>
<ignore>*.svn*</ignore>
</files>
<transformations>
<template name="new_black" />
</transformations>
</docblox>
122 changes: 40 additions & 82 deletions src/plugins/DomPdf/lib/vendor/dompdf/dompdf.php
@@ -1,94 +1,51 @@
<?php
/**
* DOMPDF - PHP5 HTML to PDF renderer
*
* File: $RCSfile: dompdf.php,v $
* Created on: 2004-06-22
*
* Copyright (c) 2004 - Benj Carson <benjcarson@digitaljunkies.ca>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library in the file LICENSE.LGPL; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*
* Alternatively, you may distribute this software under the terms of the
* PHP License, version 3.0 or later. A copy of this license should have
* been distributed with this file in the file LICENSE.PHP . If this is not
* the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
*
* The latest version of DOMPDF might be available at:
* http://www.dompdf.com/
*
* dompdf.php is a simple script to drive DOMPDF. It can be executed from
* a browser or from the command line.
*
* @link http://www.dompdf.com/
* @copyright 2004 Benj Carson
* @author Benj Carson <benjcarson@digitaljunkies.ca>
* Command line utility to use dompdf.
* Can also be used with HTTP GET parameters
*
* @package dompdf
* @link http://www.dompdf.com/
* @author Benj Carson <benjcarson@digitaljunkies.ca>
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @version $Id: dompdf.php 448 2011-11-13 13:00:03Z fabien.menager $
*/

/* $Id: dompdf.php 301 2010-08-23 21:00:51Z fabien.menager $ */

/**
* Display command line usage:
*
* Usage: ./dompdf.php [options] html_file
*
* html_file can be a filename, a url if fopen_wrappers are enabled, or the '-'
* character to read from standard input.
*
* Options:
* -h Show this message
* -l list available paper sizes
* -p size paper size; something like 'letter', 'A4', 'legal', etc. The default is
* 'letter'
* -o orientation either 'portrait' or 'landscape'. Default is 'portrait'.
* -b path set the 'document root' of the html_file. Relative urls (for
* stylesheets) are resolved using this directory. Default is the
* directory of html_file.
* -f file the output filename. Default is the input [html_file].pdf.
* -v verbose: display html parsing warnings and file not found errors.
* -d very verbose: display oodles of debugging output: every frame in the
* tree is printed to stdout.
* -t comma separated list of debugging types (page-break,reflow,split)
* -r write the render time to the log file
*
*
* Display command line usage
*/
function dompdf_usage() {
echo
"\nUsage: {$_SERVER["argv"][0]} [options] html_file\n\n".
"html_file can be a filename, a url if fopen_wrappers are enabled, or the '-' \n".
"character to read from standard input.\n\n".
"Options:\n".
" -h\t\tShow this message\n".
" -l\t\tlist available paper sizes\n".
" -p size\tpaper size; something like 'letter', 'A4', 'legal', etc. The default is\n".
" \t\t'" . DOMPDF_DEFAULT_PAPER_SIZE . "'\n".
" -o orientation\teither 'portrait' or 'landscape'. Default is 'portrait'.\n".
" -b path\tset the 'document root' of the html_file. Relative urls (for \n".
" \tstylesheets) are resolved using this directory. Default is the \n".
" \tdirectory of html_file.\n".
" -f file\tthe output filename. Default is the input [html_file].pdf.\n".
" -v \tverbose: display html parsing warnings and file not found errors.\n".
" -d \tvery verbose: display oodles of debugging output: every frame\n".
" \tin the tree printed to stdout.\n".
" -t comma separated list of debugging types (page-break,reflow,split)\n\n";
$default_paper_size = DOMPDF_DEFAULT_PAPER_SIZE;

echo <<<EOD
Usage: {$_SERVER["argv"][0]} [options] html_file
html_file can be a filename, a url if fopen_wrappers are enabled, or the '-' character to read from standard input.
Options:
-h Show this message
-l List available paper sizes
-p size Paper size; something like 'letter', 'A4', 'legal', etc.
The default is '$default_paper_size'
-o orientation Either 'portrait' or 'landscape'. Default is 'portrait'
-b path Set the 'document root' of the html_file.
Relative urls (for stylesheets) are resolved using this directory.
Default is the directory of html_file.
-f file The output filename. Default is the input [html_file].pdf
-v Verbose: display html parsing warnings and file not found errors.
-d Very verbose: display oodles of debugging output: every frame
in the tree printed to stdout.
-t Comma separated list of debugging types (page-break,reflow,split)
EOD;
exit;
}

/**
* Parses command line options
*
* @return array The command line options
*/
function getoptions() {

$opts = array();
Expand Down Expand Up @@ -262,10 +219,11 @@ function getoptions() {
}

$file_parts = explode_url($file);

/* Check to see if the input file is local and, if so, that the base path falls within that specified by DOMDPF_CHROOT */
if(($file_parts['protocol'] == '' || $file_parts['protocol'] === 'file://')) {
$file = realpath($file);
if (strpos($file, DOMPDF_CHROOT) !== 0) {
if ( strpos($file, DOMPDF_CHROOT) !== 0 ) {
throw new DOMPDF_Exception("Permission denied on $file.");
}
}
Expand Down

0 comments on commit 3f38627

Please sign in to comment.