The information in this document applies to all levels of AIX.
This solution is for PCL (text) printing only.
To have the printer print closer to the edge of the page you will need to send the printer one or more of the commands shown in the table below.
PCL Margin Commands |
||
---|---|---|
Command | PCL Command | Description |
Top Margin | ESC&l#E | Sets Top Margin based on current VMI Vertical Motion Index The default top and bottom margins are 12.7 mm (1/2 in.) A value of 0 will print in the top unprintable line. A value of 1 ESC&l1E will give a margin of about 3/16 of an inch. To adjust margins finer, you will also need to send a new VMI. |
Text Length | ESC&l#F | The number of lines should be no greater than the logical page length minus the top margin. The actual bottom margin will be determined by the VMI (lines per inch), the top margin, and this value. |
Left Margin | ESC&a#L | The left margin command sets the column which forms the left margin from the measured left edge of the logical page, based on the space width of the HMI Horizontal Motion Index. ESC&a6L sets the left margin at column 6, and printing betgins at column 7. |
Right Margin | ESC&a#M | The right margin command sets the column which forms the right margin, measured from the left edge of the logical page, based on the current HMI. For example ESC&a63M sets the right margin at column 63. |
Clear Horizontal Margins | ESC9 | Sets the left and right margins to the default settings. The text is bounded by the logical page. |
Set HMI | ESC&k#H | Set the Horizontal Motion Index to determine the column width. The parameter is an increment equal to 1/120 inch and is valid to 4 decimal places. ESC&k10H sets 1/12 in. column width. |
Set VMI | ESC&l#C | Set the Vertical Motion Index to determine the space between lines. The parameter is an increent equal to 1/48 inch and is valid to 4 decimal places. ESC&l6C sets 1/8 in. VMI. |
Set Lines Space | ESC&l#D | Alternative Method for lines per inch. This sets the lines per inch and valid values are 1, 2, 3, 4, 5, 8, 12, 16, 24, 48 (lines/inch). |
Because this is not really supported by the virtual printer, the method discussed here replaces all the virtual printer commands and do no formatting on the data. The following commands will print a page 64 lines long by 80 characters wide at 10 characters per inch. This does assume you have created a virtual printer.
Starting with a new virtual printer this configuration will allow many of the flags to still function.
Command To Initialize the Printer ci = %I[pU,pL,pU,pR,pL]%?%G_j%{1}%=%t%I[eP,c1,eT,eS,eO,ct,eF,eu,es,eC]%; %IpU INCLUDE: (Reset command) %IpL INCLUDE: (Command to set printer language) %IpU INCLUDE: (Reset command) %IpR INCLUDE: (Command to set printer resolution ) %IpL INCLUDE: (Command to set printer language) %?%G_j PUSH: (INITIALIZE printer?) %{1} PUSH: (Integer Constant 1) %= PUSH: (pop2 = pop1 ?) %t %IeP INCLUDE: (Select pitch - default is 10) %Ic1 INCLUDE: (Select the Roman-8 symbol set) %IeT INCLUDE: (Set Typeface/style/weight) %IeS INCLUDE: (Set Duplex/Simplex Mode) %IeO INCLUDE: (Specify the page orientation) %Ict INCLUDE: (Set line termination mode) %IeF INCLUDE: (Select font if specified) %Ieu INCLUDE: (Generate the paper source escape sequence) %Ies INCLUDE: (Set Page Size) %IeC INCLUDE: (Set the vertical line spacing (VMI)) %;
'\33&l' %G_t %d 'e' %G_l %d 'F'
Edit this value to show: You can play with the 505000 to adjust the bottom margin. Set the vertical line spacing (VMI) eC = \33&l%{505000}%Gwn%/%Pq%gq%{100}%/%d.%gq%{100}%m%2dC '\33&l' %{505000} PUSH: (Integer Constant 500000) %Gwn PUSH: (Effective Line Density (lines per inch x 100)) %/ PUSH: (pop2 / pop1) %Pq POP -> Internal Variable q %gq PUSH: (Internal Variable q) %{100} PUSH: (Integer Constant 100) %/ PUSH: (pop2 / pop1) %d POP -> ASCII String -> OUTPUT '.' %gq PUSH: (Internal Variable q) %{100} PUSH: (Integer Constant 100) %m PUSH: (Modulus of (pop2 / pop1)) %2d POP -> ASCII String (2 digits) -> OUTPUT 'C'