HTML to PDF converter for PHP

Overview

Dompdf

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Dompdf is an HTML to PDF converter

At its heart, dompdf is (mostly) a CSS 2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

This document applies to the latest stable code which may not reflect the current release. For released code please navigate to the appropriate tag.


Check out the demo and ask any question on StackOverflow or on the Google Groups.

Follow us on Twitter.


Features

  • 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 & column spans, separate & collapsed border models, individual cell styling
  • Image support (gif, png (8, 24 and 32 bit with alpha channel), bmp & jpeg)
  • No dependencies on external PDF libraries, thanks to the R&OS PDF class
  • Inline PHP support
  • Basic SVG support (see "Limitations" below)

Requirements

  • PHP version 7.1 or higher
  • DOM extension
  • MBString extension
  • php-font-lib
  • php-svg-lib

Note that some required dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

Recommendations

  • OPcache (OPcache, XCache, APC, etc.): improves performance
  • GD (for image processing)
  • IMagick or GMagick extension: improves image processing performance

Visit the wiki for more information: https://github.com/dompdf/dompdf/wiki/Requirements

About Fonts & Character Encoding

PDF documents internally support the following fonts: Helvetica, Times-Roman, Courier, Zapf-Dingbats, & Symbol. These fonts only support Windows ANSI encoding. In order for a PDF to display characters that are not available in Windows ANSI, you must supply an external font. Dompdf will embed any referenced font in the PDF so long as it has been pre-loaded or is accessible to dompdf and reference in CSS @font-face rules. See the font overview for more information on how to use fonts.

The DejaVu TrueType fonts have been pre-installed to give dompdf decent Unicode character coverage by default. To use the DejaVu fonts reference the font in your stylesheet, e.g. body { font-family: DejaVu Sans; } (for DejaVu Sans). The following DejaVu 2.34 fonts are available: DejaVu Sans, DejaVu Serif, and DejaVu Sans Mono.

Easy Installation

Install with composer

To install with Composer, simply require the latest version of this package.

composer require dompdf/dompdf

Make sure that the autoload file from Composer is loaded.

// somewhere early in your project's loading, require the Composer autoloader
// see: http://getcomposer.org/doc/00-intro.md
require 'vendor/autoload.php';

Download and install

Download a packaged archive of dompdf and extract it into the directory where dompdf will reside

Use the packaged release autoloader to load dompdf, libraries, and helper functions in your PHP:

// include autoloader
require_once 'dompdf/autoload.inc.php';

Note: packaged releases are named according using semantic versioning (dompdf_MAJOR-MINOR-PATCH.zip). So the 1.0.0 release would be dompdf_1-0-0.zip. This is the only download that includes the autoloader for Dompdf and all its dependencies.

Install with git

From the command line, switch to the directory where dompdf will reside and run the following commands:

git clone https://github.com/dompdf/dompdf.git
cd dompdf/lib

git clone https://github.com/PhenX/php-font-lib.git php-font-lib
cd php-font-lib
git checkout 0.5.1
cd ..

git clone https://github.com/PhenX/php-svg-lib.git php-svg-lib
cd php-svg-lib
git checkout v0.3.2
cd ..

git clone https://github.com/sabberworm/PHP-CSS-Parser.git php-css-parser
cd php-css-parser
git checkout 8.1.0

Require dompdf and it's dependencies in your PHP. For details see the autoloader in the utils project.

Quick Start

Just pass your HTML in to dompdf and stream the output:

// reference the Dompdf namespace
use Dompdf\Dompdf;

// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');

// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');

// Render the HTML as PDF
$dompdf->render();

// Output the generated PDF to Browser
$dompdf->stream();

Setting Options

Set options during dompdf instantiation:

use Dompdf\Dompdf;
use Dompdf\Options;

$options = new Options();
$options->set('defaultFont', 'Courier');
$dompdf = new Dompdf($options);

or at run time

use Dompdf\Dompdf;

$dompdf = new Dompdf();
$options = $dompdf->getOptions();
$options->setDefaultFont('Courier');
$dompdf->setOptions($options);

See Dompdf\Options for a list of available options.

Resource Reference Requirements

In order to protect potentially sensitive information Dompdf imposes restrictions on files referenced from the local file system or the web.

Files accessed through web-based protocols have the following requirements:

  • The Dompdf option "isRemoteEnabled" must be set to "true"
  • PHP must either have the curl extension enabled or the allow_url_fopen setting set to true

Files accessed through the local file system have the following requirement:

  • The file must fall within the path(s) specified for the Dompdf "chroot" option

Limitations (Known Issues)

  • Dompdf is not particularly tolerant to poorly-formed HTML input. To avoid any unexpected rendering issues you should either enable the built-in HTML5 parser at runtime ($options->setIsHtml5ParserEnabled(true);) or run your HTML through a HTML validator/cleaner (such as Tidy or the W3C Markup Validation Service).
  • Table cells are not pageable, meaning a table row must fit on a single page.
  • Elements are rendered on the active page when they are parsed.
  • Embedding "raw" SVG's (<svg><path...></svg>) isn't working yet, you need to either link to an external SVG file, or use a DataURI like this:
    $html = '<img src="data:image/svg+xml;base64,' . base64_encode($svg) . '" ...>';
    Watch https://github.com/dompdf/dompdf/issues/320 for progress

Donate button

If you find this project useful, please consider making a donation. Any funds donated will be used to help further development on this project.)

Comments
  • "A non-numeric value encountered" in PHP 7.1

    In PHP 7.1 there are a number of situations in the code where you'd get this error. I'm working through it right now to bring PHP 7.1 compatibility to dompdf (and will submit a PR when done), but I'm stumped by one thing:

    The reason why this happens is because you've got things like $max_y = $frame->get_position("y") + $margin_height; in \Dompdf\FrameDecorator\Page, where $margin_height might be "auto". If it is "auto", obviously that's not a number, and that's the reason why we're getting these errors.

    The default behaviour in PHP < 7.1 is to treat that as 0. So we could just look for situations where this happens and just manually force-convert "auto" to "0" and make the error go away.

    However, that's not the best way to deal with this, as it'll lead to incorrect calculations. If it's "auto", then $max_y needs to take that into account, no? But looking through the code, it seems that $margin_height comes from $frame->get_margin_height(), which calls $style->length_in_pt(), which returns "auto" if the value is "auto". No calculation is done.

    Would correcting this be a huge undertaking? Are the "auto" values calculated later on and I'm getting caught up in a situation where it just doesn't matter and can be ignored?

    enhancement 
    opened by BrunoDeBarros 93
  • Problem in Arabic text in dompdf

    Problem in Arabic text in dompdf

    I went to unicode discussion and googled it and looked for it in stackverflow

    I did everything you recommended from using standard meta tag with content type and charset to loading font that supports arabic

    and the result was I got arabic letters separated from each other and reversed

    so plz let me know If you have really a serious issue regarding supporting arabic text ??

    please refer to attached image capture

    font-handling 
    opened by amr87 88
  • No block-level parent found. Not good.

    No block-level parent found. Not good.

    Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No block-level parent found. Not good.' in /var/www/web50/htdocs/system/library/dompdf/include/inline_positioner.cls.php:37

    All installaled PHP 5.0+ MBString extension DOM extension GD extension

    No Images, just external css/js

    bug 
    opened by Steinweber 72
  • Font issue

    Font issue

    My function works fine on windows to generate a pdf from a laravel view but in our debian environment we get the following error:

    production.ERROR: ErrorException: Undefined index: /var/www/application/dev/vendor/dompdf/dompdf\lib\fonts\Helvetica-Bold in /var/www/application/dev/vendor/dompdf/dompdf/src/
    Renderer/Text.php:97
    

    here is my code:

    $filepath = app_path().'/TestFiles/';
    $tempfilename = hash('sha1', Auth::user()->email)."-".hash('sha1', date(DATE_RFC2822)).'.pdf';
    
    $file = $filepath . $tempfilename;
    
    $pdf = PDF::loadView('Emails.quote', compact('quote', 'client', 'currency'));
    $pdf->save($file);
    

    My initial thought is the 3 slashes that are the wrong way in referencing the font

    font-handling documentation 
    opened by ghost 51
  • IMagick extension version check does not work as expected

    IMagick extension version check does not work as expected

    see https://github.com/avalanche123/Imagine/issues/474

    please make some defensive code which will handle that bug, Currently I have to manually hardcode that :/

    As a workaround, I am just changing:

    $imagickClonable = version_compare(phpversion('imagick'), '3.0.1rc1') > 0;

    to

    $imagickClonable = true; // version_compare(phpversion('imagick'), '3.0.1rc1') > 0;

    bug documentation image-handling 
    opened by pun-ky 45
  • Whitespace inside HTML tag breaks rendering

    Whitespace inside HTML tag breaks rendering

    It looks like adding whitespace between the HTML and HEAD tags breaks the renderer.

    To reproduce this, run the following:

    use Dompdf\Dompdf;
    
    $dompdf = new DomPDF();
    
    $dompdf->load_html(<<<HTML
    <html>
    <head>
    </head>
    <body>
    Hello world
    </body>
    </html>
    HTML
    );
    
    $dompdf->render();
    

    On my system (Arch Linux, PHP 7.1.7, DomPDF 0.8.0), I get the following exception:

    Fatal error: Uncaught Dompdf\Exception: No block-level parent found.  Not good. in <path>/dompdf/dompdf/src/Positioner/Inline.php:45
    Stack trace:
    #0 <path>/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(872): Dompdf\Positioner\Inline->position(Object(Dompdf\FrameDecorator\Text))
    #1 <path>/dompdf/dompdf/src/FrameReflower/Text.php(368): Dompdf\FrameDecorator\AbstractFrameDecorator->position()
    #2 <path>/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(893): Dompdf\FrameReflower\Text->reflow(NULL)
    #3 <path>/dompdf/dompdf/src/FrameReflower/Page.php(141): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #4 <path>/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(893): Dompdf\FrameReflower\Page->reflow(NULL)
    #5 <path>/dompdf/dompdf/src/Dompdf.php(831): Dom in <path>/dompdf/dompdf/src/Positioner/Inline.php on line 45
    

    Removing the whitespace from <html> to <head>, </head> to <body> and </body> to </html> prevents the error.

    bug 
    opened by TobiasKappe 38
  • DOMPDF not formatting PDF output properly on live server

    DOMPDF not formatting PDF output properly on live server

    I have a script that generates a pdf file using DOMPDF. Locally it generates fine the way I want it to be but online, the formatting is scattered. These are the two samples. The first is the output on localhost while the 2nd is the output on the live server well formated on localhost not well formated On both localhost and live server, I am using PHP 5.3.x. Please what could be the problem. I am using the latest version of dompdf

    enhancement 
    opened by yankitwizzy 37
  • CSS FLOAT property support

    CSS FLOAT property support

    Original author: [email protected] (May 29, 2009 20:51:58)

    What would you like dompdf to do: Either have a more robust table-within-table functionality (also div-within-table), or add float support.

    Do you have an example:

    <div style="width:65mm; height:40mm; float:left;">Block one</div>
    <div style="width:65mm; height:40mm; float:left;">Block two</div>
    <div style="width:65mm; height:40mm; float:left;">Block three</div>
    <div style="width:65mm; height:40mm; float:left;">Block four</div>
    <div style="width:65mm; height:40mm; float:left;">Block five</div>
    <div style="width:65mm; height:40mm; float:left;">Block six</div>
    

    Original issue: http://code.google.com/p/dompdf/issues/detail?id=19

    enhancement imported Priority-High css 
    opened by PhenX 36
  • Resize images from css background-size.

    Resize images from css background-size.

    Original author: [email protected] (March 29, 2012 17:46:41)

    Resize images from css background-size.

    Original issue: http://code.google.com/p/dompdf/issues/detail?id=457

    enhancement imported css 
    opened by PhenX 35
  • I have a big table and it's broken! in version 0.5.1

    I have a big table and it's broken! in version 0.5.1

    Original author: [email protected] (May 12, 2009 21:31:48)

    the title says all.

    Original issue: http://code.google.com/p/dompdf/issues/detail?id=10

    bug duplicate imported Priority-Medium 
    opened by PhenX 33
  • at-font-face with space in source URL does not load

    at-font-face with space in source URL does not load

    Solution: Turns out the issue in my case was an extra space before the URL string. Once that was removed the fonts rendered correctly in the pdf.

    I realize there is a whole host of somewhat related topics but I just can't seem to find one that's the same and / or includes a solution that solves my problem.

    I'm sending an html document to dompdf which includes embeded css and includes font-face declarations and class definitions. The fonts are on the same server and I've tried with both relative and absolute paths and can't seem to get them to work.

    I'm including the following in the head of the html document I then send to dompdf.

    <style type="text/css">
        @font-face {
            font-family: "Roboto";
            font-weight: normal;
            font-style: normal;
             src: url( "http://localhost/resources/fonts/Roboto/Roboto-Regular.ttf") format('truetype');
         }
          .font_alpha { font-family: "Roboto";}`
    
        /* .... Other css rules here ... */
    
    </style>
    

    When I echo the html rather than send it on to dompdf I can see that the font for any element with the .font_alpha class applied is correct, in inspector it also shows that it's using the network resource yet when I call the following on the html, the font doesn't get applied.

    //This is where I would display the html directly for testing
    //echo $report_html; exit;
    
    $dompdf = new DOMPDF();
    $dompdf -> load_html( $report_html );
    $dompdf -> set_paper( $this -> paper_size, $this -> paper_orientation );
    $dompdf	-> render();
    $dompdf	-> output();
    

    The pdf(s) get generated correctly with all css formating from the rest of the rules being correctly applied except for the fonts.

    To be honest I'm not sure if I need to be installing these fonts in an additional way like using cmd line load_font.php thirdparty lib or not. Based on what I believe I can understand about version 0.8.0 I shouldn't need to correct??

    Any advice or input would be extremely helpful.

    Thanks in advance, Cheerios

    css 
    opened by frostedcheerio 32
  • No control over

    No control over "cache-control" header of PDF?

    I often have to make PDF files with the same URL but slightly different content. These documents are cached by the browser, I use Firefox, and therefore don't show the changes.

    Caching in a browser is, to some extend, controlled by the "Cache-Control" header. I have looked for a way to change this header using DomPDF, but I have not been able to find one. I would like it to be something like:

    Cache-Control: no-cache, no-store, must-revalidate

    As a work-around I currently add a random parameter to the URL to make it unique. That works, but is not a very satisfying solution.

    Would it be possible to give more control over the headers, for instance in the options?

    I have also asked this question on StackOverflow in October:

    https://stackoverflow.com/questions/74082446/prevent-browser-caching-of-pdf-generated-with-dompdf

    enhancement 
    opened by kikosoft 3
  • SVG width is not consistent

    SVG width is not consistent

    I create some SVG-Vector images and try to insert them into the pdf. With the bas64 encode trick this works as expected, but I have the strange thing, that the width of the svg which I set in the style attribute is sometimes ignored. Then the image is cropped on the right side and not completly shown.

    Is this issue already known?

    This is my code where I create the svg HTML.

    return '<div class="page_break"></div><img src="data:image/svg+xml;base64,' . base64_encode($res->getContent()) . '" style="width: 700px; height: auto; max-width: none; min-height: none; min-width: none;" />';
    

    This is my code where I create the svg HTML.

    My SVG which is cropped is attached to the issue. 605444e893f4330ad72b7310ff6e90cb

    question 
    opened by holema 5
  • Problem loading bootstrap 5.2

    Problem loading bootstrap 5.2

    Is there any way to run dompdf and have it load a bootstrap 5.2 cdn?

    I tried in different ways like:

    cdn, local css file, ob_start() to load the php include and ob_get_clean() to apply the php result inside the dompdf loadHtml() and none of that made it load the bootstrap 5.2 styles

    does anyone have a solution for this?

    image

    print above is the PDF output

    image

    image this way the output is the same, only text in the generated file

    image

    question 
    opened by klebinhopk 2
  • 'object_fit' is not a recognized CSS property.

    'object_fit' is not a recognized CSS property.

    Hello everybody.

    I am using generate pdf from html&css with images. I am using object-fit. But, It is show error below:

    'object_fit' is not a recognized CSS property.

    Could you help me?

    Best regards, Bang.

    enhancement css 
    opened by dinhbang 2
  • Dynamic the html to pdf

    Dynamic the html to pdf

    Hi , I tried to get data from database to dynamic the html from pdf . But it doesnot work .My controller code is :-

    public function view_title(Request $request)
        {
            $id = $request->input('id');
            $name = $request->input('plot_holder_title');
            
            
            $data = Order_Meta::where('id',$id)->get();
            return $data;
            $pdf = PDF::loadView('title-crest', [
                'data' => $data,
                'title' => $name,
                ]);
                $pdf->set_paper('A3', 'potrait');
                $pdf->render();
                return $pdf->stream('title-crest.pdf');
           
            
        }
    

    My ajax code is :-

    $(document).on('click','#viewBtn',function() {
          var id = $(this).attr('data-id');
          var product_name = $(this).attr('data_product_name');
          
      $.ajax({
          url: "{{ url('view-title') }}", 
          type: "GET",  
          data:{
              id:id,
              name:product_name
          },
          dataType:"json",
          success:function(data)
          {
                $("#data_id").val(data.id);
                $("#order_id").val(data.order_id);
                $("#custom_order_id").val(data.custom_order_id);
                $("#land_size").val(data.land_size);
                $("#product_name").val(data.product_name);
                $("#purchased_as_a_gift").val(data.purchased_as_a_gift);
                $('#plot_holder_title').val(data.plot_holder_title);
                $("#plot_holder_name").val(data.plot_holder_name);
                $('#second_plot_holder_title').val(data.second_plot_holder_title);
                $("#second_plot_holder_name").val(data.second_plot_holder_name);
                $("#certificate_date_of_issue").val(data.certificate_date_of_issue);
                $("#pack_option").val(data.pack_option);
          }
      });
    });
    

    My HTML code is :-

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="preload" href="fonts/transfonter.org-20221201-054935/" as="font" type="font/woff2" crossorigin>
        <link rel="preload" href="fonts/transfonter.org-20221201-053057/" as="font" type="font/woff2" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Righteous&display=swap" rel="stylesheet">
    	<link href="https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap" rel="stylesheet">
    	<link href="https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700;900&display=swap" rel="stylesheet">
    	</head>
    <style>
        @font-face {
            font-family: 'Righteous', cursive;
            src: url('fonts/Chomsky.woff2') format('woff2'), url('fonts/Chomsky.woff') format('woff');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
        
        @font-face {
            font-family: 'LT Comical';
            src: url('fonts/LTComical-Medium.woff2') format('woff2'), url('fonts/LTComical-Medium.woff') format('woff');
            font-weight: 500;
            font-style: normal;
            font-display: swap;
        }
        
        * {
            padding: 0;
            box-sizing: border-box;
            margin: 0;
        }
        
        body {
            margin: 0 auto;
            display: block;
            background-color: #ffeeb6;
        }
        
        
    </style>
    
    <body>
        
        <table style="width: 100%; border-spacing: 0;background-color: #ffeeb6;">
            <tbody>
                
                <tr>
                    <td><img src="./images/multi-color-background.png" style="width: 100%; display: block;"></td>
                </tr>
            </tbody>
        </table>
    
        <table style="width: 100%;background-color: #ffeeb6;  ">
            <tbody style="position: relative;">
                <tr>
                    <td><img src="./images/logo.png" style="width: 100%;max-width: 120px;display: block; margin-top: -65px;"></td>
                </tr>
    
                <tr>
                    <td style="font-family: 'Passion One', cursive; color: #536a32;font-size: 32px;font-weight: 100;text-align: center; line-height: 50px; text-align: center;max-width: 720px;margin: 0 auto; display:block;">To All & Sundry whom these presents do concern Scotland Titles does declare that</td>
                </tr>  
                <tr>
                    <td style="font-family: 'Passion One', cursive; color: #10094c;font-weight: 100;font-size: 36px;margin-top: 0;text-align: center; line-height: 50px; text-align: center;max-width: 540px;margin: 0 auto; display:block;">{{ $data }}</td>
                </tr>
                <tr>
                    <td style=" padding-top: 20px; text-align: center";>
                        <img src="./images/upper-logo.png" style="max-width: 160px;width: 100%;display: block;margin: 0 auto;"></td>
                </tr>
            </tbody>
        </table>
    
        <table style="width: 100%;border-spacing: 0;background-color: #ffeeb6;padding: 60px 20px 0px 20px;">
            <tbody>
                <tr>
                    <td style="font-family: 'LT Comical';font-size: 16px;letter-spacing: 1px;line-height: 28px;width: 50%; padding-right: 20px;">
                        <div style="font-family: 'Patrick Hand', cursive; font-size: 16px;line-height: 23px; ">
                            <p style="padding-bottom: 10px;">
                                <span style="font-family: 'Righteous', cursive; color: #536a32;font-size: 20px;font-weight: 100; ">
                                Having By Petition</span>  UNTO US THIS DAY IN THIS  YEAR OF THE REIGN OF OUR SOVEREIGN CHARLES THE THIRD, BY THE GRACE OF GOD, OF THE UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND,KING, HEAD OF THE COMMONWEALTH,DEFENDER OF THE FAIT, </p>
                            <p style="padding-bottom: 10px;">
                                <span style="font-family: 'Righteous', cursive; color: #536a32;font-size: 20px;font-weight: 100; "> Shewwen:</span>  THAT THE SAID PETITIONER SHAVE OWNERSHIP OF LANDS IN SCOTLAND AND THE PETITIONERS HAVING PREYED THAT THERE MIGHT BE GRANTED UNTO THEM TO USE SUCH ENSIGNS ARMORIAL AS MAY BE THE LAWFUL PROPERTY OF SCOTLAND TITLES AND MIGHT BE SUITABLE AND ACCORDING TO THE LAWS OF ARMS, KNOW YE THEREFORE THAT WE HAVE ASSIGNED, AND DO BY THESE PRESENTS DECLARE, RATIFY AND CONFIRM UNTO THE PETITIONERS THE FOLLOWING ENSIGNS ARMORIAL, AS DEPICTED HEREOF, AND MATRICULATED OF EVEN DATE WITH THESE PRESENTS AS A MARK OF THE INTELLECTUAL PROPERTY OF SCOTLAND TITLES, TO BE PRESENTED BY THE PETITIONERS AS THEY DEEM,  </p>
    
                            <p style="padding-bottom: 10px;">
                                <span style="font-family: 'Righteous', cursive; color: #536a32;font-size: 20px;font-weight: 100; "> Videlicit: </span> BY DEMONSTRATION OF WHICH ENSIGNS ARMORIAL THE SAID PETITIONER SARE , AMONGST ALL NOBLES AND IN ALL PLACES OF HONOUR, TO BE TAKEN, NUMBERED, ACCOUNTED AND RECEIVED AS  LAIRDS OF SCOTLAND,
                            </p>
    
                            <p style="padding-bottom: 10px;">
                               <span style="font-family: 'Righteous', cursive; color: #536a32;font-size: 20px;font-weight: 100; "> In Testimony Whereof.</span> WE HAVE SUBSCRIBED THESE PRESENTS AND THE SEAL OF OUR OFFICE IS AFFIXED HERETO AT SCOTLAND TITLES THIS DAY.  
                            </p>
                        </div>
                    </td>
                    <td style="width: 0px;border: 5px solid #10094c;margin: 0 20px;border-radius: 22px;">
    
                    </td>
                    <td style="font-family: 'Patrick Hand', cursive; font-size: 16px;letter-spacing: 1px;line-height: 23px;width: 50%; padding-left: 20px;">
                        <img src="./images/royl-img.png" style="width: 100%;max-width: 350px; margin: 0 auto;display: flex; ">
                        <p style="padding-bottom: 10px;">
    					
                        <span style="font-family: 'Righteous', cursive; color: #536a32;font-size: 20px;font-weight: 100;display: flex;margin-bottom: 0px; ">furthermore know ye therefore that 
                       </span>SCOTLAND TITLES HAS SET OUT PART OF THE ESTATE BY BLAIRADAM FOREST KNOWN AS CANTSDAM ,FIFE, SCOTLAND, HEREINAFTER REFERRED TO AS ‘THE ESTATE’, AS A SCHEME OF SOUVENIR PLOTS AND
                        </p>
    
                       <p style="padding-bottom: 10px;">
                            <span style="    font-family: 'Righteous', cursive;color: #536a32;font-size: 20px;font-weight: 100; ">
                    Scilicet:</span> BY VIRTUE OF OWNERSHIP OF THE LAND IN SCOTLAND AND IN PARTICULAR THE LAND DESCRIBED ABOVE WITHIN THE KINGDOM OF FIFE BY CANTSDAM AS FURTHER DESCRIBED IN THE CERTIFICATE OF DISPOSITION AND PROCLAMATION , THE PETITIONERS MAY HENCEFORTH AND IN PERPETUITY BE KNOWN BY THE STYLE OF LAIRDS AND IN PARTICULAR LAIRDS OF BLAIRADAM .
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>
    
        <table style="width: 100%; border-spacing: 0;background-color: #ffeeb6;">
            <tbody style="text-align: center;position: relative;">
                <tr>
                    <td style="text-align: right; padding-top: 30px;">
                        <img src="./images/star-logo.png" style="max-width: 180px;width: 100%;padding: 16px 0;text-align: right;margin-right: 40px;margin-top: 0px;margin-left: auto;position: relative;z-index: 9; display: block;">
                    </td>  
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;border-spacing: 0;padding: 20px; margin-top: -160px;">
            <tbody style="text-align: center;position: relative;">
                <tr>
                    <td>
                        <p style="font-family: 'Righteous', cursive;color: #536a32;font-size: 26px;font-weight: 100;display: flex;align-items: center;justify-content: center;">
                            Signed<img style="max-width: 120px;height: 60px;object-fit: contain;margin-left: 40px;" src="./images/sign-img.png">
                        </p>
                        <p style=" margin-top: 0;margin-bottom: 8px; font-family: 'LT Comical';">
                            <span style="margin: 0; font-family: 'Righteous', cursive;color: #536a32;font-size: 26px;font-weight: 100; margin-right: 40px;">Date</span>THIS 4TH DAY OF JUNE IN THE YEAR 2022
                        </p>
                        <p style="font-family: 'Patrick Hand', cursive;font-size: 12px; letter-spacing: 1px; line-height: 16px; text-align: center;margin: 0;">All content, layout, artwork and illustrations copyright Scotland Titles 2021 and subject to licence
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>
    
        <table style="width: 100%; border-spacing: 0;background-color: #ffeeb6; padding-top:40px;">
            <tbody>
                <tr>
                    <td><img src="./images/multi-color-background.png" style="width: 100%; display: block;"></td>
                </tr>
            </tbody>
        </table>
    
    </body>
    
    </html>
    

    Kindly check this and suggest me how to dynamic the html from database.

    question 
    opened by a-akashsoni 3
  • dompdf Urdu Words Not Joining Issue

    dompdf Urdu Words Not Joining Issue

    Font is loading but characters are separated tried so many other URDU language fonts like zoya font, noto_nastaliq_urdu font but nothing worked.

    My complete code is

    <?php
    require_once "vendor/autoload.php";
    
    use Dompdf\Dompdf;
    use Dompdf\CanvasFactory;
    use Dompdf\Exception;
    use Dompdf\FontMetrics;
    use Dompdf\Options;
    
    use FontLib\Font;
    ini_set("display_errors", true);
    ini_set("error_log", "phperr.log");
    ini_set("log_errors", true);
    error_reporting(E_ALL);
    
    $pdf = new Dompdf(new Options([
        'defaultPaperSize'          => 'a4',
        'defaultPaperOrientation'   => 'portrait',
        'isRemoteEnabled'           => true,
        'allowUrlFopen'             => true,
        'isHtml5ParserEnabled'      => true,
        'isFontSubsettingEnabled' => false,
        'direction' => 'rtl',
    ]));
    
    // define("DOMPDF_ENABLE_HTML5PARSER", true);
    
    $pdf->loadHtml('
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8">
    
    <style>
    
    @font-face {
      font-family: "Zoya";
      font-style: normal;
      font-weight: 400;
      src: url(http://localhost/dompdf/drive/zoya-regular-1.ttf);
    }
    
    
    * {
      font-family: "Zoya";
      font-style: normal;
      font-weight: 400;
      direction: rtl;
    
    }
    </style>
    </head>
    
    <body>    
      <span> اردو پوائنٹ    </span>
    </body>
    
    ',"UTF-8");
    $pdf->render();
    $pdf->stream('test.pdf', array('Attachment'=> 0 ));
    
    

    screenshot image

    enhancement 
    opened by thewebdevelopment 3
Releases(v2.0.1)
  • v2.0.1(Sep 22, 2022)

    Change highlights since 2.0.0

    • Improved font-face declaration parsing and handling. External fonts are now restricted by resource access constraints.
    • Improved layout of images with percentage-based dimensions

    This release addresses the following vulnerabilities:

    | Vulnerability | References | Type | Severity | | --- | --- | --- | --- | Remote Code Execution via font installation | #2994, CVE-2022-41343, Tanto | Remote Code Execution | Critical

    2.0.x highlights

    • Modifies callback and page_script/page_text handling
    • Switches the HTML5 parser to Masterminds/HTML5
    • Improves CSS property parsing and representation
    • Switches installed fonts and font metrics cache file format to JSON

    The list of addressed issues can be found in the 2.0.1 release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 2.0.1 requires the following:

    • PHP 7.1 or greater
    • html5-php v2.0.0 or greater
    • php-font-lib v0.5.4 or greater
    • php-svg-lib v0.3.3 or greater

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_2-0-1.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf-2.0.1.zip(3.90 MB)
  • v2.0.0(Jun 23, 2022)

    This release has been superseded by version 2.0.1

    Change highlights since 1.2.x

    • Addresses multiple security vulnerabilities (see below)
    • Modifies callback and page_script/page_text handling (breaking change, see below)
    • Switches the HTML5 parser to Masterminds/HTML5
    • Improves CSS property parsing and representation
    • Improves border, outline, and background rendering for inline elements
    • Switches installed fonts and font metrics cache file format to JSON
    • Adds support for the inset CSS shorthand property and the legacy break-word keyword for word-break
    • Adds "end_document" callback event

    The full list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    This release addresses the following announced vulnerabilities:

    | Vulnerability | References | Type | Severity | | --- | --- | --- | --- | Improper Restriction of XML External Entity Reference | #2564, CVE-2021-3902, huntr.dev | Information Disclosure; Remote Code Execution | Critical Deserialization of Untrusted Data | #2564, CVE-2021-3838, huntr.dev | Remote Code Execution | Critical External Control of File Name or Path | #2564, CVE-2022-2400, huntr.dev | Information Disclosure | Medium Server-Side Request Forgery | #2564, CVE-2022-0085, huntr.dev | SSRF | Medium

    Breaking Changes

    • Callback signature change: callbacks should now accept three individual arguments (Frame, Canvas, FontMetrics)
    • Canvas::page_* methods are executed immediately rather than during output generation and should be called after rendering the document
    • Cpdf::polygon method signature changed, no longer accepts the number of points
    • See the migration guide for details

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 2.0.0 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib
    • php-svg-lib

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_2-0-0.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_2-0-0.zip(3.91 MB)
  • v1.2.2(Apr 29, 2022)

    This release has been superseded by version 2.0.0

    Change highlights since 1.2.1

    • Addressed crash caused when paging some inline elements
    • Improved layout of images with percentage-based dimensions

    1.2.x highlights

    • Addresses PHP 8.1 compatibility issues
    • Improves table parsing and layout
    • Adds callback function support to Canvas::page_script
    • Fixes issues with metadata in protected PDFs

    The list of addressed issues can be found in the 1.2.2 release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.2.2 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-2-2.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-2-2.zip(3.89 MB)
  • v1.2.1(Mar 24, 2022)

    This release has been superseded by version 1.2.2

    Change highlights since 1.2.0

    This release addresses the following announced vulnerability:

    | Vulnerability | References | Type | Severity | | --- | --- | --- | --- | Remote Code Execution via remote font installation | Positive Security, #2598 | Remote Code Execution | Critical

    Bugs addressed:

    • Infinite recursion when generated content spans more than one line
    • Errors or display corruption caused during CSS parsing of inherited properties, border style, and list style
    • Empty table handling exceptions

    Improvements:

    • HTTP context can now be set through the Options class

    1.2.x highlights

    • Addresses PHP 8.1 compatibility issues
    • Improves table parsing and layout
    • Adds callback function support to Canvas::page_script
    • Fixes issues with metadata in protected PDFs

    The list of addressed issues can be found in the 1.2.1 release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.2.1 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-2-1.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-2-1.zip(3.85 MB)
  • v1.2.0(Feb 7, 2022)

    This release has been superseded by version 1.2.1

    Change highlights since 1.1.1

    • Addresses PHP 8.1 compatibility issues
    • Improves table parsing and layout
    • Adds support for space-separated RGB color syntax
    • Adds callback function support to Canvas::page_script
    • Fixes issue handling differing page margins
    • Fixes font issue caused by temporary file handling during concurrent execution
    • Fixes issues with metadata in protected PDFs

    The list of addressed issues can be found in the 1.2.0 release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.2.0 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-2-0.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-2-0.zip(3.85 MB)
  • v1.1.1(Nov 24, 2021)

    This release has been superseded by version 1.2.0

    Change highlights since 1.0.2

    • Improves margin and page break handling (element boundary detection)
    • Improves containing block determination for positioned elements
    • Improves support for relative positioning
    • Improves border radius rendering, fixes support for border radius on table cells
    • Improves table rendering in relation to borders, column widths
    • Improves counter tracking, roman numeral rendering
    • Adds Support for WebP images when using the CPDF back end
    • Fixes issue with IMagick version check

    Bugs addressed since 1.1.0

    • Variable with potential string value was not correctly handled in a mathematical operation
    • A potential breaking change was introduced for installations using a custom dompdf_font_family_cache.dist.php

    The list of addressed issues can be found in the 1.1.0 and 1.1.1 release milestones. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.1.1 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-1-1.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-1-1.zip(3.84 MB)
  • v1.1.0(Nov 16, 2021)

    This release has been superseded by version 1.1.1

    Change highlights since 1.0.2

    • Improves margin and page break handling (element boundary detection)
    • Improves containing block determination for positioned elements
    • Improves support for relative positioning
    • Improves border radius rendering, fixes support for border radius on table cells
    • Improves table rendering in relation to borders, column widths
    • Improves counter tracking, roman numeral rendering
    • Adds Support for WebP images when using the CPDF back end
    • Fixes issue with IMagick version check

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.1.0 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-1-0.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-1-0.zip(3.84 MB)
  • v1.0.2(Jan 8, 2021)

    This release has been superseded by version 1.1.0

    Change highlights since 0.8.6

    • Adds support for PHP 8
    • Adds support for soft hyphens
    • Adds multi-path support to the chroot option
    • Fixes table cells positioning following a rowspanned cell
    • Fixes excessive minimum widths for columns spanned by a colspanned cell
    • Addresses a performance issue related to parsing CSS image URLs

    Bugs addressed since 1.0.1

    • Multi-path chroot support was not correctly parsed

    Note on resource references: Because of the changes in resource security, some resources (images, external stylesheets) that would previously load with the default settings may no longer load. To ensure compatibility with this release ensure that remote resources can be loaded and that any local filesystem resources are within the directories specified by the chroot setting. By default, chroot is set to the Dompdf directory. Information on how to change these settings can be found in the readme section on setting options.

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.0.2 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_1-0-2.zip" for the packaged release. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_1-0-2.zip(3.98 MB)
  • v1.0.1(Dec 31, 2020)

    This release has been superseded by version 1.0.2

    Change highlights since 0.8.6

    • Adds support for PHP 8
    • Adds support for soft hyphens
    • Adds multi-path support to the chroot option
    • Fixes table cells positioning following a rowspanned cell
    • Fixes excessive minimum widths for columns spanned by a colspanned cell
    • Addresses a performance issue related to parsing CSS image URLs

    Bugs addressed since 1.0.0

    • Merging some Style properties broke when using the computed value
    • Border shorthand parsing did not cause recalculation of related properties
    • Variable reference error in the Stylesheet class

    Note on resource references: Because of the changes in resource security, some resources (images, external stylesheets) that would previously load with the default settings may no longer load. To ensure compatibility with this release ensure that remote resources can be loaded and that any local filesystem resources are within the directories specified by the chroot setting. By default, chroot is set to the Dompdf directory. Information on how to change these settings can be found in the readme section on setting options.

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.0.1 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    The dompdf team recommends that you use Composer for easier dependency management.

    If you're not yet using Composer a packaged release will be made available shortly. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Dec 24, 2020)

    This release has been superseded by version 1.0.1

    Change highlights since 0.8.6

    • Adds support for PHP 8
    • Adds support for soft hyphens
    • Adds multi-path support to the chroot option
    • Fixes table cells positioning following a rowspanned cell
    • Fixes excessive minimum widths for columns spanned by a colspanned cell
    • Addresses a performance issue related to parsing CSS image URLs

    Note on resource references: Because of the changes in resource security, some resources (images, external stylesheets) that would previously load with the default settings may no longer load. To ensure compatibility with this release ensure that remote resources can be loaded and that any local filesystem resources are within the directories specified by the chroot setting. By default, chroot is set to the Dompdf directory. Information on how to change these settings can be found in the readme section on setting options.

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 1.0.0 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    The dompdf team recommends that you use Composer for easier dependency management.

    If you're not yet using Composer a packaged release will be made available shortly. The download options labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
  • v0.8.6(Sep 7, 2020)

    This release has been superseded by version 1.0.1

    Change highlights since 0.8.5

    • Adds support for the background-size CSS3 property
    • Adds support for loading an existing DOMDocument
    • Adds support for PDF form fields (AcroForm)
    • Adds support for digital signatures
    • Adds support for PDF file attachments
    • Bumps PDF version to 1.7 (no major structural changes)
    • Improves text width calculations
    • Addresses ImageMagick 7 compatibility
    • Addresses PDF compatibility issues related to font subsetting and encryption
    • Addresses style inheritance issues introduced with previous version
    • Linked resources now honor the resource security options (breaking change, see note below and linked issue)

    Note on resource references: Because of the changes in resource security, some resources (images, external stylesheets) that would previously load with the default settings may no longer load. To ensure compatibility with this release ensure the remote resources can be loaded and that any local filesystem resources are within the directory specified by the chroot setting. By default, chroot is set to the Dompdf directory. Information on how to change these settings can be found in the readme section on setting options.

    This update addresses the following announced vulnerabilities:

    | Vulnerability | Reference | Type | Severity | | --- | --- | --- | --- | | Information Disclosure through local image reference | Issue 2152 | Information Disclosure | Low; Critical (system-dependent) |

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 0.8.6 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-6.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-6.zip(3.98 MB)
  • v0.8.5(Feb 21, 2020)

    This release has been superseded by version 0.8.6

    Change highlights since 0.8.4

    • Specified document encoding is now honored (previously would always use UTF8).
    • TH elements are now centered by default
    • Fixes style parsing bug that could result in values resetting to style property default
    • Fixes text width calculation that resulted in overly wide elements, namely table cells
    • Fixes bug in curl implementation

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 0.8.5 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-5.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-5.zip(3.97 MB)
  • v0.8.4(Jan 20, 2020)

    This release has been superseded by version 0.8.5

    Change highlights since 0.8.3

    • Improves compatibility with PHP 7.x
    • Improves support for PDFLib 9
    • Adds support for numeric font weights
    • Improves style inheritance though addition of computed CSS values in addition to declared and used values
    • Improved handling of non-breaking space and word boundaries
    • Minor improvement to table border/background rendering

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 0.8.4 requires the following:

    • PHP 7.1 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-4.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-4.zip(3.97 MB)
  • v0.8.3(Dec 18, 2018)

    This release has been superseded by version 0.8.4

    Change highlights since 0.8.2

    • Improved compatibility with PHP 7.3
    • Supported PDFLib version bumped to PDFLib 9
    • Added page_line() canvas method (like page_text())
    • Page break improvements
    • Bug Fix: word-wrap: break-word no longer expands parent containers
    • Bug Fix: Addressed decorator positioning issues due to incorrect height calculation (better underline positioning)
    • GD is now only recommended per composer configuration (though still required for image processing)

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    Dompdf 0.8.3 requires the following:

    • PHP 5.4 or greater
    • MBString
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x

    Note that some dependencies may have further dependencies (notably php-svg-lib requires sabberworm/php-css-parser).

    Additionally, the following are recommended for optimal use:

    • GD (for image processing)
    • allow_url_fopen set to true or the curl PHP extension (for retrieving stylesheets, images, etc via http)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-3.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-3.zip(3.95 MB)
  • v0.8.2(Nov 26, 2017)

    This release has been superseded by version 0.8.3

    Change highlights since 0.8.1

    • Bug Fix: "no block level parent found" errors
    • Bug Fix: links to external resources broken
    • Bug Fix: Image rendering issues when using IMagick
    • Margin collapse logic now handles negative margins
    • Additional object type checking

    The list of addressed issues can be found in the release milestone. View all changes since the previous release in the commit history.

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    dompdf 0.8.2 requires the following:

    • PHP 5.4 or greater
    • MBString
    • GD (for image processing)
    • allow_url_fopen set to true (for retrieving stylesheets or images via http) or the curl PHP extension
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x (if rendering SVG)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-2.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-2.zip(3.97 MB)
  • v0.8.1(Nov 21, 2017)

    This release has been superseded by version 0.8.2

    Change highlights since 0.8.0

    • Improves compatibility with PHP 7.1
    • Improves table rendering around page breaks and margins
    • Fixes paging of generated content
    • Improves handling of CSS selectors, media queries, and inherited properties
    • Fixes Unicode support in (encrypted) PDF documents

    View all changes since the previous release in the commit history.

    Updated dependencies

    • php-svg-lib 0.5.1
    • php-svg-lib 0.3

    We would like to extend our gratitude to the community members who helped make this release possible.

    Requirements

    dompdf 0.8.1 requires the following:

    • PHP 5.4 or greater
    • MBString
    • GD (for image processing)
    • allow_url_fopen set to true (for retrieving stylesheets or images via http) or the curl PHP extension
    • php-font-lib v0.5.x
    • php-svg-lib v0.3.x (if rendering SVG)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-1.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the dependencies.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-1.zip(3.88 MB)
  • v0.8.0(Feb 19, 2017)

    This release has been superseded by version 0.8.1

    Change highlights since 0.7.0

    • Improves compatibility with PHP 7.1
    • Adds support for width: auto CSS styling
    • Adds support for RGB-alpha and HEX-alpha CSS color values
    • Falls back to curl for remote resource fetching
    • Adds support for HTML5 elements
    • Improves CSS support for the following: float, nth-child/nth-of-type, :matches pseudo-class
    • Adds support for in-document linking using element ID
    • Adds preliminary support for media queries (width, height, and orientation)
    • Improves performance in various areas
    • Updates DejaVu Fonts to 2.37

    Updated dependencies

    • php-font-lib 0.5
    • php-svg-lib 0.2

    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) or the curl PHP extension
    • php-font-lib v0.5.x
    • php-svg-lib v0.2 (if rendering SVG)

    For full requirements and recommendations see the requirements page on the wiki.

    Download Instructions

    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. Click the link labeled "dompdf_0-8-0.zip" for the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-8-0.zip(3.83 MB)
  • v0.7.0(May 12, 2016)

    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').
    Source code(tar.gz)
    Source code(zip)
    dompdf_0-7-0.zip(3.69 MB)
  • v0.7.0-beta3(Jan 22, 2016)

    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

    Requirements

    The dompdf 0.7.0 beta 3 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 beta package is titled dompdf_0-7-0_beta3.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 embedded scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->getFont('helvetica').
    Source code(tar.gz)
    Source code(zip)
  • v0.6.2(Dec 11, 2015)

    This release is superseded by version 0.7.0

    This is a security-focused release that addresses a number of vulnerabilities that can expose your system to exploitation. In tandem with this release we have also posted a document to the wiki with advice for securing dompdf. Please read the new document and take appropriate measures to protect your systems.

    We urge all users to upgrade to this release if you are using dompdf 0.6.1 or earlier.

    Change Summary for 0.6.2

    This update addresses the following announced vulnerabilities:

    | Vulnerability | Reference | Type | Severity | | --- | --- | --- | --- | | Remote Code Execution (complement of CVE-2014-2383) | CVE-2014-5013 | Remote Code Execution | Low; Critical (depending on configuration) | | Denial Of Service Vector | CVE-2014-5012 | Information Disclosure | Medium | | Information Disclosure | CVE-2014-5011 | Information Disclosure | Medium | | Arbitrary file read in dompdf using PHP stream filters | CVE-2014-2383 | Information Disclosure | Medium |

    Change Summary for 0.6.1

    • Removed pre-processing of PHP code when DOMPDF_ENABLE_PHP is true (this does not affect embedded script).
    • Prior to this release dompdf was vulnerable to an information disclosure vulnerability. Thanks to Portcullis Computer Security Ltd. for reporting the issue. See the security advisory for additional details: Arbitrary file read in dompdf.

    This update addresses the following announced vulnerabilities:

    | Vulnerability | Reference | Type | Severity | | --- | --- | --- | --- | | Arbitrary file read in dompdf using PHP stream filters | CVE-2014-2383 | Information Disclosure | Medium | | PHP remote file inclusion vulnerability in dompdf.php | CVE-2010-4879 | Remote File Inclusion | Low; Critical (depending on configuration) |

    Change Summary for 0.6.0

    • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
    • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
    • HTML: HTML5 Parser cleans your HTML syntax
    • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
    • Performance improvements
    • The project is now hosted on GitHub (the Google Code project is being temporarily maintained).

    Download Instructions

    Click the link labeled "dompdf-0.6.2.zip" to download the packaged release. The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

    Source code(tar.gz)
    Source code(zip)
    dompdf-0.6.2.zip(7.00 MB)
  • v0.7.0-beta2(Sep 27, 2015)

    Change highlights since 0.6.2

    • 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

    Requirements

    The dompdf 0.7.0 beta 2 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 beta package is titled dompdf_0-7-0_beta2.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->getFont('helvetica').
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0-beta(May 4, 2015)

    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').
    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Mar 14, 2014)

    This release is superseded by version 0.6.2

    dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

    Change highlights since 0.6.0

    • Removed pre-processing of PHP code when DOMPDF_ENABLE_PHP is true (this does not affect inline script).
    • Prior to this release dompdf was vulnerable to an information disclosure vulnerability. Thanks to Portcullis Computer Security Ltd. for reporting the issue. See the security advisory for additional details: Arbitrary file read in dompdf.

    Change highlights since 0.5.2

    • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
    • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
    • HTML: HTML5 Parser cleans your HTML syntax
    • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
    • Performance improvements
    • The project is now hosted on GitHub (the Google Code project is being temporarily maintained).

    Download Instructions

    The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-6-1.zip(8.01 MB)
  • v0.6.0(Mar 14, 2014)

    This release is superseded by version 0.6.2

    dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

    Change highlights since 0.5.2

    • Fonts: Full Unicode support (with embedded fonts); DejaVu fonts pre-installed; php-font-lib now provides font handling and sub-setting
    • CSS: float support, border radius, transparency, @page, @font-face, generated content, fixed-positioning, transformations
    • HTML: HTML5 Parser cleans your HTML syntax
    • Images: Expanded image handling (including alpha transparency); added support for Data-URI image sources
    • Performance Improvements

    Download Instructions

    The two buttons labeled "Source code" are auto-generated by github and do not include all the necessary files.

    Source code(tar.gz)
    Source code(zip)
    dompdf_0-6-0.zip(8.01 MB)
  • v0.5.2(Aug 17, 2013)

  • v0.6.0-b3(Aug 16, 2013)

    New Features

    HTML/CSS/Images support

    • Limited support for CSS float (disabled by default). See DOMPDF_ENABLE_CSS_FLOAT (svn: r407, r408, r415, r438, r457, r459, r471)
    • Support for nth-child selectors (svn: r407, r419)
    • Support for @font-face (svn: r407, r413)
    • Font sub-setting now available (disabled by default). See DOMPDF_ENABLE_FONTSUBSETTING (svn: r466, r468, r469)
    • Added an HTML5 Parser to enable improved document parsing/correction (disabled by default). See DOMPDF_ENABLE_HTML5PARSER (svn: r429, r430, r431, r441)
    • Added support for ID in anchors tags (svn: r373)
    • Added a message for broken images and updated the broken_image.png file to something less aggressive (svn: r377)
    • Added support for transparent PNG in background-image and improved background-image handling (svn: r380, r404, r450, r453)
    • Improved absolute positioning (svn: r387, r409, r459, r460)
    • Added support for the "rem" CSS unit (svn: r389)
    • Improved support for the "ex" CSS unit (svn: r390)
    • When parsing tables, TR elements not contained by TBODY, TFOOT, or THEAD are automatically encapsulated by TBODY (svn: r390)
    • Added support for the CSS declaration word-wrap: break-word (svn: r391)
    • Added support for @page :left, :right, :first, :odd, and :even (svn: r393)
    • Added support for CSS visibility and empty-cells properties (svn: r393)
    • Type selectors (e.g. h1) are now case insensitive (svn: r417)
    • Image type detection is now based on file header instead of filename extension (svn: r422)
    • Added support for HTML5-style charset metatag (<meta charset=”utf-8”>) (svn: r430)
    • Added support for nested CSS counters (svn: r438)
    • Replaced TTF2UFM with php-font-lib and remove all dependencies on TTF2UFM (svn: r447)
    • Table columns widths are now consistent across pages (svn: r462)
    • Added limited support for table captions (svn: r456)
    • Reduced rendering time by using caches (svn: r469)

    Installation / configuration / debugging

    • Added frame (i.e. discreet document element) count to the sample website debugger output (svn: r399)
    • DOMPDF_ENABLE_REMOTE is no longer needed for stylesheet references that use a URL with domain component (svn: r407)
    • Added a ready-to-use web-based font installer to the sample website (www/fonts.php) (svn: r417, r418)
    • Added the Unicode-compatible DejaVu Fonts as part of the base installation (svn: r388)

    Major bug fixes

    • Fixes compatibility with the Symfony framework autoloader (disabled by default). See DOMPDF_AUTOLOAD_PREPEND (svn: r374)
    • Fixes errors in how margins were collapsed between siblings (svn: r375)
    • Improves the way lines are aligned vertically (see the css_baseline example) (svn: r375)
    • Corrects the bounding box used for drawing backgrounds (svn: r377)
    • Fixes the z-index rendering process (svn: r377, r378, r379, r393)
    • Adds support for color styling inheritance (svn: r390)
    • Fixes bugs with nested tables and HTML attributes (svn: r393)
    • Fixes handling of URLs with non-ascii chars in the CPDF adapter (svn: r394)
    • Fixes a rgb()-style color parsing bug (svn: r402)
    • Fixes RLE4 compressed bitmap image support (svn: r405)
    • Fixes bug that caused generated content to occasionally display multiple times (svn: r406)
    • Improves background image clipping (svn: r417)
    • Fixes table layout bug caused by zero-height rows (svn: r464)
    • Fixes layout bug caused by 100% width tables centered with margin auto (svn: r465)
    Source code(tar.gz)
    Source code(zip)
Magento 2 Invoice PDF Generator - helps you to customize the pdf templates for Magento 2

Magento 2 Invoice PDF Generator - helps you to customize the pdf templates for Magento 2. If you have an enabled template and a default template for the store you need your template the system will print the pdf template.

EAdesign 64 Oct 18, 2021
PHP library generating PDF files from UTF-8 encoded HTML

mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF (see CREDITS), with a number of enhancement

null 3.8k Jan 2, 2023
PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage

Snappy Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopd

KNP Labs 4.1k Dec 30, 2022
PHP library allowing PDF generation or snapshot from an URL or an HTML page. Wrapper for Kozea/WeasyPrint

PhpWeasyPrint PhpWeasyPrint is a PHP library allowing PDF generation from an URL or an HTML page. It's a wrapper for WeasyPrint, a smart solution help

Pontedilana 23 Oct 28, 2022
PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page.

Snappy Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopd

KNP Labs 4.1k Dec 30, 2022
Convert HTML to PDF using Webkit (QtWebKit)

wkhtmltopdf and wkhtmltoimage wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webk

wkhtmltopdf 13k Jan 4, 2023
Convert html to an image, pdf or string

Convert a webpage to an image or pdf using headless Chrome The package can convert a webpage to an image or pdf. The conversion is done behind the sce

Spatie 4.1k Jan 1, 2023
Laravel package to convert HTML to PDF, supporting multiple drivers.

eve/pdf-converter A Laravel package to help convert HTML to PDF. Supports multiple drivers. Requirements and Installation eve/pdf-converter requires L

eve.io 11 Feb 15, 2022
Convert HTML to PDF using Webkit (QtWebKit)

wkhtmltopdf and wkhtmltoimage wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webk

wkhtmltopdf 13k Jan 9, 2023
plugin de criação de PDF através do HTML fácil

pluginmpdf plugin de criação de PDF através do HTML Para inciar nosso pluginmpdf devemos instalar a lib abaixo. mPDF is a PHP library which generates

EAD TUTORIA 2 Mar 24, 2022
Official clone of PHP library to generate PDF documents and barcodes

TCPDF PHP PDF Library Please consider supporting this project by making a donation via PayPal category Library author Nicola Asuni [email protected] co

Tecnick.com LTD 3.6k Jan 6, 2023
TCPDF - PHP PDF Library - https://tcpdf.org

tc-lib-pdf PHP PDF Library UNDER DEVELOPMENT (NOT READY) UPDATE: CURRENTLY ALL THE DEPENDENCY LIBRARIES ARE ALMOST COMPLETE BUT THE CORE LIBRARY STILL

Tecnick.com LTD 1.3k Dec 30, 2022
Pdf and graphic files generator library written in php

Information Examples Sample documents are in the "examples" directory. "index.php" file is the web interface to browse examples, "cli.php" is a consol

Piotr Śliwa 335 Nov 26, 2022
PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.

PdfParser Pdf Parser, a standalone PHP library, provides various tools to extract data from a PDF file. Website : https://www.pdfparser.org Test the A

Sebastien MALOT 1.9k Jan 2, 2023
A PHP tool that helps you write eBooks in markdown and convert to PDF.

Artwork by Eric L. Barnes and Caneco from Laravel News ❤️ . This PHP tool helps you write eBooks in markdown. Run ibis build and an eBook will be gene

Mohamed Said 1.6k Jan 2, 2023
Generate simple PDF invoices with PHP

InvoiScript Generate simple PDF invoices with PHP. Installation Run: composer require mzur/invoiscript Usage Example use Mzur\InvoiScript\Invoice; re

Martin Zurowietz 16 Aug 24, 2022
FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF.

FPDI - Free PDF Document Importer ❗ This document refers to FPDI 2. Version 1 is deprecated and development is discontinued. ❗ FPDI is a collection of

Setasign 821 Jan 4, 2023
Official clone of PHP library to generate PDF documents and barcodes

TCPDF PHP PDF Library Please consider supporting this project by making a donation via PayPal category Library author Nicola Asuni [email protected] co

Tecnick.com LTD 3.6k Dec 26, 2022
Laravel Snappy PDF

Snappy PDF/Image Wrapper for Laravel 5 and Lumen 5.1 This package is a ServiceProvider for Snappy: https://github.com/KnpLabs/snappy. Wkhtmltopdf Inst

Barry vd. Heuvel 2.3k Jan 2, 2023