Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Print from OS 9 to an OS X network printer via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Print from OS 9 to an OS X network printer via AppleScript
Authored by: billclyde on Oct 15, '03 03:56:45AM
To get around not having a compatible program do this:

On the OS 9 box:
  • Make sure that your LaserWriter 8 extension is installed.
  • Use the "Desktop Printer Utility" to create a Translator (PostScript) desktop printer.
  • This will create PostScript files that can be shipped over to the OS X box.
I created a script that would automatically ship the file over
property spoolFolder : "MacHD:Remote Spool" as alias
-- Make sure that spoolFolder points to where you are saving the ps files
tell application "Finder"
    set theItems to every item of spoolFolder
    set theCount to count theItems
    if theCount > 0 then
        mount volume "afp://server_ip/drop_box_volume"
        duplicate theItems to folder "Drop Box" of disk "drop_box_volume"
        delete theItems
        put away disk "drop_box_volume"
    end if
end tell
I tried to make this a folder action, but it would not run unless the folder was open.

If you have a PostScript printer the file should just print without an external application.
If you are not so fortunate(like me) then the best way to print it is to convert it to a pdf file. To do this in AppleScript just add something like this to the folder action script on the OS X box.
do shell script "/usr/bin/ps2pdf -dPDFSETTINGS/printer " & source_file & " " & dest_file
Then delete the .ps file and print the .pdf file. This way the file will be printed with Preview or Acrobat Reader.

[ Reply to This | # ]