Link to home
Start Free TrialLog in
Avatar of mf999
mf999

asked on

Printing AS400 report in AS400 portrait mode on a HP laserjet that is setup for landscape

AS400 OS VR5R3   We are running an RPG400 program which outputs a file to  to a HP III Laser Jet Printer which is configured as an LPR printer with IP address.

By default the printer is prints output from the AS/400 in  A4/landscape mode.

I want the output for this program to print  in A4/portrait mode.

Below find some details about the spoolfile and printer file.


Here is some of the information from the spool file.
                                                         
 Page range to print:                                    
   Starting page  . . . . . . . . . . . :   1            
   Ending page  . . . . . . . . . . . . :   *END          
 Record length  . . . . . . . . . . . . :   80            
 Page size:                                              
   Length . . . . . . . . . . . . . . . :   66            
   Width  . . . . . . . . . . . . . . . :   80            
   Measurement method . . . . . . . . . :   *ROWCOL      
 Lines per inch . . . . . . . . . . . . :   6            
 Characters per inch  . . . . . . . . . :   10            
 Overflow line number . . . . . . . . . :   60            
 Fold records . . . . . . . . . . . . . :   *NO          



Here is some of  the information about the program printer file

   Page size                                     PAGESIZE                  
     Length  . . . . . . . . . . . . . . . . . :                 66        
     Width . . . . . . . . . . . . . . . . . . :                 80        
     Measurement Method  . . . . . . . . . . . :            *ROWCOL        
   Lines per inch  . . . . . . . . . . . . . . : LPI        6              
   Characters per inch . . . . . . . . . . . . : CPI        10            
   Front margin  . . . . . . . . . . . . . . . : FRONTMGN   *DEVD          
   Back margin . . . . . . . . . . . . . . . . : BACKMGN    *FRONTMGN      
   Overflow line number  . . . . . . . . . . . : OVRFLW      60            
   Fold records  . . . . . . . . . . . . . . . : FOLD       *NO            
   Degree of page rotation . . . . . . . . . . : PAGRTT     *AUTO          
   Hardware justification  . . . . . . . . . . : JUSTIFY      0            
   Print on both sides . . . . . . . . . . . . : DUPLEX     *NO            
   Defer Write . . . . . . . . . . . . . . . . : DFRWRT     *YES          
   Unprintable character action                  RPLUNPRT                  
     Replace character . . . . . . . . . . . . :            *YES          


Avatar of daveslater
daveslater
Flag of United States of America image

Have you set the page rotation to *COR?

dave
Avatar of mf999
mf999

ASKER

Hi Dave
Thanks for your reply.
I just recreated the print file and set the page to *COR as you suggested. The output is still the same, the print is in landscape mode rather than portrait.  Any other ideas?
mark
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mf999

ASKER

Thanks for the feedback.  Changing the Pagertt to 0 did the trick.   Just wondering what size lines and characters would you recommend as being a standard A4 size?
Mark:

*A4 is given as 210mm x 297mm. That comes to approx 8.27 x 11.69 in., not quite an exact match for normal *LETTER 8.5 x 11 in. stock. It's 2/3 of an inch longer, but a 1/4 inch narrower.

Now, consider that there might be physical nonprintable margins defined by the printer. Perhaps a half inch on the top and bottom and a half inch on the left and right sides. Or maybe the printer has no physical print margins at all, or somewhere between those two. Only your printer manual will tell you if physical margins exist and what they are, or if logical margins can be and/or have been set, and how to find out what those are.

With 8 1/4 inch physical page width and 1/4 inch margins left and right, at 10 CPI the maximum number of characters in a line with a fixed-pitch font would be 77 characters.

[((8.25 - (.25 + .25))=7.75)*10=77.5=~77]

Once you know of any margin requirements, the printable page area can be described in terms of printable width and length, number of characters per line (CPI) and number of lines per page (LPI). The font pitch can be adjusted to fit a different number of characters into a line. Variable pitch fonts can also make a difference.

As you can guess, there are numerous details that can affect any final determination. Any detail could be tweaked to make a difference.

An important item to keep in mind is that an externally described printer file (a *FILE object with PRTF attribute) is used by a running program. The program uses the PRTF to know what kinds of control characters to insert into the spooled file to result in the eventual physical output and other elements of the data stream. Once the spooled file is created, most of the PRTF attributes can't be changed in useful ways. If spooled output doesn't work on a given printer, it is quite likely that it needs to be recreated after adjusting the PRTF attributes or overriding them during regeneration. If any override is used regularly, it probably is best simply to create a new PRTF that incorporates that override.

Tom