• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Weird printing problems

postgrep

n00b
Joined
Jan 9, 2005
Messages
5
I just wanted to test my printer, and if linux could print from it, so I opened up vi and just made this:

2 2
2 2
2 2
2 2

etc for about 2 more lines. I then printed it by using:

cat new >> /dev/lp0 (where new was the file name).

But alas, the printed version looked like this:

2 2
(large gap) 2 2
(larger gap) 2 2
(huge gap) 2 2

Why is this? How can I fix the printing configuration?

( Using gentoo with 2.6.11-r6 by the way)

EDIT: For some reason, it auto formated.
 
You need to understand a few things about printers, and how most linux applications view them.

1st. The days of sending plan ASCII text to a printer for printing are pretty much long gone. That's the "old school" way it was done back when dot matrix printers were popular, and printers understood little more than ASCII characters and a few escaped control codes to select italics, bold, underline, etc.

These days, printers support one or more higher level print control languages, such as PCL or Postscript, or some proprietary format that often consists of mainly rows of color pixel data.

Copying ASCII text directly to the printer is only useful for testing the most basic connectivity between your computer and the printer. I.e. is it physically connected, can Linux see it, and have the appropriate drivers (Parallel Port, USB port, etc) been loaded.

2nd. Most Linux application were written to generate Poscript and send printed documents to the printer in that format. If you print a document from Mozilla, Mozilla creates a Postscript document. So do other programs such as OpenOffice, GIMP, etc. If you want to sent the contents of an ASCII text file, use a2ps to create a Postscript document containing the ASCII text.

So, the main challenge for you, is to get your printer to understand Postscript documents. That's usually done via a program called Ghostscript, which contains a large number of drivers for various printers, and a rasterizing engine that knows how to convert Postscript documents into the format your printer understands.

On most systems, you don't work with Ghostscript directly, but use a printing system front-end such as CUPS. Look up CUPS or go to www.linuxprinting.org. I'm not familiar with your distribution so I can't tell you exactly how to determine what's installed.

Since it's Gentoo, I'm assuming you're compiling everything from scratch.
 
wow, more than i ever wanted to know about printing (i print about 2 pages per month maybe, lol). that is great. thanks!
 
If you happen to have cups and KDE installed, the KDE printer configuration is by far the easiest way to add a new printer.
If you've got cups but not KDE, try going to http://localhost:631 , which should be the cups administration interface.

With that set up, you can use cups-lpr to print things from a console, or (if you are in X and have KDE) you can pipe them to kprinter to get a print dialog.
 
Back
Top