Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 76862

Summary: Printing text with LPRng/hpijs/hp920c loses lines
Product: [Retired] Red Hat Linux Reporter: P Fudd <ofudd>
Component: LPRngAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-26 20:14:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
Test print file, plain text showing lines and columns
Improved ASCII printer test page, designed to show data loss. none

Description P Fudd 2002-10-28 11:41:50 UTC
Description of Problem: 
  Printing a 70-line text file loses lines 62-65
  Printing a 90-column text file loses columns 81-90

Version-Release number of selected component (if applicable):
Fresh redhat-8.0 install, plus updates from website as of 2002-10-28

How Reproducible:

Steps to Reproduce:
1. Install RedHat 8.0
2. Configure HP DeskJet 920c
3. Print a 69-line, 90 column text file (included)

Actual Results:
Lines 62-65 don't get printed, and the second page starts with line 66.
Column 81 is half-printed, and nothing more.

Expected Results:
If I print a text file, I want to see the entire text file; missing lines of
text is a bad thing.  And long lines should wrap.

Additional Information:

Comment 1 P Fudd 2002-10-28 11:43:14 UTC
Created attachment 82364 [details]
Test print file, plain text showing lines and columns

Comment 2 P Fudd 2002-10-28 11:45:20 UTC
I used redhat-config-printer-gui to set up the printer.

Comment 3 P Fudd 2002-11-05 01:32:02 UTC
I'm an idiot.

After much debugging and changing of various shell scripts, I discovered that
the paper size was set to 'A4' in redhat-config-printer-gui, not 'US Letter'.

Postscript output looks perfect now.

Comment 4 P Fudd 2002-11-05 01:43:16 UTC
Ummm.... I closed the wrong bug.  Fixing the paper size fixed bug 76856.

After fixing the paper size, I'm only losing a single line of text, line 66.

And I'm attaching an improved test file.

Comment 5 P Fudd 2002-11-05 01:44:41 UTC
Created attachment 83624 [details]
Improved ASCII printer test page, designed to show data loss.

Comment 6 Tim Waugh 2002-11-05 12:01:32 UTC
Are you using 'convert text to postscript'?

Comment 7 P Fudd 2002-11-05 12:17:23 UTC

The HP Deskjet 920c (el cheapo inkjet printer, but better than other brands)
uses its own private language to do graphics, and so ghostscript (gs) calls
hpijs in order to print.

LPRng is taking my text file, running mpage on it (to make it postscript), then
ghostscript (to make it a bitmap), then hpijs (to make it into the printer

Mpage breaks the page at 66 lines, which is the normal number of lines per page.
Per US Letter page, I should say.

There is a database (XML) that foomatic looks at to determine the number of
pixels the printer can handle horizontally and vertically.  It gets passed on to
ghostscript and hpijs.

Comment 8 Tim Waugh 2002-11-05 12:26:49 UTC
Did you try unsetting that option?

Comment 9 P Fudd 2002-11-05 12:29:41 UTC
This printer doesn't accept plain text.  It can't handle it.

Comment 10 P Fudd 2002-11-05 12:30:30 UTC
So no, I didn't try unsetting that option.

Comment 11 P Fudd 2002-11-26 20:13:56 UTC
Umm....  do you have good recipe for crow?  Apparently the printer can handle
plain text.  I can now print 60 lines per page, and it doesn't lose any lines
between pages.

That said, I would rather get 66 lines per page, like all the other printers out
there.  I guess if the spacing between lines were just a smidgen smaller, or if
the font were a tad smaller, the 66th line would fit.

Mpage converts ascii to postscript in 66-line pages, and hands that off to
ghostscript and hpijs to deal with.  The silent truncation of those postscript
pages is the problem.

Comment 12 Tim Waugh 2002-12-12 15:58:33 UTC
The lines-per-inch can be changed easily with CUPS, so I consider this problem
addressed in rawhide.