mgufrone / pdf-to-html

PDF to HTML PHP Class using Poppler-Utils
MIT License
175 stars 88 forks source link

No styles for classes like ft00, ft01 etc. #58

Open KMV1 opened 4 years ago

KMV1 commented 4 years ago

Hi!

My output html file has classes like ft00 etc: <p style="position:absolute;top:1218px;left:638px;white-space:nowrap" class="ft00">Some text</p>

but it has not styles for this class. So font-size is incorrect in the result. And html page looks not like an input pdf.

Screenshots: https://drive.google.com/open?id=18qgcG72pKlWRcErFqEHZlNUYLpCMMeYO

While running a script there are some errors:

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /root/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector.php on line 171
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /root/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector.php on line 172

How I can fix it and how to get correct styles?