Re: Modify python script, or best way to extract PDF pages?
Re: Modify python script, or best way to extract PDF pages?
- Subject: Re: Modify python script, or best way to extract PDF pages?
- From: has <email@hidden>
- Date: Fri, 20 Jan 2006 11:15:44 +0000
Richard Ronnback wrote:
>Nor have I been able to use
>Automator and it's module for extracting pages, as it produces really whacky
>file names and I need full control over the output file names.
The Automator action writes files to a temporary location. You should capture those paths and rename the files yourself when moving them to their final destination.
>I do however notice that Automator uses a python script to do it's job, so I
>guess it would be possible to modify it. The script is located in "Macintosh
>HD:System:Library:Automator:Extract Odd & Even
>Pages.action:Contents:Resources:extract.py"
You can invoke that script from the shell if you prefer. e.g.:
python extract.py --input='/Users/foo/TEST.pdf' --output='/Users/foo/TEST 1.pdf' --slice='[0]'
will output the first page of the pdf to file 'TEST 1.pdf'. It wouldn't be much effort to hack up a version that outputs the whole lot in a single operation if you needed it; let me know.
HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden