开发者

How to split PDFs (with applescript)

Does anyone know how to use the PDF kit thing to split pdfs in apple script, as i would like to split开发者_JS百科 my pdf documents in to pairs of uncoloured and some colour pages.

I have tried pdftk, as i was orignally writing a bash script, but it fails on my document, which was produced from LaTeX.


I'd look at installing Ghostscript via MacPorts or Fink. Ghost script has pretty simple command line arguments for doing what you want. You can then control it within an Applescript script.

Typically to split a pdf with ghostscript you do the following:

gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dFirstPage=m -dLastPage=n -sOutputFile=out.pdf in.pdf

Where m and n are page numbers.

You can merge pdfs with

gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf *.pdf


Automator has a "PDF to Images" choice which extracts all of the pages into individual pdf files... try that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜