I have a pdf file which can only be opened with mupdf (both desktop and mobile) I've tried opening the same file with evince, okular, foxit reader and with my kindle paperwhite 2018. I ultimately tried the methods described here (ghostscript, pdftocairo, mutool clean) still no results.
Asked
Active
Viewed 2,594 times
1 Answers
2
I've finally found a way to manage this.
- You'll need
mutool(project page) - On fedora it's available in the package
mupdfyou can install it with the command:sudo dnf install -y mupdf
If you read the manpage, you may think that you need mupdf clean. However, if it doesn't work, what you'll need is mutool convert (documentation)
mutool convert [options] -o output input [pages]
The 'mutool convert' command converts an input file into another format.
In this specific case:
mutool convert -o output.pdf input.pdf
RMPR
- 141
gs -o repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress corrupted.pdfYou can find the output on pastebin
– RMPR Oct 15 '19 at 11:23pdftocairo -pdf print.pdf print_repaired.pdfThe ouput is the following :Syntax Error: Couldn't find trailer dictionary Syntax Error: Couldn't find trailer dictionary Syntax Error: Couldn't read xref table Error opening PDF file.– RMPR Oct 15 '19 at 11:27mutool clean input.pdf output.pdfthe output is the following :error: cannot recognize version marker warning: trying to repair broken xref warning: repairing PDF document– RMPR Oct 15 '19 at 11:41