OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Print From Your Zaurus Through Your Mac!, Works with text, rtf, jpg files
icruise
post Sep 29 2005, 07:38 AM
Post #1





Group: Members
Posts: 292
Joined: 24-June 05
Member No.: 7,447



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
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.
Attached File(s)
Attached File  print_items_added_to_folder.zip ( 2.46K ) Number of downloads: 100
 
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
jagrka
post Oct 1 2005, 05:10 AM
Post #2





Group: Members
Posts: 80
Joined: 23-February 04
From: Tokyo, Japan
Member No.: 2,006



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.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th December 2014 - 02:51 AM