Re: [SLUG] Raw ASCII Printer

From: Ron Youvan (ka4inm@tampabay.rr.com)
Date: Tue Apr 22 2008 - 23:22:07 EDT


> I have a Panasonic KX-P1123 dot matrix printer that I want to use for basic
> text printing. As a 24-pin printer, it runs faster in native LQ mode and
> prints cleaner than what comes out of the Postscript driver. Right now it
> seems that KDE and CUPS insist on talking to it in Postscript, no matter how
> I configure it. I set up a raw printer in KDE for plain ASCII, and that
> seemed to take, but when I told Konqueror to print a sample ASCII text file
> to "Text Printer," the Panasonic spat out a huge quantity of Postscript
> instead of the three lines of text I had in the file.

> What did I miss? Do I need to send these ASCII jobs to LP0 from the command
> line instead of the GUI?

   Yes just divert the data to LPn (n is 0 or 1 or 2) I use:

#!/bin/bash
 

# /usr/local/bin/praw
 

# by Ron KA4INM Youvan NOTE: This assumes you are using a printer such as a
 

## dot matrix that can be fed only a line feed after every line, not a
 

## carriage return or a carriage return and linefeed, such as M$ printers expect.
 

filename=$1
 

OPWD=pwd
 

if [ -z $filename ] ; then
 

#clear
 

echo ' The filename is REQUIRED!!!'
 

sndcw 'n o f n '
 

exit 1
 

else
 

true
 

fi
 

clear
 

echo
 

echo
 

#
 

if
 

echo -n 'RAW printing of ' > /dev/lp0
 

echo -n $PWD"/" > /dev/lp0
 

echo -n $1 > /dev/lp0
 

echo -n ' on ' > /dev/lp0
 

date '+%B %-d %Y ' > /dev/lp0
 

echo > /dev/lp0
 

#
 

dog $1 > /dev/lp0
 

then
 

echo -e \\f > /dev/lp0
 

   snd doorslam
 

else
 

   snd error
 

fi
 

# END /usr/local/bin/praw

   here I use " /dev/lp0 "
   (SND sends a wave file to the sound system from the snd directory)

-- 
    Ron  KA4INM
         Youvan's corollary:  Every action results in
                              an unwanted side effect.
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:42:21 EDT