Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

How to handle special chars? #37

Open
erdely opened this issue Jul 10, 2017 · 0 comments
Open

How to handle special chars? #37

erdely opened this issue Jul 10, 2017 · 0 comments

Comments

@erdely
Copy link

erdely commented Jul 10, 2017

My code to convert pdf into html file is:

\Gufy\PdfToHtml\Config::set('pdftohtml.bin', '/usr/local/bin/pdftohtml');
\Gufy\PdfToHtml\Config::set('pdfinfo.bin', '/usr/local/bin/pdfinfo');

$pdf = new Pdf('MY_DOCUMENT_PATH.pdf');
$page = $pdf->html();
I tried to use $pdf->html() and $pdf->getDom(), I get the same error.

Everything is working fine but now in the pdf document are some special chars and I'm getting following errors message:

DOMDocument::loadHTML(): Invalid char in CDATA 0x1 in Entity, line: ...

I tried with $pdf->html() and $pdf->getDom(), I get the same error.

With libxml_use_internal_errors(true) I get no errors but after conversion there is double content.

How is it possible to avoid this error message or to remove special chars...?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant