James Stephens

January 30, 2006

Fixing A Line Wrap Problem When Printing Using CUPS

Filed under: Unix Scripts — James Stephens @ 4:29 pm

A script is provided to fix lines not wrapping properly when printing text files from the Common Unix Print System (CUPS).

If you are having problems with lines being cut off when printing, replace /usr/lib/cups/filter/texttops with the script from “here”.

Alternatively, just link to it. e.g.

cd /usr/lib/cups/filter
mv texttops texttops.orig
ln -s asciitops texttops

I hope this helps.

2 Comments »

  1. Hello,

    I am new to this so any help would greatly appreciated.

    I have setup CUPS printing and created a print queue to print through the LPD/LPR procedure to a HP laserjet 5500HDN printer.
    I am running Red Hat Enterprise Linux AS release 4 (Nahant Update 3) on an HP Proliant DL585 server.

    I have chosen RAW as the print type for the above HP5500HDN printer.

    I can print a test page in colour and I can print postscript files but if the postscript file is PS-Adobe-1.0 then nothing is printed.
    However, I can print postscript files which are PS-Adobe-2.0 and PS-Adobe-3.0.

    The other problem I have is when I print a simple ASCII file then each line is printed like a step effect. See below:-

    This is line one
    this is line two
    this is line three

    Can you please assist me on these two problems?

    Thank you.

    Danesh..

    Comment by Danesh Qureshi — June 7, 2006 @ 4:40 am

  2. Make sure your printer has a ppd file. Use debug loglevel to see what ppd it’s trying to access, it should be $x in .

    *cupsFilter: “text/plain 0 texttops”

    Like etc/cups/ppd/queuename.ppd.

    Add that cupsFilter line to it, and it will be using that filter for text. The problem is twofold, not having a ppd for the queue name, and not having that filter name.

    That was my problem anyway, and to make this easier to find in google, I’m going to include the following keywords: cups printing ppd stair-stepping stair step stepping text cr/lf cr lf. I spent way too much time on this, and I found this site after fixing my problem. 5 minutes is too much to spend on this issue. Using debug2 and some common sense helped me here. You’re essentially never using any filters without the ppd being set up.

    Comment by Andrew — February 8, 2007 @ 6:07 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress

of StatCounter Code -->