The updated places that used `AcceptPageBreak` assumed that a page break was added and increased X by the margin. However, if the break wasn't added, it would put the text further to the right to the point that the width because so small or negative and no characters fit, causing an infinite loop.
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* GetCssBorderStyle Has Problem When !important Is Specified
This is, in particular, a problem for PhpSpreadsheet. See https://github.com/PHPOffice/PhpSpreadsheet/issues/1164. TCPDF thinks that there can be 0, 1, 2, or 3 components to shorthand border style, but there can be more, e.g. !important. Logic is rearranged to allow for more than 3. A new example file is added to demonstrate that the fix works correctly.
* Improved Example
Better code coverage.
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Fix call signatures on example 12 for PHP 8.1 strpos null errors
* Fix#401 - PHP 8.1 casts to int - getGDgamma - CoonsPatchMesh
Fixes: tecnickcom/TCPDF#401
* PHP 8.1 - cast in _RC4 before sending to str_repeat
* Enable back extensions on PHP 5.{3,4,5}
* Improve the test script to allow testing other PHP versions locally
* Fix typo on "parametrs" -> "parameters"
* Reduce possible side effects with the OS
* Fix#461 - fix barcodes handling using false, PHP 8.1 deprecation
Fixes: tecnickcom/TCPDF#461
* Fix#401 - PHP 8.1 casts to int - CoonsPatchMesh
Fixes: tecnickcom/TCPDF#401
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Footer and Header font signature fixes
* Fix constructor parameter
* More signature fixes
* Fix#413 - set setHeaderData lw param to int
* Typo fix
* Use better phpdocs for {header,footer}_text_color and {header,footer}_line_color
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Fix failing tests and failing tests not marking exit code as 1
* Make output safe of binary content and fix json extension depending tests
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Fix phpdoc and prefer null as default value
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
When using text-transform: uppercase, convert "&NBSP;" back to lowercase " " so that it is recognized as a space by Adobe Acrobat rather than printing out "&NBSP;"
* Fix type hints
* More accurate type hint
Co-authored-by: William Desportes <williamdes@wdes.fr>
* document void return
* document void return
* Update include/tcpdf_fonts.php
Co-authored-by: William Desportes <williamdes@wdes.fr>
* Fix type hints
Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Add a new example with composer
* Fix PHP 5.x failing testsuite setup
* Update .gitignore
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
Under PHP8, this generated warnings. If a tag is not set, it would throw a warning. Because the downstream usage of the $lineStyle can handle undefined entries, it's safe to leave them unset here.
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
* Add a @since on a function
* Refresh phpdoc blocks
Using `@param (\$[a-zA-Z0-9_]+)\s\(([a-z]+)\)`
* Fix phpdoc blocks
* Fix typos and phpdoc mistakes
* More phpdoc block fixes
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>