Re:Printing to PDF via GUI scripting
Re:Printing to PDF via GUI scripting
- Subject: Re:Printing to PDF via GUI scripting
- From: nino <email@hidden>
- Date: Thu, 06 Feb 2003 15:31:45 +0100
Philip Aker wrote:
>
I installed ESP GhostScript. It works with CUPS. I think I could now
>
print a Dagwood sandwich to PDF if paid. :)
>
>
Anyway, to print the files from an AppleScript, use a 'do shell script'
>
for 'lp' and get the current printer jobs with 'lpstat'. They both have
>
man pages. You may also stop a particular job or all jobs on a
>
specified printer with the 'cancel' command.
>
>
set res to (do shell script "lp " & "/path/to/file.ext;lpstat")
>
>
should return your job id. If you call 'lpstat' say in an idle handler,
>
you'll be able to determine that all the jobs in the current queue are
>
done when it returns nothing. The manuals are at:
>
<http://localhost:631>.
I don't know what a Dagwood sandwich is and your tips on how to produce a
PDF from any OSX application under Applescript control are just "Dagwood
sandwich" for me.
Can you please share a bit more of your achievements?
Are you suggesting to print using the "lp" unix command? if so, how would
you print, for example, a selected subset of a database records with a given
format?
Assuming you have printed something how do you use the job id to divert it
from its printing destination to a store-file-destination?
Most of us are poor Mac users trying to deal with the UNIX system under OSX
to have back a simple functionality that was available under OSs 7 to 9,
that is producing PDF files with a simple print command to a printer with
had PDFwrite as driver. Novadays under OSX all that seems a very complicated
task, do shell script and GUI scripting are required even for scriptable
apps.
nino
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.