jrmuizel / pdf-extract

A rust library for extracting content from pdfs
364 stars 73 forks source link

Empty text output #62

Open Palmik opened 12 months ago

Palmik commented 12 months ago

Not sure if you are collecting such examples, but here's one:

The PDF: Model-Card-Claude-2.pdf pdftotext and pdf.js both work on this file.

whyayala commented 11 months ago

I want to piggy back onto this and say I also had a document that had a full page omitted from the output. Its a military technical manual.

More can be found here though I had only tested against the one I linked above.

jrmuizel commented 10 months ago

The cause of the problem with Model-Card-Claude-2.pdf is an upstream problem in lopdf. I've filed a PR for it here: https://github.com/J-F-Liu/lopdf/pull/245

jrmuizel commented 10 months ago

I want to piggy back onto this and say I also had a document that had a full page omitted from the output. Its a military technical manual.

@whyayala which page was omitted?

leumasme commented 5 months ago

Upstream PR was already merged and released but the issue persists in pdf-extract 0.7.4, I believe because cargo.toml depends on lopdf "0.30.0" which won't match "0.32.0".
Can deps be bumped to fix this?

leumasme commented 5 months ago

Can confirm that bumping lopdf to 0.32.0 fixes text output for the pdf linked in this issue and doesn't seem to break anything. Some different samples are still outputting an empty string, so there seem to be more issues that cause this symptom.