With the solution from this question or this one :
gs -o file-with-outlines.pdf -dNoOutputFonts -sDEVICE=pdfwrite file.pdf
...I converted a pdf file with searchable text to one without searchable text. The file size however increased a hundred fold. I then used this solution:
convert -compress Zip -density 150x150 input.pdf output.pdf
..to make it smaller again. The Zip compression did a better job than jpeg in terms of image quality and resulting file size.
I noticed however that as I increased the 150x150 to 200x200 and eventually to 500x500, the image quality got better while the file size got smaller. I seemed to be getting something for nothing, although the processing time was getting longer for higher densities:
density | file size (kB) | processing time (s) |
---|---|---|
150x150 | 6430 | 27 |
200x200 | 5520 | 34 |
300x300 | 3504 | 50 |
500x500 | 2624 | 105 |
Does anyone understand what is going on?
update - sorry, I just realised that every time I increase the density it is losing pages! So that is not acceptable, it explains the behaviour but not why the pages are disappearing. Will investigate