marmistrz
marmistrz

Reputation: 6392

Why is this pdf file broken and how to fix it?

I'm considering the following page of a book. If it's being viewed in a web preview, it is displayed properly. If I download a pdf of this page, it seems to be blank. It only seems. The text can be selected and copied (in the Firefox preview and Evince (but not Atril))

While processing with pdf2djvu I get the following error

PDF syntax warning (97406879): Missing or invalid segmentation symbol in JPX stream

This problem makes the page unreadable. Is there any way to fix it?

/edit: I was suspecting a corrupt pdf since 2 separate viewers failed to read the page.

Upvotes: 1

Views: 825

Answers (1)

marmistrz
marmistrz

Reputation: 6392

Both Evince and the Firefox PDF preview seem not to handle JPEG2000 images properly. You can use ghostscript to fix the problematic page (source)

gs -dNOPAUSE -dBATCH -dPDFSETTINGS=/ebook -sDEVICE=pdfwrite  -sOutputFile=output.pdf input.pdf

Upvotes: 1

Related Questions