• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Modify python script, or best way to extract PDF pages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modify python script, or best way to extract PDF pages?


  • Subject: Re: Modify python script, or best way to extract PDF pages?
  • From: Richard Rönnbäck <email@hidden>
  • Date: Sat, 21 Jan 2006 06:50:19 +0100
  • Thread-topic: Modify python script, or best way to extract PDF pages?

Thanks has!

I will try this out. In another of your replies I also saw that you showed
how to count the pages. Those two together will suffice to do what I need

For the quick and dirty solution that I am going for right now calling the
shell for each extraction is ok, but in the long run it would obviously be
best to do it properly.

I also have some questions about how to best start learning python, but I
make that a separate thread.


Thanks again

Richard Rönnbäck


> Från: has <email@hidden>
> Datum: Fri, 20 Jan 2006 11:15:44 +0000
> Till: <email@hidden>
> Ämne: Re: Modify python script, or best way to extract PDF pages?
>
> 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:
> edband.net
>
> This email sent to email@hidden


 _______________________________________________
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

References: 
 >Re: Modify python script, or best way to extract PDF pages? (From: has <email@hidden>)

  • Prev by Date: Re: Address Book: why doesn't this work?
  • Next by Date: [OT] spam at mac.com
  • Previous by thread: Re: Modify python script, or best way to extract PDF pages?
  • Next by thread: Re: Modify python script, or best way to extract PDF pages?
  • Index(es):
    • Date
    • Thread