-   Linux - General (
-   -   printing using linux OS (

calsoftsateesh 03-23-2010 05:45 AM

printing using linux OS

I am trying to print some text written in gedit editor using cups. gedit editor convering the text data to postscript data and sending to cups. Is there any editor in linux which does not change the data format while sending it to printer.I need plain text need to be coming to cups with out any alter.


phi 03-23-2010 07:25 AM

what about

lpr -P<printerName> <filename>

tredegar 03-23-2010 01:38 PM

AFAIK gedit doesn't know anything about postscript, it's just a simple GUI text editor.
Why do you say "gedit editor convering the text data to postscript data and sending to cups"?

In gedit, you just do File-> Print. It prints.

If not, then perhaps you have not set up cups or your printer properly.

We can help you do that, but only if you tell us which distribution of linux you are running, and which desktop you are using (KDE, Gnome Xfce etc.)

Welcome to LQ!

devnull10 03-23-2010 01:40 PM

It sounds like you are using the "a2ps" command. You should use "lpr" if you want it printed "plain".

calsoftsateesh 03-24-2010 12:00 AM

Hi all,

Thank you for your prompt reply, I am printing some text using gedit by doing file->print. The cups filters being run are pstops, pstoraster. since the incoming data is in the form of postscript, these filters are being used instead of texttops.
My requirement is, I need to extract some text from the print data in cups filters. If the incoming data is in the form of text, I can easily search and extract the data but If I use the gedit editor data is in the form of postscript.
If I use the lp command to print, data is coming to filters with out any change(that is in the plain text form). But I my case have to use some text editor to print instead of lp command.
And I am using the fedora 11 with GNOME desktop.


phi 03-24-2010 08:04 AM

If you open your files using "gv" or "evince" they look as they shuld?

Then you could try


lpr -Praw <fileName>

tommyttt 03-25-2010 12:31 AM

As Tregegar said, gedit does NOT output postscript so it's happening somewhere else. Why do you need plain text to the printer? Does it not recognize it?

In gedit, when you view the print setup window, is there a setting telling cups to use a certain filter? And as phi suggested, save the file and send it directly to the printer (lpr is the print queque), so "lpr -P <XXX> <filename> just sends it there without filtering. The -P is the printer name as assigned by your system.

All times are GMT -5. The time now is 05:44 PM.