The officially official Devuan Forum!

You are not logged in.

#1 2021-06-06 10:48:10

From: Somewhere off Atlantis
Registered: 2020-10-28
Posts: 107  

Guide on how to recover a corrupt pdf


In this instance I am referring to an Application I purchased this year. pdf Studio Pro 2020 by Qoppa, one of the few pdf editor software that still supports GNU/Linux (the other is Master pdf editor). I went for the Qoppa one based on high scoring reviews on 'alternative to' website. My corrupt file occurred because I had a failing hard drive which I was not aware of at the time. The application uses java and during failing hard drive phase I could not render the partially altered pdf (an Exam paper for a student with low vision). I did some searching and found this useful command line tool,


To fix a corrupt file:

pdftk <name of file> output fixed.pdf

i used 'fixed.pdf' as an example as it makes it easier to find.

Next I opened up the fixed.pdf in LibreOffice Draw and exported as fixedA.pdf on which I then open in Okular.

From here I could use the selection tool in Okular for highlighting text to copy to clipboard then drop into place in pdf Studio Pro 2020.

Now as for images I had enhanced using GIMP to delete labels, then enhance in Inkscape, because I now have the fixed.pdf open in LibreOffice draw I can select the modified images only without the labels to copy and paste into pdf Studio Pro 2020 - saved a lot of time of not having to start from scratch!

pdftk is available via Synaptic Package Manager.


Board footer