Author Topic: Down & Dirty Text Printing From C1000  (Read 3850 times)

the_oak

  • Sr. Member
  • ****
  • Posts: 426
    • View Profile
    • http://
Down & Dirty Text Printing From C1000
« on: May 30, 2008, 05:15:30 pm »
This is already mentioned in an "OFF TOPIC" thread, but I think it bears repeating here. This only allows printing text files from Zaurus to network printer. Nothing fancy, no graphics or formatted text printing. You need smbclient ipk installed, and need to edit your /etc/samba/smb.conf file and change your "workgroup" name to whatever it is. Also edit the line "hosts allow = 192.168.1" to fit your network. Next edit /etc/hosts and add a line like "192.168.1.xx    computername COMPUTERNAME" (using the IP address of your computer that your printer is connected to, and its network name). Restart smbd and nmbd (or restart the C1000). The command to print is:

cat /mnt/card/test.txt | smbclient //ATHLON/HPPSC500 \ -N -c "put - me"

Obviously the part that says "/mnt/card/test.txt" should be the path and name of the file that you want to print.
"//ATHLON/HPPSC500" should be the server and printer names that are on your network.
The "put - me" part just tells the printer who is sending the file (in this case, "me").

GOTCHAS:

File needs to be saved as a DOS text fie. (Textmaker
lets you do this.) My printer does not know how to
interpret Unix/Linux "new lines". It prints them as
stairsteps. Also printer does not know how to handle
print that is outside of margins. Margins appear to be
at 80 characters. So make sure that you hit the return
at the end of each line, (before 80 characters) and make
sure to add extra lines at the end of the file, or the last
lines will not print.

Now if someone could just code up a front end to take path, filename, printserver, and printer and feed it to this command, that would be very nice. Better yet if someone can also code up a filter that correctly interprets new lines, margins, and end of file info.

EDIT: Don't know if it matters, but this works with Cacko 1.23 ROM. (Probably with other ROMS too, but I only use Cacko, so that's the only one I KNOW works.)
« Last Edit: May 30, 2008, 05:20:03 pm by the_oak »
SL-6000L running Sharp 1.12 rom, (SOLD)
Fujitsu U820 with Windows 7
White Intel MacBook