shebinleo / pdf2html

pdf2html is a module which helps to convert PDF file to HTML pages using Apache Tika. This module also helps to generate thumbnail image for PDF file using Apache PDFBox.
https://www.npmjs.com/package/pdf2html
Apache License 2.0
154 stars 33 forks source link

Stderr limit is reached and the processing stalls #59

Open peckanthony opened 9 months ago

peckanthony commented 9 months ago

Hi,

https://github.com/shebinleo/pdf2html/blame/79f4eff672ad924094acf971687ecf75f108385b/index.js#L22

By not listening to this event, the stderr filled up with warnings about fonts that were not installed and, according to this issue, this is why my processing stopped, the 'close' event was never sent.

Could you possibly listen to the event again or be able to pass an option for the stdio param? This has solved the issue on my system.

Thanks!

kriskratz commented 8 months ago

Can confirm. Uncommenting the stderr lines to clear the buffer fixed the hanging forever problem for me too.

Thanks @peckanthony