sabato 25 aprile 2015

Even the OVERLAYs shift

If you though that what explained here was referred only to the text fields in a SCS compiled as an AFPDS, you couldn't have been more wrong! Even the graphics is shifted in the same way, here explained a method to solve it:

1. Draw your OVERLAY normally


Draw it with Word, Publisher, Libreoffice, finish it off with Photoshop or Gimp, take it from a pdf file, scan a scribble... you can do whatever you want, the important thing is that the width and height of the page are the same of your printing (A4? 210 × 297 mm or 8.27 × 11.69 inches).

2. Set the printer driver

First of all, you must download it from here:
http://www-01.ibm.com/support/docview.wss?uid=nas8N1011940.
Download it, unzip it in a folder, create a new printer in the Windows Control Panel on a local port of FILE: type, search for the drivers into the folder where you extracted the files, and then install the driver called "Generic InfoPrint 300dpi AFP".

Now, with the right mouse button on the fresh created printer, click on Printing Preferences and then on Advanced. Here the so desired view:


The idea is to set the driver so that it cuts out the sheet's unprintable borders, the same that we inserted in the FRONTMGN parameter:


using millimeters

using inches

in this case inches are more accurate.

 


3. Import in the system

Print your layout on the newly created printer, a window will appear asking to save a file, you can use the name that you want, I'll name it layout.prn for convenience.
Now let's write down some command, first of all , transfer layout.prn on your system IFS, for example into /tmp, then create a new physical file:

CRTPF FILE(QGPL/QOVLSRC) RCDLEN(1024) MAXMBRS(*NOMAX) MBR(*NONE)
 LVLCHK(*NO)

file name, library and length are not so important, only copy layout.prn in a new member:

CPYFRMSTMF
 FROMSTMF('/tmp/layout.prn') 
 TOMBR('/qsys.lib/qgpl.lib/qovlsrc.file/layout.mbr') 
 MBROPT(*REPLACE) 
CVTDTA(*NONE) ENDLINFMT(*FIXED) TABEXPN(*NO) 

and then:

CRTOVL OVL(QGPL/LAYOUT) FILE(QGPL/QOVLSRC) MBR(*OVL)

in order to create the object LAYOUT typed *OVL in QGPL.

4. Place your OVERLAY at the beginning of the printable area





As for the title, place LAYOUT into your printer file:

OVERLAY(QGPL/LAYOUT 0 0) 

the (0,0) position point out the top left corner of the printable area set with the FRONTMGN parameter.


Feels good.




UPDATE (09/09/2015): inserted new images with the correct clip limits

Nessun commento:

Posta un commento