Quote:
Originally Posted by loviedovie
Can k2pdfopt optimize pdfs without changing the files? ...
|
Yes. The files from archive.org are viewer killers because they use JPEG-2000 compression (JPX encoding), which is very efficient, but more resource intensive for viewers to render. You can convert those PDFs to faster-rendering .png or .jpg with this command:
k2pdfopt -mode copy -odpi 300 sourcefile.pdf
You can adjust the output DPI to suit your preference. The above command does "Flate" (.png) compression. If you prefer .jpg compression, you can add, for example,
-jpeg 90 (90 specifying the quality level, 1 - 100). I've attached an example source and conversion using .png compression. You'll notice the converted file is much larger (5x) than the source file. This is the price you pay for the faster viewing.
Also, by default k2pdfopt tries to optimize contrast and changes the gamma factor of the text to make it darker on e-books. If you want to disable this "tinkering" with the source file, add these options:
-cmax -1 -g 1
If you want to see what encoding is being used in a PDF file, you can use the
-i option (or the INFO button or 'i' or CTRL-D in the MS Windows GUI):
k2pdfopt -i sourcefile.pdf