spipu/html2pdf
Html2Pdf is a HTML to PDF converter written in PHP - It uses TCPDF - OFFICIAL PACKAGE
v5.3.3
11M downloads/mo
#2002 most downloaded on Packagist
spipu/html2pdf
What this package is like to depend on
Last release 1 years ago
08 Jun 2025
Release timing varies
gaps range from 6 weeks to 1.6 years
Nearly every release is documented
notes for 21 of 21 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
21 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
21 releases · Dec 2015 to Jun 2025Releases
latest 21-
v5.3.308 Jun 2025Release notes
Open source → -
v5.3.225 Apr 2025Release notes
Open source →What's Changed
- add readonly attribute support for input and textarea - thanks to @kkevinchoo
- improve Security service to be able to allow specific hosts
- update doc about Security service
- fix security issue on css background-image validation - thanks to Nikita Sveshnikov (Positive Technologies)
- fix security issue on image src validation - thanks to Nikita Sveshnikov (Positive Technologies)
- fix on Index creation if no bookmark - thanks to @rhulha
- fix tables getting moved to other pages and breaking styles by using specific class
html2pdf-same-pageon div container - thanks to @macr1408
New Contributors
- @rhulha made their first contribution in #833
- @kkevinchoo made their first contribution in #832
- @macr1408 made their first contribution in #826
Full Changelog: v5.3.1...v5.3.2
Release notes
Open source →- add readonly attribute support for input and textarea - thanks to @kkevinchoo
- improve Security service to be able to allow specific hosts
- update doc about Security service
- fix security issue on css background-image validation - thanks to Nikita Sveshnikov (Positive Technologies)
- fix security issue on image src validation - thanks to Nikita Sveshnikov (Positive Technologies)
- fix on Index creation if no bookmark - thanks to @rhulha
- fix tables getting moved to other pages and breaking styles by using specific class
html2pdf-same-pageon div container - thanks to @macr1408
-
v5.3.126 Feb 2025Release notes
Open source →What's Changed
- add new Security service, that can be overridden
- add some doc about new Security service
- fix security issue on scheme for cert html tag attributes - thanks to Aleksey Solovev (Positive Technologies)
- fix UTF8 example
Full Changelog: v5.3.0...v5.3.1
Release notes
Open source →- add new Security service, that can be overridden
- add some doc about new Security service
- fix security issue on scheme for cert html tag attributes - thanks to Aleksey Solovev (Positive Technologies)
- fix UTF8 example
-
v5.3.008 Jan 2025Release notes
Open source →What's Changed
- Fix casing of parameter type by @W0rma in #817
- Replace Travis with GitHub actions by @W0rma in #816
- Fix PHP 8.4 deprecation warnings by @W0rma in #815
- Add Strike HTML tag by @milan-ghevariya in #806
- Fix PHP version check by @W0rma in #819
- chore: upgrade TCPDF::$pdfa argument type as per upstream by @jankal in #820
- Refactor: use PHP_VERSION_ID for integer comparison instead of PHP_VERSION by @soanix in #821
- Add Figure HTML tag by @fredmatrack in #766
New Contributors
- @W0rma made their first contribution in #817
- @milan-ghevariya made their first contribution in #806
- @jankal made their first contribution in #820
- @soanix made their first contribution in #821
- @fredmatrack made their first contribution in #766
Full Changelog: v5.2.8...v5.3.0
Release notes
Open source →- bump supported phpversion from 5.6 -> 8.2 to 7.2 -> 8.4
- add html tag "strike" - thanks to @milan-ghevariya
- add html tag "figure" - thanks to @fredmatrack
- replace Travis with Github actions for CI - thanks to @W0rma
- fix casing of parameter type - thanks to @W0rma
- fix bad type hint on setModeDebug function - thanks to @W0rma
- fix fgetcsv usage for php 8.4 compatibility - thanks to @W0rma
- fix TCPDF::$pdfa argument type as per upstream - thanks to @jankal
-
v5.2.818 Jul 2023Release notes
Open source →- fix XSS vulnerabilities in examples
example9.phpandforms.php- thanks to Michał Majchrowicz, Livio Victoriano and Zbigniew Piotrak from AFINE Team
- fix XSS vulnerabilities in examples
-
v5.2.702 Feb 2023 -
v5.2.628 Jan 2023Release notes
Open source →What's Changed
- Added compatibility with PHPUnit 9 by @jausions in #733
- Added support of PHP 8.1 and PHP 8.2
- Removed useless files
New Contributors
Full Changelog: v5.2.5...v5.2.6
Release notes
Open source →- add support of PHP 8.1 and PHP 8.2
- add phpunit 9 compatibility - thanks to @jausions
- remove useless files
-
v5.2.503 Apr 2022 -
v5.2.416 Dec 2021Release notes
Open source →- revert fix multibyte aware substr when setting newline position - it causes pbs on some specific cases
- add security on scheme of css and image paths - thanks to Clément Amic and Antoine Gicquel from Synacktiv
Release notes
Open source →- revert fix multibyte aware substr when setting newline position - it causes pbs on some specific cases
- security #CVE-2021-45394 - add security on scheme of css and image paths - thanks to Clément Amic and Antoine Gicquel from Synacktiv
-
v5.2.319 Oct 2021Release notes
Open source →- add support for BASE64 encoded images also for backimg tag in page - thanks to @berengan
- fix issue on write2DBarcode parameters - thanks to @sarigue
- fix svg path parser - thanks to @CWBudde - issue #618
- fix html attribute parser - thanks to @Tofandel
- fix multibyte aware substr when setting newline position - thanks to @AndyTWF
- add php8 compatibility and fix tcpdf compatibilty - thanks to @humancopy
Release notes
Open source →- add support for BASE64 encoded images also for backimg tag in page - thanks to @berengan
- fix issue on write2DBarcode parameters - thanks to @Sarigue
- fix svg path parser - thanks to @CWBudde - issue #618
- fix html attribute parser - thanks to @Tofandel
- fix multibyte aware substr when setting newline position - thanks to @AndyTWF
- add php8 compatibility and fix tcpdf compatibilty - thanks to @humancopy
-
v5.2.222 Mar 2020Release notes
Open source →- allow usage of [[page_cu]] in css class names - thanks to @marbetschar - see example 15
- add support for BASE64 encoded images - thanks to @darius-heavy
- add Chinese local file - thanks to @Jaggle
- add powershell test script
- bump supported version from 5.4-7.2 to 5.6-7.4 - thanks to @coffeemedia
- fix issue on _drawRectangle where array offset was being accessed on value of type null - thanks to @coffeemedia
- fix issue on lower-roman style - thanks to @jigneshsolanki
- fix issue on composer autoload warning - thanks to @adrienfr
- allow usage of [[page_cu]] in css class names - thanks to @marbetschar - see example 15
-
v5.2.126 Oct 2018Release notes
Open source →- add
certtag - thanks to @LittleBigFox- add
balloonexample - issue #385 - change the name of all the examples from
exempletoexample - fix tag parser - css style corruption
- fix issue on relative margin calculation
- fix issue on border radius calculation
- fix issue on page background image width - issue #394
- fix issue on qrcode value with multi lines - issue #390
- fix issue on colspan usage when all the columns don't really exist - issue #360
- fix documentation - thanks to @noxlux and @tpohchai
- add
- add
-
v5.2.031 Jul 2018Release notes
Open source →- change the name of
CoreExtensiontoCore\HtmlExtension- change the namespace of all the html tags from
Tag\toTag\Html - change all the svg tag from internal methods to new external tags
- add the extension
Core\SvgExtension - add locale fi - thanks to @RWAP
- add
$marginTopparameter on thecreateIndexmethod - issue #333 - add
xx-largetoxx-smallfont-size management - issue #320 - add
colgouphtml tag - issue #306 - fix locale pt - thanks to @marcoshenzel
- fix issue on testing the filename when asking for string output
- fix issue - clean locale before PDF generation - thanks to @quimcalpe
- fix issue on radio/checkbow width - thanks to @Ohda
- fix issue on line number when using style tag - issue #338
- fix issue on svg draw path - relative move was not implemented
- fix issue on svg draw path when Z directive is not separate from the next directive - issue #308
- fix issue on justify text with an inline html tag at the end of a line - issue #258
- fix better doc
- change the namespace of all the html tags from
- change the name of
-
v5.1.023 Jan 2018Release notes
Open source →- add support of css
page-break-before:alwaysandpage-break-after:alwaysonDIVtag, based on PR #190 and PR #204- add no-html mode for debug output
- add php 7.2 compatibility
- add some unit tests, better coverage
- fix lots of bad method names and minor improvements, from PR #147
- fix bad cleaning after output or exception
- fix bad format detecting on
pagetag - issue #260 - fix changelog file
- add support of css
-
v5.0.116 Jun 2017 -
v5.0.015 Jun 2017Release notes
Open source →BREAK COMPATIBILITY
This new version is not compatible with the 4.x.x version.
Lots of classes / methods have been renamed, moved, deleted, exploded.
- change licence to OSL-3.0
- change PHP minimum compatibility to 5.4
- change Using Namespaces
- change all the classes have moved
- change all the classes have been renamed
- change new tag structure : one class per tag
- change output method does not allow bool value on
$destparameter anymore - change output method has been renamed from
Outputtooutput - change values for the footer
attributeof thepagetag - add PHP 7.0 and 7.1 compatibility
- add improve string handling for UTF8
- add better exception management
- add unit testing
- add support 'start' attribute for ordered list
- add russian language https://github.com/spipu/html2pdf/pull/131
- add Dimension-Parameter on barcode (for PDF417, Datamatrix = 2D) https://github.com/spipu/html2pdf/pull/127
- add
pdfaparameter on Html2Pdf constructor https://github.com/spipu/html2pdf/pull/122 - add new documentation folder
./doc/ - add new attribute to page tag
hidefooterwhich accepts a list of pages that gonna skip footer https://github.com/spipu/html2pdf/issues/162 - add protection on the fallback image if it does not exist
- add protection on thead and tfoot tags: they must contain at least one tr tag
- add norwegian locale
- fix a infinite loop case when reading a svg path
- fix issue from https://github.com/spipu/html2pdf/pull/177
- fix issue from https://github.com/spipu/html2pdf/pull/163
- fix bug on div position https://github.com/spipu/html2pdf/issues/73
- fix margin-bottom on table https://github.com/spipu/html2pdf/issues/108
- fix position of fallback image
- fix li bullet points altered by uppercase styles
- fix save PDF file on server https://github.com/spipu/html2pdf/issues/164
- remove old barcode type compatibility
-
v4.6.105 Apr 2016 -
v4.6.030 Mar 2016Release notes
Open source →- add Support 'start' attribute for ordered list
- add Enable RTL languages support
- add fallback support for images
- add Support 'start' attribute for ordered list
-
v4.5.102 Mar 2016Release notes
Open source →- Support the "inherit" value for font-family
- Allow the HTML font tag to define a color attribute
- Support for max-width and max-height attributes for images
- Fix "border: 0" being displayed
- Support the "inherit" value for font-family
-
v4.5.018 Dec 2015Release notes
Open source →- add tag 'end_last_page' with property 'end_height'. Update example 5 to use it
- better composer.json file
- update TCPDF from 5.0.002 to v6.2.12 => important changes. See the TCPDF changelogs
- add tag 'end_last_page' with property 'end_height'. Update example 5 to use it
-
v4.4.011 Dec 2015Release notes
Open source →- includes a new attribute to page tag 'hideheader' which accepts a list of pages that gonna skip header.
-
some doc fixes, rephrasing and removing french words
-
add composer management
-
Update autoload type
-
README more readable
-
add automatic generation of pdf test files
- script ./test/generate.sh
- You must have the html2pdf folder in http:/localhost/html2pdf/
-
fix: Set default font from PDF_FONT_NAME_MAIN constant from TCPDF, if available
-
fix: Make space-collapsing regexp Unicode-aware
-
fix: some pbs on examples to generate them automatically
-
- includes a new attribute to page tag 'hideheader' which accepts a list of pages that gonna skip header.