Dompdf Github Guia php5
Dompdf Github Guia php5
Dompdf Github Guia php5
dompdf / dompdf
Dismiss
Join GitHub today
GitHub is home to over 36 million developers working together to host
and review code, manage projects, and build software together.
Sign up
Dompdf
stable v0.8.3 downloads
14.32 M
unstable dev-master license LGPL-2.1
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
Requirements
PHP version 5.4.0 or higher
DOM extension
GD extension
MBString extension
php-font-lib
php-svg-lib
Recommendations
OPcache (OPcache, XCache, APC, etc.): improves performance
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
Quick Start
Just pass your HTML in to dompdf and stream the output:
// reference the Dompdf namespace
use Dompdf\Dompdf;
https://github.com/dompdf/dompdf 3/4
7/29/2019 GitHub - dompdf/dompdf: HTML to PDF converter (PHP5)
Setting Options
Set options during dompdf instantiation:
use Dompdf\Dompdf;
use Dompdf\Options;
or at run time
use Dompdf\Dompdf;
If you find this project useful, please consider making a donation. Any funds donated will be used to help further
development on this project.)
https://github.com/dompdf/dompdf 4/4