• 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: Possible to save a PDF as postscript file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible to save a PDF as postscript file?


  • Subject: Re: Possible to save a PDF as postscript file?
  • From: Richard Rönnbäck <email@hidden>
  • Date: Tue, 29 May 2007 16:36:43 +0200
  • Thread-topic: Possible to save a PDF as postscript file?

Mark,

That is absolutely splendid!

I can't express my gratitude enough - invaluable!

I did however spot one problem where it seems to behave differently from
when called by the print UI, in that it seems to use a default page size,
rather than the page size of the actual document.

Since you seemed to be familiar with the subject I hope you don't mind if I
ask you if you know something about that too?



Thanks again


And again, my apologies for posting the original post in another thread  by
mistake


// Richard



> Från: "Mark J. Reed" <email@hidden>
> Datum: Tue, 29 May 2007 10:13:58 -0400
> Till: Philip Aker <email@hidden>
> Kopia: Richard Rönnbäck <email@hidden>, AppleScript
> <email@hidden>
> Ämne: Re: Possible to save a PDF as postscript file?
>
> On 5/29/07, Philip Aker <email@hidden> wrote:
>> Can you please resend this as a new topic -- as it stands you've
>> kinda barged into Brett's thread with a post that has nothing to do
>> with Brett's issue.
>
> At least for folks with threaded mail readers.  Changing the subject
> is good, but insufficient; you need to compose a new message from
> scratch rather than using any of the "reply" functions.
>
> To answer the original question:
>
>> /usr/libexec/cups/filter/cgpdftops
>
> That program is part of the internal workings of CUPS, and so not
> designed in a user-friendly fashion.  You can use it, but be prepared
> for some seemingly irrelevant requirements.  It requires five:
>
> 1. The name of the job (as it shows up in the printer queue, usually
> as printername-##).  You can put any string you want here.
>
> 2. The user who originally submitted the job.  $USER is the safest
> thing to put here.
>
> 3. The title of the document.  Again, arbitrary.
>
> 4. The number of copies.  This one is important - assuming you only
> want to make one copy of the PostScript file, put a 1 here.
>
> 5. A set of options that are part of the print driver configuration.
> This argument is mandatory, so if you don't want to pass any options,
> you have to put an empty string here.
>
> To call it from AppleScript, it would look something like this:
>
> set pdfFile to POSIX path of (POSIX file "/Users/mreed/Desktop/menu_0407.pdf")
> set oldTID to AppleScript's text item delimiters
> set AppleScript's text item delimiters to {"."}
> set psList to {first text item of pdfFile, "ps"}
> set psFile to psList as string
> set AppleScript's text item delimiters to oldTID
> set shellCommand to "/usr/libexec/cups/filter/cgpdftops job $USER
> title 1 '' <" & quoted form of pdfFile & " >" & quoted form of psFile
> do shell script shellCommand

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Possible to save a PDF as postscript file? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Possible to save a PDF as postscript file?
  • Next by Date: Re: How to save a PDF as a postscript file?
  • Previous by thread: Re: Possible to save a PDF as postscript file?
  • Next by thread: Re: Splash screen for AppleScript bundle Apps?
  • Index(es):
    • Date
    • Thread