View Single Post
Old 10-24-2019, 03:41 AM   #12
MarjaE
Guru
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 937
Karma: 53902736
Join Date: Jun 2015
Device: multiple
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 "$@"
do
suffix="-timed.pdf"
base=`basename "$f" .pdf`
outputfile=$base$suffix
/usr/local/bin/gtime -p -o "$f"-timed.txt /usr/local/bin/gs -dNOPAUSE -dQUIET -dBATCH "$f"
done

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.

Last edited by MarjaE; 10-24-2019 at 04:15 AM.
MarjaE is offline   Reply With Quote