:NOPRTBDR OPTION=TOP, BOTTOM, LEFT, or RIGHT ORIENT=PORTRAIT or LANDSCAPE DATA = 720.To set 1/4 inch margins, change all the top and bottom no print border values to 360.
:NOPRTBDR OPTION=TOP, BOTTOM, LEFT, or RIGHT ORIENT=PORTRAIT or LANDSCAPE DATA = 360.
'1B266C2D31323055'
and the top margin control is '1B266C2D3132305A'
.
These controls do a negative registration of the 1/6" normal
no print border, so printing will start on the edge of the page.
If you want to just change the top margins, you can leave the other
tags as is.
/* 8.5X11 Letter PAGE SIZE */ :PAGSIZE PAGWTH=12240 PAGLEN=15840 DATA ='1B266C303241'X. /* A4 PAGE SIZE */ :PAGSIZE PAGWTH=11952 PAGLEN=16848 DATA ='1B266C323641'X.The page size is calculated using 1440ths of an inch. Therefore, for US letter 12240 divided by 1440 is 8.5 inches wide and for European A4, 16848 divided by 1440 is 11.69 inches long. The DATA value is sent in the datastream to represent that page size. Your source should contain entries for each possible page size.
CHGPRTF FILE(X) PAGESIZE(11.69 8.27 *UOM) UOM(*INCH) PAGRTT(90) /* A4 */ CHGPRTF FILE(X) PAGESIZE(11 8.5 *UOM) UOM(*INCH) PAGRTT(90) /* LETTER */When the resulting spooled-files are transformed, the transform function will match the spooled-file page size to the best fitting page size defined in your *WSCST object.
PAGRTT(90)
parameter tells the transform
function that the spooled-file contents should be rotated by 90 degrees so that
it can fit on the A4 or Letter page.
DRAWER()
parameter of the
CRTPRTF/CHGPRTF
commands.
:DWRPAGSIZ. :DWRPAGSIZE DRAWER=1 PAGWTH=11952 PAGLEN=16848. :DWRPAGSIZE DRAWER=2 PAGWTH=11952 PAGLEN=16848. :DWRPAGSIZE DRAWER=3 PAGWTH=11952 PAGLEN=16848. :EDWRPAGSIZ.These tags select the A4 paper-size, for printer-drawers 1, 2 and 3. Of course it is possible to specify a different page-size for each drawer number.
:DFTASCCP ASCIICP=850.You can use code pages 437 850 1051 or 1252 here. See our PDF file containing example code pages.
:EBCASCTBL. :EBCASCTBLE EBCDICCP = 37 ASCIICP = 850 DATA = /*0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */ '2020838485A0C68687A4BD2E3C282B7C'X /* 4- */ '268288898AA18C8B8DE121242A293BAA'X /* 5- */ '2D2FB63EB7B5C78F80A5DD2C255F3E3F'X /* 6- */ '9B90D2D3D4D6D7D8DE603A2340273D22'X /* 7- */ '9D616263646566676869AEAFD0ECE7F1'X /* 8- */ 'F86A6B6C6D6E6F707172A6A791F792CF'X /* 9- */ 'E67E737475767778797AADA8D1EDE8A9'X /* A- */ '5E9CBEFAB8F5F4ACABF35B5DEEF9EF9E'X /* B- */ '7B414243444546474849F0939495A2E4'X /* C- */ '7D4A4B4C4D4E4F505152FB968197A398'X /* D- */ '5CF6535455565758595AFDE299E3E0E5'X /* E- */ '30313233343536373839FCEA9AEBE900'X. /* F- */ :EEBCASCTBL.Where EBCDICCP indicates the code-page used by the AS400 to generate the report and ASCIICP which indicates the code-page you want to use with PCL. You can change the data table to give you the results you need. The values shown here are obtained from the Q037BF850 EBCDIC-to-ASCII translation table. Do a WRKTBL Q037BF850 at the OS/400 command line to view. The table is set up for EBCDIC with the first character of the code represented on the right column (/* 4- */) and the second character of the hex code in the top line /* -0-1-2 .... */. The first translation in the example is EBCDIC X'40' translated to ASCII x'20'. Unfortunately, to change one code point requires you to enter every code point.
:RASTERMODE
and change the source to read as follows:
:RASTERMODE SCS=NO AFP=YES.This change has some disadvantages, data-streams are longer and the PDF reader will no longer be able to recognize or select text in the PDF.
RTVWSCST DEVTYPE(*TRANSFORM) MFRTYPMDL(*HP4) + SRCMBR(HP4) SRCFILE(QGPL/QTXTSRC) + TEXT('Modified WSCST for HP LaserJet 4')This command will write the *WSCST source into member
HP4
in source-file QGPL/QTXTSRC
STRSEU SRCFILE(QGPL/QTXTSRC) SRCMBR(HP4)This command allows you to edit the *WSCST source in member
HP4
in source-file QGPL/QTXTSRC
CRTWSCST WSCST(QGPL/HP4) SRCMBR(*WSCST) TEXT(*SRCMBRTXT) + SRCFILE(QGPL/QTXTSRC) AUT(*LIBCRTAUT) REPLACE(*YES)This command creates a *WSCST object named
HP4
in library QGPL
.
CHGOUTQ OUTQ(PDFING) TRANSFORM(*YES) MFRTYPMDL(*WSCST) WSCST(QGPL/HP4)Here
TRANSFORM(*YES)
specifies that
host print transform wil be performed and
MFRTYPMDL(*WSCST)
and
WSCST(QGPL/HP4)
specifies that the *WSCST object you have modified is used.
CHGOUTQ OUTQ(PDFING) TRANSFORM(*NO) MFRTYPMDL(*WSCST) WSCST(QGPL/HP4) + USRDTATFM(PDFING/PDFING)This command specifies that all the spooled-file attributes will be sent to PDFing but only *AFPDS spooled-files will be transformed to PCL.