Re: Possible to save a PDF as postscript file?
Re: Possible to save a PDF as postscript file?
- Subject: Re: Possible to save a PDF as postscript file?
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 29 May 2007 10:13:58 -0400
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