Submitted by Kim Egekjaer on Fri, 07/31/2009 - 00:00
Forums

Part 1: The simple conditioned overlay

In a previous post (http://www.system-method.com/node/631) I revieled the new (undocumented) feature of the if..then in the green screen designer - which is yet to be implemented in the graphical designer. Perhaps because of this I was asked recently to describe the conditioned overlays in details as it seemed to be hard to understand for a specific customer.

Well I am a nice guy (as you know ;-)), so here I will try to chew my way through the conditioned overlays and describe how to fully use the potential of this feature.. I will describe the functionality as it is shown in the green screen as it fits this media best, but of course you can do the exact same in the graphical designer and I even think it is usually easier to define in the graphical designer. (Please, please ask if I should prove my point..). (I will concentrate on the graphical designer in a later post).

The conditioning in InterForm400 is a very strong feature, so I will need much more of your time to fully describe this functionality, so in this post I will start out with the somewhat simple setup of conditioning called part1. I will build up the description in the technical tips of the coming months...

Each time I talk about this function I quickly start to talk about relative and absolute positioning and suddenly the eyes of some training participants start rolling ;-), but it is not that hard to understand.

 

First ask yourself this:

You want to insert or change 'something' in the output depending on something.

Should the 'thing' that you are inserting or changing be placed in a fixed/absolute position (no matter if the condition is found to be true in line 1 or 60) or should the 'thing' be placed relatively to the line in which the condition was found?

Relative positioning is in my point of view needed in at least 99 times out of 100, so that is the answer if you are in doubt...

So relative positioning should e.g. be used if you want to insert one or more elements like frames, lines, images, fixed texts or remapped/tabulated texts in a place in the output, that depends on where the condition was found: If the condition was found in line 1 you want to place the element(s) higher on the page than if it was found in line 60.

Lets imagine that the overlay is a portrait overlay and you have found out that the placement should be relative, then you can now fill out this in the if..then line:

Upper edge _____  A/+/-  +

Left edge  _____  A/+/-  A

So for the 'Upper edge' you can now enter either a '+' or '-' as shown above. Here I just assume it is a '+'.  For the 'Left edge' you should NOT enter either '+' or '-' as this will cause a nasty horizontal displacement in pdf output (and it is not logical to enter anything else anyway..).

So the only thing we have actually found out is, that you enter 'A' for the 'Upper edge' if it is absolute positioning and '+' or '-' for relative positioning... Lets still assume it is relative positioning then the next question is: Should it be a '+' or a '-'???

To answer that first take a look at the main overlay which you merge the spooled file with:

Design InterForm 400 overlay

Overlay name     DEMO

Overlay text     _______________________________

Line spacing     040  

Please notice that we here have a line spacing. That is VERY important when you use relative positioning. If you merge your spooled file with an empty overlay with the same line spacing (and the same extended page definitions if used), then the point of reference in the vertical (and important) direction is the lower part of the letters in the line in question. You can print this result out and compare with the actual positions of the text in the merged spooled file if you want to be able to actually measure the distance you want to reposition.

So find an example of a spooled file line, where the condition is true: Do you want to insert any elements above the point of reference?  If you want to insert anything above this point the sign must be '-' i.e. we want to place the conditioned overlay ABOVE the reference point. That will be position 0 from the top in the conditioned overlay.

Lets imagine that you want to insert a frame around the spooled file text in question then you will need to reposition

Now the '+' or '-' is combined with the distance written directly next to 'Upper edge' like below:

Upper edge _0,040  A/+/-  -

Left edge  ______  A/+/-  A

Above we are placing the conditioned overlay 40 pels above the base of letters of the line in question (because the line distance is 40 pels and we want the frame to fit exactly the current line). This means, that if we want to place a small frame just around the line in question, then we can insert it in the conditioned overlay (e.g. called FRAME), that we are calling with this line:

Seqnbr. Type                                     Inch.pel       Repetition

   1.0   1    Frame         Top edge             0.000          Move right

                      Left edge            0.120          Move down

                     Right edge           6.120          Extra times

                     Bottom edge          0.040

                     Thickness in pels        2

So if we combine the line above in a conditioned overlay called FRAME with this line in the main overlay (e.g. called MAIN), then we insert a frame around every line with an 'I' in position 8:

1.0   ?    If . . . . . Input line     1 -  66                            

                        Position       8 -   8                            

                        Is > = < N   = I                                  

     Then . . . . Overlay      FRAME      Nos. of lines to remap 00 

                        Upper edge     .040  A/+/- -                      

                        Left edge            A/+/- A                      

                        Blank after          B = blank original text

So in this way we can now insert up to 66 conditioned frames with the two lines above. That is something that only very few InterForm400 competitors can do - if any... (have you seen it elsewhere? If yes: Please tell me!) It might be an idea to try it out with the demo spooled file of InterForm400. (Printed out via option 1 on the service menu).

Just to explain how the frames will be positioned: Whenever the condition is met, then the conditioned overlay is called, but just before that the current position is noted e.g. 1 inch from the top of the page. The position is relative with a minus. This means, that the 0.040 inches (=40 pels) is subtracted from the 1 from the top. This adds up to 0.200 (or 200 pels from the top - remember that there are 240 pels to an inch...). Inside the conditioned overlay the top of the frame is set to 0, so 0 is added to the 200 pels meaning that the frame will in this case start 200 pels from the top. The frame is 40 pels high so the bottom of the frame will be 1 inch from the top of the page. The same arithmatic is done each time the condition is true.

You want to present the current line in the spooled file (where the condition is met) in a special way e.g. in bold? If yes, then you will need to transfer not 0 lines, but at least one spooled file line onto the conditioned overlay. You state that in 'Nos. of lines to remap'. As default it is 00, but try to change it into 1 above:

1.0   ?    If . . . . . Input line     1 -  66                            

                  Position       8 -   8                            

                 Is > = < N   = I                                  

     Then . . . . Overlay      FRAME      Nos. of lines to remap ­­_                  Upper edge   _0.040  A/+/-                     

                 Left edge            A/+/- A                      

                  Blank after          B = blank original text

Now edit the conditioned overlay (FRAME) and insert e.g. a remap window line like this:

Seqnbr. Type                                                                  

   2.0   9   Remap window  Input line      __1 -   1  Position   180      

       Print:        From upper edge  .031   Line spacing . .    0      

                     From left edge          Ignore blank lines   N (Y N)

                    Adjustment      U       (U L R C N B E +)          

                    Rotation        000                               

                    Font             110      F4=List                  

                    Blank original  B      B = blank original version

In this way we are outputting the spooled file line in bold instead of normal.

We could of course go on and insert other elements (images, lines fixed texts etc.) in the conditioned overlay called frame.

I include a PDF file (ConOverlay1.pdf) to illustrate the result this setup will give you when you merge.

In the coming technical tip of the month I intend to go into all the conditions you can use with InterForm400 in every way. This is a large subject with which I can intertain you for a few hours ;-). Please tell me if you specifically want me to go through some specific detail.

Kim Egekjaer

Thu, 08/27/2009 - 00:00

Part 2: Defining conditioned overlays with the graphical designer

 In the previous post about conditioned overlays I went through the conditioned overlays with InterForm400. This post focused on the green screen interface, but as I mentioned you can do the same in the graphical designer - very often easier and faster.

To prove my point I have created a small movie and document to take you through the steps of creating a simple conditioned setup, where a frame is added whenever a special type of line is found. To make it a bit more difficuilt I also wanted to push down the rest of the spooled file to make space for a large frame and large text. 

 Read all about it  here

See the movie here 

Part 3: Reposition conditioned overlays. You can do more than you know...

In the post of August I showed you a small movie pointing out how easy it is to use conditioned overlays with the graphical designer. I actually also pushed the spooled file down (conditionally) to make room for a large font and frame that should be inserted for some lines. But you can actually reposition the conditioned overlay (and the rest of the spooled file) in more ways than this. If you setup the green screen to call a conditioned overlay and you move at least one line onto the conditioned overlay like below, then you will get a few extra options:

(Please notice that I do NOT use '+' or '-' for both 'Upper edge' and 'Left edge'!!)

------------------------------------------------------------------------------
         Design InterForm 400 overlay                                 APF300D 

Overlay name: MAIN        Overlay text:                                       

Seqnbr. Type  Overlay definition                                              

 0001    ?    If lin 030-066 pos 001-020 N                     Then MOVE_UP   


Seqnbr. Type                                                                  

 1.0     ?    If . . . . .  Input line    30 -  66                            

                            Position       8 -  13                            

                            Is > = < N   N                                    

              Then . . . .  Overlay      MOVE_UP    Nos. of lines to remap  1 

                            Upper edge           A/+/- +                      

                            Left edge            A/+/- A                      

                            Blank after          B = blank original text      


F3=Exit                                       F11=Delete    F12=Cancel        

F13=Set view/print parameters   F14=PCL-view       F18=DSPSPLF   F19=DSPPFM
----------------------------------------------------------------------------------------------------------------

 

When you hit Enter you will see this window:

-----------------------------------------
Vertical cursor repositioning             
before execute of sub overlay             

Position related to actual position

  Number of pels . .  ____   ( -99 - 99 ) 

Or reposition related to previous         
non blank input line

  Number of pels . .  ____   ( 0 - 999 )  

Or reposition after execute of suboverlay 
related to highest Y-adress used in any   
remap window in sub-overlay.

  Number of pels . .  ____   ( 0 - 999 )  

F3=Exit           F12=Cancel
-----------------------------------------

 

Now you have the 3 options above to reposition the conditioned overlay (and the subsequent spooled file lines):

a) Position related to actual position

With this feature you can chose to push the conditioned overlay (and the rest of the spooled file) a number of pels up or down (if the condition is true).

With a default line distance of 40 pels you can e.g. insert a blank line by inserting 40 here. You can also insert a negative value to reduce the line distance.

 

b) Reposition related to previous non blank input line

Use this option if you have a lot of empty lines in the middle of the spooled file, but you do not know exactly how many, and you want to pull up the rest of the spooled file below to fill out the gab. If you change the condition above to remap the rest of the page e.g. 40 lines and change the condition to search for position 8-13 = Should, combined with Reposition related to previous non blank input lines = 40, then you may notice that the gab in the demo spooled file is removed on page 1, 2 and 4 (where 'Should' is found).

 

c) Reposition after execute of suboverlay related to highest Y-adress used in any remap window in sub-overlay

This option as marked in blue above is not documented in the manual as it was introduced VERY late in the 2009 versions. This can help you to make full use of the extended adjustment in the remap window and tabulator. The extended remap can change the line breaks and the spacing between words to make full adjustment. The problem is however that you do not know how many lines it will be converted into, but with this new feature you do not even need to know. It will reposition the following conditioned overlays with this parameter.

Please notice that this feature is not included in the designer yet.

I attach an export file with a simple setup to illustrate. Just merge the MAIN overlay with the demo spooled file and notice how the lower lines behaves ;-)

Part 4: Combining remap windows, conditioned overlays and tabulators

In my previous posts about I have showed you quite a few tips of how to use conditioned overlays to the full with InterForm400. Here I will go through the strange things that happen when you combine the 3 functions on the same spooled file text:

The most important thing to remember is the sequence in which these functions are executed:

  1. First the remap window lines in the main overlay are executed
  2. Secondly the conditioned overlays are called
  3. Finally the tabulators in the main overlay are executed

This means that if you insert a remap window in the main overlay you should take VERY good care not to remove any text that you want to use for a condition later for a conditioned overlay (remember the remap window in the main overlay may be listed after the conditioned overlay that does not matter). In fact if you are trying to call a conditioned overlay and it is NOT called, then the most likely problem is that you have forgotten this fact.. If I had 1 euro for each time I have reminded a customer this,  I would be driving a Lotus Elise ;-). The second guess would be that you would need to activate 'Merge overprint lines' on the merge in InterForm400, if the first suggestion did not help...

For the complete details of the sequence please refer to the section called 'How the sequence lines in overlay design are executed' in the InterForm400 manual on page 85.

If you would need to combine a remap window in the main overlay with a conditioned overlay (if..then), then you must remember to state that the original should NOT be removed in the remap window. It is called 'Blank Input Text' in the remap window. You might then think, that you should simply insert a tabulator in the main overlay to remove this original text, and that partially correct: If the conditioned overlay is not called (or if it is getting the spooled file line in question), then that is enough. Please remember that if you transfer at least 1 line onto the conditioned overlay, then you will need to remove the text here.


Generally if you want to remove (not just reposition) text from the spooled file you should use the tabulator to do that, because of this:

1) You can always override any remove by using a remap window.

2) When you remove data with the tabulator it is really gone. If you use the remap window (and place the text outside the printable area), then the data is still searchable text in the resulting PDF files even tough you cannot see it. 

Part 5a: Using A and U in conditions

Last month I thought this would be the last post about conditions in overlays, but there is material enough to last at least the rest of the year ;-)

In the 'good old days', when we did not have the graphical designer, there was a hidden feature of the conditions in the overlays:  For a condition you can state the comparison operators: '> = < N' as clearly seen in the green screen 'designer'. However there are another 2 possible operators: 'A' and 'U' (They are clearly seen in the graphical designer). They where earlier unknown to most and I have once in a while used them as an extra 'Ace' to have up my sleve, when getting a challenge for a design. Anyone that I have ever trained will have heard about the most obvious way to use option A:

Consider this condition:

Seqnbr. Type                                                                 

   1.0   ?    If . . . . .  Input line    13 -  13                           

                            Position      56 -  60                            

                            Is > = < N   A 1234567890                           

              Then . . . .  Overlay      TEST_OK    Nos. of lines to remap 00

                            Upper edge           A/+/- A                     

                            Left edge            A/+/- A                     

                            Blank after          B = blank original text     

F3=Exit                                       F11=Delete    F12=Cancel       

F13=Set view/print parameters   F14=PCL-view       F18=DSPSPLF   F19=DSPPFM

 

This is a classic way to use the 'A' condition meaning 'Acceptable characters'. This example is built for the InterForm400 demo spooled file, that you can print out via the service menu in InterForm400. The condition means that if all characters found in the spooled file in the specific line (here only line 13 is inspected) in the interval of positions (here 56-60) are found in the string specified, then the overlay is called. So it means that only if ALL the characters from position 56 to 60 are numeric, then the conditioned overlay is called. If you try the test above on the InterForm400 demo spooled file you might be surprised: The overlay TEST_OK is never called!!! What??? Am I just pulling your leg ;-) Why?......

This would be an obvious test to check if you are awake..... You may think this:
Aha the character in position 56 in line 13 is NOT numeric, so that is why!
Answer: Yes, you are right. If you change the condition to scan the positions 57-60, then it works fine.

The tricky/funny questions are then:
a) The number written (0123456789) also include a trailing space, so it should have worked.. Why not?
b) Since it is not working: How on earth can we check for a space as well as the numbers above???

Answer to question a): The string entered above is simply trimed of any trailing blanks, so that is why the space in position 56 is not accepted.
Answer to question b): You simply insert the space as the first character in the condition like this:

Seqnbr. Type                                                                 

   1.0   ?    If . . . . .  Input line    13 -  13                           

                            Position      56 -  60                           

                            Is > = < N   A  1234567890                        

              Then . . . .  Overlay      TEST_OK    Nos. of lines to remap 00

                            Upper edge           A/+/- A                     

                            Left edge            A/+/- A                     

                            Blank after          B = blank original text

 

You see the difference? There is a very important space in front of '1234567890' and now it works fine...

That should have explained the 'A' feature. I initially misunderstood the 'U' option (meaning unacceptable characters). To avoid that anyone else should also misunderstand this, I here will explain exactly what it does: It is simply the same as the 'A' option - negated. So if the 'A' condition is false the 'U' will be true for the same setup (and vice versa). You could explain the 'U' option as: Call the overlay, if not all characters in the interval of positions are found in this list of characters.

Part 5b: A workaround for empty lines

I had a special question from one of our new business partners the other day. In short the question was: I want to insert a shaded frame in the merged result into the places in the spooled file, where the lines are totally blank, but the conditioned overlay does not work..??

The short answer is: Totally empty lines are not 'seen' by InterForm400 (exactly like in DSPSPLF) so you cannot call the conditioned overlay, if you condition it like this:

Seqnbr. Type                                                                 

   1.0   ?    If . . . . .  Input line     1 -  66                           

                            Position       17 -  46                           

                            Is > = < N   =                                   

              Then . . . .  Overlay      FRAME      Nos. of lines to remap 00

                            Upper edge     .040  A/+/- -                     

                            Left edge            A/+/- A                     

                            Blank after          B = blank original text

(The idea is, that the FRAME overlay should insert a shaded frame)

So this does not work..!!?? How can the problem then be solved?? The answer is 'simply' to first unconditionally insert shaded frames all over the output and then remove the frames that are not needed...

Assuming that we do not need any lines around the frames we can simply insert a shaded frame covering all the lines first and then clear the areas where some text is found. For the InterForm400 demo spooled file the setup could look like this:

The first line inserts a shaded frame on most of the output:

Design InterForm 400 overlay                                 APF300D

  Overlay name: BLANKCOND   Overlay text:

Overlay definition                                             

  0001    1    Frame  top 02.120  left 00.057  right 08.000  bottom 11.000    

  0002    ?    If lin 015-066 pos 017-046 N                     Then FRAME    



 Seqnbr. Type                                 Inch.pel     Repetition         

    1.0   1    Frame         Top edge            2.120     Move right         

                             Left edge            .057     Move down          

                             Right edge          8.000     Extra times        

                             Bottom edge        11.000                        

                             Thickness in pels             NW NE SW SE        

                             Round/Sharp (R S)  S  Radius                      

                             Pattern, B/W-prt   D  F4=List                    

                             Pattern, color-prt D  F4=List                    

 F3=Exit      F4=Prompt                  F11=Delete          F12=Cancel        

 F13=Set view/print parameters   F14=PCL-view       F18=DSPSPLF   F19=DSPPFM

 

The second line calls another overlay to remove the frame from the current line if any text was found:

Seqnbr. Type                                                                 

   2.0   ?    If . . . . .  Input line    15 -  66                           

                            Position      17 -  46                           

                            Is > = < N   N                                   

              Then . . . .  Overlay      FRAME      Nos. of lines to remap 00

                            Upper edge     .040  A/+/- -                     

                            Left edge            A/+/- A                     

                            Blank after          B = blank original text

 

And the other overlay (FRAME) erases the frame of the current line:

Overlay name: FRAME       Overlay text: 

Seqnbr. Type  Overlay definition                                             

 0001    1    Frame  top 00.000  left 00.057  right 08.000  bottom 00.040    



Seqnbr. Type                                 Inch.pel     Repetition         

   1.0   1    Frame         Top edge                      Move right         

                            Left edge            .057     Move down          

                            Right edge          8.000     Extra times        

                            Bottom edge          .040                        

                            Thickness in pels             NW NE SW SE        

                            Round/Sharp (R S)  S  Radius                     

                            Pattern, B/W-prt   0  F4=List                    

                            Pattern, color-prt 0  F4=List

 

You can use the same way to first insert some graphics (unconditionally), and then delete it again if a specific condition is met. Next month I expect to show you 'my' variable frame, that I usually show during technical training sessions..

There are also other things I want to show you next month: E.g. the intelligent way to create labels in InterForm400 (many labels on one page).

Part 6: The right way to create labels

Last month I promised you to dig into the details of the right way to create labels, and now is the time to deliver ;-)

During the last month I had a question from a customer running an old 2003 version of InterForm400 and this customer had hit the old limit of the max. 1500 spooled file lines, that can be remapped (using remap window). This limit could be fixed simply by upgrading to a newer version of InterForm400, but the main problem was (as I told in my answer) is NOT the limit in InterForm400, but that this indicates, that the customer is using InterForm400 in a wrong, inefficient manner. So the important message is: Even though it at first glance might seem easier to use conditions on remap windows, it is VERY often much more efficient to use conditioned overlays instead. You can then design the labels only once and reuse it over and over, instead of copying and repositioning the same lines (imagine you would need to do a change on all the copies....).

As an example let Us look at the usual InterForm400 demo spooled file. We want to create labels from that spooled file. It is 4 pages long, so let Us place all pages on one A4 page and create 4 labels on it. Instead of creating all 4 labels in the main overlay there are some advantages by doing it in conditioned overlays, so that is what we do here:

 

a. Printing labels with absolute positioned conditioned overlays
This setup solves the problem by use of conditioned overlays, that are positioned in absolute (or fixed) positions:

Design InterForm 400 overlay                                 APF300D 

 Overlay name: LABEL1MAIN  Overlay text:                                       

 Seqnbr. Type  Overlay definition                                              

  0001    8    Tabulator lin.001-263 pos 01-096 left20.000U font 0011          

  0002    *    Top left label                                                  

  0003    ?    If lin 006-011 pos 008-008 N                     Then LABEL1SUBL

  0004    *    Lower left label                                                

  0005    ?    If lin 072-077 pos 008-008 N                     Then LABEL1SUBL

  0006    *    Top right label                                                 

  0007    ?    If lin 138-143 pos 008-008 N                     Then LABEL1SUBR

  0008    *    Lower right label                                             

  0009    ?    If lin 204-209 pos 008-008 N                     Then LABEL1SUBR

 

I have made two conditioned overlays: LABEL1SUBL and LABEL1SUBR. They are creating a label (with an image, frame and remap windows) in the left and right side of the paper. (L=Left, R=Right ;-).

Converting the 4 pages of input into 1 page of output is done via Multi-Up=4 (or pages per side=4 if you prefer), so we can select the specific page of the original spooled file. The easiest thing is (also) to do that via the graphical designer. (With multi-up=4 the four pages are all considered as one input page in the designer...). The input spooled file page height is 66 (66 lines is the height), so it means that e.g. line 6 of the second page is actually 66+6=72 as used above.

The second (lower) versions of each label are made via a vertical reposition in the main overlay:

Design InterForm 400 overlay                                 APF300D

 Overlay name: LABEL_MAIN  Overlay text:                                       

 Seqnbr. Type  Overlay definition                                              

  0001    8    Tabulator lin.001-263 pos 01-096 left20.000U font 0011          

  0002    *    Top left label                                                  

  0003    ?    If lin 006-011 pos 008-008 N                     Then LABEL1SUBL

  0004    *    Lower left label                                                

  0005    ?    If lin 072-077 pos 008-008 N                     Then LABEL1SUBL

  0006    *    Top right label                                                 

  0007    ?    If lin 138-143 pos 008-008 N                     Then LABEL1SUBR

  0008    *    Lower right label                                              +



 Seqnbr. Type                                                                  

    5.0   ?    If . . . . .  Input line    72 -  77                            

                             Position       8 -   8                            

                             Is > = < N   N                                    

               Then . . . .  Overlay      LABEL1SUBL Nos. of lines to remap 06 

                             Upper edge    5.120  A/+/- A                      

                             Left edge            A/+/- A                      

                             Blank after          B = blank original text      

 F3=Exit                                       F11=Delete    F12=Cancel        

 F13=Set view/print parameters   F14=PCL-view

 

So some of you perhaps sit and think: So what... Big deal. We could do that just as easy in the main overlay...

Answer: You might be right, but there this setup gives you a couple of other advantages: In the future you need to do any changes not 4 times, but only twice and the labels (frames, images...) are only printed IF a label was found in the original spooled file (so no blank labels are printed..). The advantage would be much larger if we were talking about not 4 but e.g. 16 labels...

Could the main overlay be even smaller and could we create a simular setup, that would work optimal in a situation, where we are printing many labels? The answer is Yes. Check the solution below. 

 

b. Printing labels with relative positioning
If we are going to create MANY labels we might want to reduce the setup above even more and use relative positioning for the conditioned overlays. That means, that the position of the conditioned overlay is to be placed relatively to where the same text would normally be printed (with the line distance used in the main overlay).

This means, that we will need to move the complete spooled file page onto the conditioned overlay, thus we will need to check on the first non-blank line in the spooled file and then transfer all the rest of the lines in the current line like this:

Design InterForm 400 overlay                                 APF300D 

 Overlay name: LABEL2MAIN  Overlay text: Label: Main OVL with rel. pos.        

 Seqnbr. Type  Overlay definition                                              

  0001    8    Tabulator lin.001-263 pos 01-096 left20.000U font 0011          

  0002    *    Left labels                                                     

  0003    ?    If lin 003-132 pos 072-072 N                     Then LABEL2SUBL

  0004    *    Right labels                                                    

  0005    ?    If lin 135-264 pos 072-072 N                     Then LABEL2SUBR



 Seqnbr. Type                                                                  

    5.0   ?    If . . . . .  Input line   135 - 264                            

                             Position      72 -  72                            

                             Is > = < N   N                                    

               Then . . . .  Overlay      LABEL2SUBR Nos. of lines to remap 54 

                             Upper edge           A/+/- +                      

                             Left edge            A/+/- A                      

                             Blank after          B = blank original text      

 F3=Exit                                       F11=Delete    F12=Cancel        

 F13=Set view/print parameters   F14=PCL-view

 

So you can see that we are now using '+' as the distance from upper edge. The exact distance to reposition is unknown right now, so we will adjust it later. The important thing now however is to calculate the line distance of the main overlay. It must be set to that the height difference between line 3 in page 1 (of the original spooled file) and line 3 of page 2 (of the original page 2) must be exactly 5 inches and 120 pels (5 and a half inch... ;-)). The page height is 66 so line 3 of page 2 is actually line 69 with multi-up..

So the math is: Setup a line distance in the main overlay so that 66 lines in total will take up 5 and half inch.. One way to do that is to convert the 5 and a half inch into pels and that is 240*5+120=1320 pels. Divide 1320 pels with 66 lines and you get a line height of exactly... 20 pels. (Aren't we lucky ;-)). We use that in the main overlay here:

Design InterForm 400 overlay                                 APF300D

Overlay name         LABEL2MAIN

Overlay text         Label: Main OVL with rel. pos.                           

Line spacing         020       in 1/240 of an inch (*INPUT, 1-720)  <----

 

If we now look at the result view the right labels are of course even lower than the left labels, so we need to push them upwards a lot. The first right label is now actually printed with a displacement of 2*5 and a half inch, so we need to pull the right labels up 11 inches:

Design InterForm 400 overlay                                 APF300D 

 Overlay name: LABEL2MAIN  Overlay text: Label: Main OVL with rel. pos.        

 Seqnbr. Type  Overlay definition                                              

  0001    8    Tabulator lin.001-263 pos 01-096 left20.000U font 0011          

  0002    *    Left labels                                                     

  0003    ?    If lin 003-134 pos 072-072 N                     Then LABEL2SUBL

  0004    *    Right labels                                                    

  0005    ?    If lin 135-264 pos 072-072 N                     Then LABEL2SUBR



 Seqnbr. Type                                                                  

    5.0   ?    If . . . . .  Input line   135 - 264                            

                             Position      72 -  72                            

                             Is > = < N   N                                    

               Then . . . .  Overlay      LABEL2SUBR Nos. of lines to remap 54 

                             Upper edge   11.000  A/+/- -                      

                             Left edge            A/+/- A                      

                             Blank after          B = blank original text      

 F3=Exit                                       F11=Delete    F12=Cancel

 F13=Set view/print parameters   F14=PCL-view 

 

So we use '-' 11 inches as the upper edge.

The only thing missing is, that the conditioned overlays must remove the rest of the spooled file data, that is not used. That is done with a tabulator:

Design InterForm 400 overlay                                 APF300D 

Overlay name: LABEL2SUBL  Overlay text: Label suboverlay: Left side           

Seqnbr. Type  Overlay definition                                              

 0001    1    Frame  top 00.080  left 00.080  right 03.200  bottom 05.120     

 0002    I    Image DEMOIMAGE   Top 00.160  Left 02.000  DEMOIMAGE            

 0003    9    Remap window 04-010 pos 08-056  top 1.120  left 1.000 U         

 0004    8    Tabulator lin.001-054 pos 01-100 left20.000U font 0011          



Seqnbr. Type                                                                  

   4.0   8    Tabulator                                                       

                Input:     Line             1 -  54                           

                           Position         1 - 100                           

                Print:     From left edge 20.000 Adjustment U (U L C R N B +) 

                           Font             11      F4=List                   

               Condition: Position            -                               

                          Is > = < N                                          

                          Blank after        B = Blank condition after        

F3=Exit      F4=Prompt                        F11=Delete    F12=Cancel        

F13=Set view/print parameters   F14=PCL-view 

 

Remember: I did all this in the graphical designer as it is the easiest way to create overlays, but I include the screen shots from the green screen only because it is better for pointing out exact details. 

Part 7:  Conditioning the design on the page number

When conditioning in InterForm400 you normally inspect the contents of the spooled file text, and decide what to do depending on this, but you can also decide to insert element on certain page numbers in the spooled file..

In the green screen it is called 'Page Control' and includes these options on the right when you insert a design element:

Page control            
     BLANK = all pages
     1 = first page only
     2 = page 2 and succ.
     9 = last page only 
     BLANK = all pages  
     1 = uneven pages   
     2 = even pages     

Where the last 3 lines are only enabled for duplex overlays. The equivalent feature in the graphical designer is found via the 'Page management' tab on the element. This can funny enough not be used with the S=Suboverlay element, while it works with the more advanced if..then (conditioned element as it is called in the graphical designer).

The Page control feature is OK, but you should think twice before you use it, as the first page does not mean the same when an e-mail/fax finishing definition is used... Then the PRSPRINT spooled file includes an extra header page as page 1 and that is now considered to be page 1 in the overlay design. So I would suggest not to use this feature if the customer could ever consider to e-mail the spooled file in question in the future...

A simular (but less known) feature is, that you can do the simular conditioning in the overlay selector. You can actually tell InterForm400 that a special overlay is to be used on either the first or last page not matter what is found e.g. like this:

Update Overlay Selector                                      SEL302D 


Selector name . : FIRSTLAS                                                    

Description . . : First or last..                                             

File set  . . . : SAMPLE     InterForm 400 Samples                            

Seqnbr.  Overlay name Overlay description                                     

 0001    FIRST                                                                

 0002    LAST                                                                 



Seqnbr.  Overlay name                                                         

   2.0   LAST                                                                 

         AND/OR  Print line  Position  Oper  Compare value, *FIRST, *LAST     

                                -      PAGE  *LAST 

The clever thing is here, that we call another overlay, if it is the last page in the spooled file. This could e.g. be used for selecting a special overlay for the last page which includes a giro slip so the customer can pay the invoice in that way.

You can of course combine a line like above with AND/OR to also inspect the spooled file text as well.