Author Topic: Print From Your Zaurus Through Your Mac!  (Read 4725 times)

icruise

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Print From Your Zaurus Through Your Mac!
« on: September 29, 2005, 11:38:48 am »
I was thinking the other day that it'd be nice to be able to print from my Zaurus, but it seems pretty complicated to enable printing in Linux. But then it hit me -- I have a Mac that's on all the time, always connected to a printer and ready to print. Why couldn't I somehow use my existing setup to print from the Zaurus? Obviously, you can manually copy the file you want to print over to your Mac and print it, assuming that it's in a format that the Mac will recognize. But this is a little clumsy and time consuming.

In order to use this method, you have to have some kind of network connection to your Mac. I've used it both with a wi-fi card and with my bluetooth card connected to the Mac (see this thread for information about setting that up). All you have to do is be able to send files to a certain folder on your Mac. You could use samba, but I use ftp.

You need to make a folder (we'll call it "Print") and attach the following folder action script.

Code: [Select]
on adding folder items to this_folder after receiving these_items
    try
  tell application "Finder"
      repeat with i from 1 to number of items in these_items
    try
        set this_item to item i of these_items
        set the path_string to this_item as string
        set the final_path to POSIX path of the path_string
        do shell script "/usr/bin/lp '" & final_path & "'"
    on error error_message
        tell application "Finder"
      display dialog "Error for item " & (this_item as string) ¬
          & ": " & error_message buttons {"Continue", "Cancel"} ¬
          default button 1 giving up after 120
        end tell
    end try
      end repeat
  end tell
    on error error_message
  tell application "Finder"
      display dialog error_message buttons {"Cancel"} ¬
    default button 1 giving up after 120
  end tell
    end try
end adding folder items to

I've attached a premade version of this script if you want to download it.

Just control-click (or right click) on the "Print" folder and assign this script to it. Then every time a new file appears in the folder, even via ftp, it will be printed automatically. It won't work with Word or Excel files, but generic file formats like txt, rtf, and jpg work. Now I can print from the Zaurus wirelessly. It's actually pretty cool.

jagrka

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
    • http://
Print From Your Zaurus Through Your Mac!
« Reply #1 on: October 01, 2005, 09:10:36 am »
I have been successful printing files from my Zaurus via the Mac. I have Printer Sharing turned on in the System Preferences. You will need to use a program called "lprng" on the Zaurus. You can download the ipk here. By using "lpr" command in the console, I can send a postscript or Word document to print on the shared printer connected to my Mac over the LAN.
You may need to change some settings to get this to work. I did it some time ago. It was more fun getting it to work than it was actually useful to print documents. Textmaker's print command supports lprng, but I had problems getting it to work smoothly.
Zaurus SL-C760/Sharp ROM 1.40 JP
Linux Kernel 2.4.18-rmk7-pxa3-embedix, Tetsu Special Kernel 14e
Transcend 2GB SD Card (with SD-Link11b driver)
Planex Communications GW-CF11H Wi-Fi CF Card
Kwins for PDA KW-H128C2 PHS Communications CF Card