Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Printing from the 1980s (Just kidding)
has no ratings.
Published: 04 Dec 2013
Revised: 07 Dec 2013 - 1264 days ago
Last viewed on: 23 May 2017 (2412 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Printing from the 1980s (Just kidding) Published by: Bob Cozzi on 04 Dec 2013 view comments(3)

I had to fix a printout/report this morning. This time, it was from the 1980s and needed to be "fixed" so it would appear on the LaserJet properly. I had to fiddle with the OVRPRTF command, and get it to appear on the 8.5x11 paper as it did back in the "green bar" days. They wanted it double spaced, for good measure.

I started playing with the Printer Configuration and had limited success. Then I tried monkeying around with the OVRPRTF command for the Printer File in question. I tried all kinds of things but then tried the following:

OVRPRTF QPRINT PAGESIZE(8.5 11) LPI(8) OVRFLW(60)

I got interesting results, but the output was still too small to read by the over 40 crowd. 

I then tried this:

OVRPRTF QPRINT PAGESIZE(8.5 11 *UOM) LPI(8) UOM(*INCH)  OVRFLW(60)

I was almost there, but the font was still a bit too big and the lines were truncating.

Then I remembered back when LaserJets first came out and we connected them via Client Access, you had to set the Characters per in to 13.3 when using Landscape mode. So I tried this setting:

OVRPRTF QPRINT PAGESIZE(8.5 11 *UOM) LPI(8) UOM(*INCH)  OVRFLW(60) CPI(13.3)   

That did it. Everything now prints perfectly. Certainly in Europe or countries where paper size A4 is used, you'd have to adjust accordingly, but that change made everything optimal size.  I also used the Page Rotation keyword set to auto (as follows) so that I get landscape mode without tweaking anything else, but you may not need to do that.

PAGRTT(*AUTO)

NOTE: The OVRFLW(60) (overflow line 60) setting is derived from 8 lines per in and 68 lines per page. 8 x 8.5 = 68. A big flaw that I see is that people forget that in landscape mode, 8.5 inch paper has 68 lines, not 88 as it does when in portrait mode. Hence, the overflow line is not line 80, but line 60 or there about.

What's old is new again. I feel like I just started coding and can't believe we still have to solve these types of "problems" for clients. I think this falls into the "forgot more than..." category.

 

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: Printing from the 1980s (Just kidding)
Posted: 3 years 5 months 19 days 17 hours 32 minutes ago

Another thing to be wary of: most laser printers have unprintable margins. This has two effects:

1. The printable page is shorter and narrower than the physical page. You might need to lessen the overflow line number to allow for this. Similarly, width-wise, you're going to get less than (page-width * CPI-value) characters in your print line. And, just to keep you on your toes, when you're in landscape, the printer's unprintable top and bottom affect your report's width, and printer's left and right affect report's length.

2. Line 1 of your page is not at the edge of the paper like it would be on greenbar; it's displaced by the unprintable margin. Similarly, column 1 is not at the left edge of the page; it's offset to the right a little bit.

I also tend to use PAGRTT(90) instead of *AUTO to force landscape. You're already controlling most of the other values, why not this one?

Posted by: Ringer
Premium member *
Comment on: Printing from the 1980s (Just kidding)
Posted: 3 years 5 months 18 days 12 hours 57 minutes ago

You're my hero Bob. 

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Printing from the 1980s (Just kidding)
Posted: 3 years 5 months 16 days 22 hours 2 minutes ago
Edited: Sat, 07 Dec, 2013 at 06:57:44 (1264 days ago)
Dale, yes, the CPI and page-width can fool you into thinking "I can squeze in a large font by switching to CPI(12)". But CPF(13.3) works and CPI(12) might work on A4 paper but not on U.S. Standard Plain 8.5x11 due to the page margins.