mgufrone / pdf-to-html

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

Сount(): Parameter must be an array or an object that implements Countable #57

Open BayardLifer opened 4 years ago

BayardLifer commented 4 years ago

I'm trying to get html from a pdf document, the output folder is created and html files are created and so on. But in the process of creating an error occurs. Снимок экрана в 2019-10-25 13-49-59 Снимок экрана в 2019-10-25 13-51-57

BayardLifer commented 4 years ago

image

KMV1 commented 4 years ago

Got the same errors: https://github.com/mgufrone/pdf-to-html/issues/58 Have you fixed it?

And are your styles of output html correct?

BayardLifer commented 4 years ago

Got the same errors: #58 Have you fixed it?

And are your styles of output html correct?

I just deleted the functionality that is called and leads to an error (this is a radical measure _ ). But the styles are lost, this is what I get: image

Unfortunately, if you use some online services with a similar conversion, you will get the same thing.
I did not find a solution how to get content from pdf as html :(

sitefaitbienfait commented 4 years ago

Hi, I had the same issue with php-html-parser v1.7.0. This is fixed in php-html-parser 2.0.0

I think this is related to this issue : https://github.com/paquettg/php-html-parser/issues/153

Regards

tusharsawant2427 commented 4 years ago

change line vendor\paquettg\php-html-parser\src\PHPHtmlParser\Selector.php At line 171 to 172 change code to if (!empty($rule['tag']) && !empty($rule['key']) && is_numeric($rule['key']) )

mlccapulong commented 4 years ago

Hi, I had the same issue with php-html-parser v1.7.0. This is fixed in php-html-parser 2.0.0

I think this is related to this issue : paquettg/php-html-parser#153

Regards

@sitefaitbienfait How can I update the php-html-parser? I'm using composer and it's a sub-dependency of pdftohtml-php and there's a fixed version for the php-html-parser on it's required section.