{"id":18677193,"url":"https://github.com/superhero2007/html-to-pdf","last_synced_at":"2025-11-07T08:30:36.445Z","repository":{"id":104485635,"uuid":"87778359","full_name":"superhero2007/HTML-to-PDF","owner":"superhero2007","description":"This Project is to render pdf from html","archived":false,"fork":false,"pushed_at":"2017-04-10T07:14:56.000Z","size":4859,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T21:12:12.577Z","etag":null,"topics":["css","css3","dompdf","html","html5","pdf","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superhero2007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.LGPL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-10T07:10:30.000Z","updated_at":"2020-02-19T15:11:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a73530fb-9a80-4a37-a4ed-8fc224867f16","html_url":"https://github.com/superhero2007/HTML-to-PDF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superhero2007%2FHTML-to-PDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superhero2007%2FHTML-to-PDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superhero2007%2FHTML-to-PDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superhero2007%2FHTML-to-PDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superhero2007","download_url":"https://codeload.github.com/superhero2007/HTML-to-PDF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239524738,"owners_count":19653219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css3","dompdf","html","html5","pdf","php"],"created_at":"2024-11-07T09:32:50.784Z","updated_at":"2025-11-07T08:30:36.393Z","avatar_url":"https://github.com/superhero2007.png","language":"PHP","funding_links":["https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif"],"categories":[],"sub_categories":[],"readme":"Dompdf\n======\n\n[![Build Status](https://travis-ci.org/dompdf/dompdf.png?branch=master)](https://travis-ci.org/dompdf/dompdf)\n[![Latest Stable Version](https://poser.pugx.org/dompdf/dompdf/v/stable.png)](https://packagist.org/packages/dompdf/dompdf)\n[![Total Downloads](https://poser.pugx.org/dompdf/dompdf/downloads.png)](https://packagist.org/packages/dompdf/dompdf)\n[![Latest Unstable Version](https://poser.pugx.org/dompdf/dompdf/v/unstable.png)](https://packagist.org/packages/dompdf/dompdf)\n[![License](https://poser.pugx.org/dompdf/dompdf/license.png)](https://packagist.org/packages/dompdf/dompdf)\n \n**Dompdf is an HTML to PDF converter**\n\nAt its heart, dompdf is (mostly) a [CSS 2.1](http://www.w3.org/TR/CSS2/) compliant\nHTML layout and rendering engine written in PHP. It is a style-driven renderer:\nit will download and read external stylesheets, inline style tags, and the style\nattributes of individual HTML elements. It also supports most presentational\nHTML attributes.\n\n*This document applies to the latest stable code which may not reflect the current \nrelease. For released code please\n[navigate to the approrpiate tag](https://github.com/dompdf/dompdf/tags).*\n\n----\n\n**Check out the [demo](http://pxd.me/dompdf/www/examples.php) and ask any\nquestion on [StackOverflow](http://stackoverflow.com/questions/tagged/dompdf) or\non the [Google Groups](http://groups.google.com/group/dompdf).**\n\nFollow us on [![Twitter](http://twitter-badges.s3.amazonaws.com/twitter-a.png)](http://www.twitter.com/dompdf) or \n[![Follow us on Google+](https://ssl.gstatic.com/images/icons/gplus-16.png)](https://plus.google.com/108710008521858993320?prsrc=3).\n\n---\n\n\n\n## Features\n\n * Handles most CSS 2.1 and a few CSS3 properties, including @import, @media \u0026\n   @page rules\n * Supports most presentational HTML 4.0 attributes\n * Supports external stylesheets, either local or through http/ftp (via\n   fopen-wrappers)\n * Supports complex tables, including row \u0026 column spans, separate \u0026 collapsed\n   border models, individual cell styling\n * Image support (gif, png (8, 24 and 32 bit with alpha channel), bmp \u0026 jpeg)\n * No dependencies on external PDF libraries, thanks to the R\u0026OS PDF class\n * Inline PHP support\n * Basic SVG support\n \n## Requirements\n\n * PHP version 5.3.0 or higher\n * DOM extension\n * GD extension\n * MBString extension\n * php-font-lib\n * php-svg-lib\n\n### Recommendations\n\n * OPcache (OPcache, XCache, APC, etc.): improves performance\n * IMagick or GMagick extension: improves image processing performance\n\nVisit the wiki for more information:\nhttps://github.com/dompdf/dompdf/wiki/Requirements\n\n## About Fonts \u0026 Character Encoding\n\nPDF documents internally support the following fonts: Helvetica, Times-Roman,\nCourier, Zapf-Dingbats, \u0026 Symbol. These fonts only support Windows ANSI\nencoding. In order for a PDF to display characters that are not available in\nWindows ANSI you must supply an external font. Dompdf will embed any referenced\nfont in the PDF so long as it has been pre-loaded or is accessible to dompdf and\nreference in CSS @font-face rules. See the\n[font overview](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)\nfor more information on how to use fonts.\n\nThe [DejaVu TrueType fonts](http://dejavu-fonts.org) have been pre-installed\nto give dompdf decent Unicode character coverage by default. To use the DejaVu\nfonts reference the font in your stylesheet, e.g. `body { font-family: DejaVu\nSans; }` (for DejaVu Sans). The following DejaVu 2.34 fonts are available:\nDejaVu Sans, DejaVu Serif, and DejaVu Sans Mono.\n\n## Easy Installation\n\n### Install with composer\n\nTo install with [Composer](https://getcomposer.org/), simply require the\nlatest version of this package.\n\n```bash\ncomposer require dompdf/dompdf\n```\n\nMake sure that the autoload file from Composer is loaded.\n\n```php\n// somewhere early in your project's loading, require the Composer autoloader\n// see: http://getcomposer.org/doc/00-intro.md\nrequire 'vendor/autoload.php';\n\n```\n\n### Download and install\n\nDownload an archive of dompdf and extract it into the directory where dompdf\nwill reside\n * You can download stable copies of dompdf from\n   https://github.com/dompdf/dompdf/releases\n * Or download a nightly (the latest, unreleased code) from\n   http://eclecticgeek.com/dompdf\n\nRequire dompdf, libraries, and helper functions in your PHP:\n\n```php\n// include autoloader\nrequire_once 'dompdf/autoload.inc.php';\n```\n\n### Install with git\n\nFrom the command line, switch to the directory where dompdf will reside and run\nthe following commands:\n\n```sh\ngit clone https://github.com/dompdf/dompdf.git\ncd dompdf\n\ngit clone https://github.com/PhenX/php-font-lib.git lib/php-font-lib\ncd lib/php-font-lib\ngit checkout 0.4\ncd ..\n\ngit clone https://github.com/PhenX/php-svg-lib.git php-svg-lib\ncd php-svg-lib\ngit checkout v0.1\n```\n\nRequire dompdf, libraries, and helper functions in your PHP:\n\n```php\n// include autoloader\nrequire_once 'dompdf/autoload.inc.php';\n```\n\n## Quick Start\n\nJust pass your HTML in to dompdf and stream the output:\n\n```php\n// reference the Dompdf namespace\nuse Dompdf\\Dompdf;\n\n// instantiate and use the dompdf class\n$dompdf = new Dompdf();\n$dompdf-\u003eloadHtml('hello world');\n\n// (Optional) Setup the paper size and orientation\n$dompdf-\u003esetPaper('A4', 'landscape');\n\n// Render the HTML as PDF\n$dompdf-\u003erender();\n\n// Output the generated PDF to Browser\n$dompdf-\u003estream();\n```\n\n### Setting Options\n\nSet options during dompdf instantiation:\n\n```php\nuse Dompdf\\Dompdf;\nuse Dompdf\\Options;\n\n$options = new Options();\n$options-\u003eset('defaultFont', 'Courier');\n$dompdf = new Dompdf($options);\n```\n\nor at run time\n\n```php\nuse Dompdf\\Dompdf;\n\n$dompdf = new Dompdf();\n$dompdf-\u003eset_option('defaultFont', 'Courier');\n```\n\nSee [Dompdf\\Options](src/Options.php) for a list of available options.\n\n\n## Limitations (Known Issues)\n\n * Dompdf is not particularly tolerant to poorly-formed HTML input. To avoid\n   any unexpected rendering issues you should either enable the built-in HTML5\n   parser at runtime (`$dompdf-\u003eset_option('isHtml5ParserEnabled', true);`) \n   or run your HTML through a HTML validator/cleaner (such as\n   [Tidy](http://tidy.sourceforge.net) or the\n   [W3C Markup Validation Service](http://validator.w3.org)).\n * Large files or large tables can take a while to render.\n * CSS float is in development and may not produce the desired result\n\n---\n\n[![Donate button](https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](http://goo.gl/DSvWf)\n\n*If you find this project useful, please consider making a donation. Any funds donated will be used to help further development on this project.)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperhero2007%2Fhtml-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperhero2007%2Fhtml-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperhero2007%2Fhtml-to-pdf/lists"}