Tools to test pdf compatibility and speed?
#11  MarjaE 06-13-2019, 10:32 PM
One big difference is that I compress images with k2pdfopt, but due to various bugs, I no longer compress images with ghostscript. If image compression is the biggest difference, then

(1) I can compare the sizes of

(compressed) k2pdfopt -ui -mode copy -dev dx -o %_k2opt\ dx


(uncompressed) k2pdfopt -ui -mode copy -o %_k2opt\ copy

using the relative sizes as a rough proxy for the relative delays. But I've got some with a 4.0:1 ratio and no trouble, and others with a 2.4:1 ratio and freezes.

(2) I can use

(uncompressed) k2pdfopt -ui -mode copy -p 1-10 -o %_k2opt\ test

using the sizes as a rough proxy for the delays. But I've got some freeze-prone files at the 2.2 MB range and tolerably fast ones at 4.4 MB.

#12  MarjaE 10-24-2019, 03:41 AM
I think I finally found a way to pre-check which pdfs are likely to take forever on my Kindle, or other slower devices. [P.S. gtime and gs are gnu-time and ghostscript.]

gtime -p -o input.pdf-timed.txt gs -dNOPAUSE -dQUIET -dBATCH input.pdf

In Mac Automator:

Application recieves files and folders as input.

Run Shell Script.

Set to use bash and recieve input as arguments, then:

for f in "$@"
base=`basename "$f" .pdf`
/usr/local/bin/gtime -p -o "$f"-timed.txt /usr/local/bin/gs -dNOPAUSE -dQUIET -dBATCH "$f"

It outputs a txt file listing how long it took for ghostscript to run through the original file. I don't think the suffix, base, and outputfile lines are actually needed.

 « First  « Prev   (2/2)
Today's Posts | Search this Thread | Login | Register