Hi,
I'm looking for a way to resample the images in a pdf file to reduce file size, ideally on the command line. The big issue seems to be finding a solution that doesn't destroy the layers within the PDF (or OCGs if you want to be pedantic!)
I've tried converting the PDF file to PostsScript using pdf2ps and then using GhostScript like this...
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=myoutputfile.pdf -dPDFSETTINGS=/ebook myinputfile.ps
...to turn that Postscript back to a PDF which works nicely but I lose my Layers/OCGs.
Does anyone know a way of doing this either on the command line or (gulp) via Objective-C?
Thanks in advance,
Rob
I'm looking for a way to resample the images in a pdf file to reduce file size, ideally on the command line. The big issue seems to be finding a solution that doesn't destroy the layers within the PDF (or OCGs if you want to be pedantic!)
I've tried converting the PDF file to PostsScript using pdf2ps and then using GhostScript like this...
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=myoutputfile.pdf -dPDFSETTINGS=/ebook myinputfile.ps
...to turn that Postscript back to a PDF which works nicely but I lose my Layers/OCGs.
Does anyone know a way of doing this either on the command line or (gulp) via Objective-C?
Thanks in advance,
Rob