Q: We have a data stream with x pages. On these pages could be found none, one or some more triggers. Each notification found has to advice ELP to append minimum one more contract / data sheet pages. Finally OMR marks for our envelope machine need to be added. The insertions have to be always added after the last page. Each job is arriving separately.
A: Here the general steps:
-
Generate for every added form set, a unique print file for every page, using a PCL5 driver.
Then start PPAdmin and add the pages as unique macros, page by page. If a document has 3 pages, you need 3 macros, one for page 1, 2 and 3, e.g. macro 1500, 1501, 1502 -
In the config file turn PreParsing ON to get the amount of pages for the regular document in variable #PREPARSEPAGECOUNT# and turn the OMR process on. This will add the insertion command line on the last page.
-
ELP_Command EX$; is used to add all the single needed pages with a form feed in between. So single rules for each item add page form feed page form feed etc...
-
The last rule checks if the command was increased and if this is the case it is added to the actual ELP_Command.
[GLOBAL]
; Get the page counter variable #PREPARSEPAGECOUNT#
PreParsing=ON
; Define a variable, which will sum up all forms to be added at the end of the document
Variable=#ELPVariable#:EX
; Does nothing, simply that the ELP_Command is defined
ELP_COMMAND=K1;
; Turn OMR ON
OMR_Enabled=ON
; The envelope insertion mark is printed on the last page, by default
OMR_USEREADPAGECOUNTER=#PREPARSEPAGECOUNT#
; . . . . Followed by the OMR settings for the desired machine etc.
OMR_Type=STIELOW
OMR_Position=2,200,90
OMR_LineWidth=7.00
OMR_LineHeight=0.50
OMR_LineDistance=4.23
[Add one page on Trigger XXXXXX]
; if Trigger XXX is found in the data stream
Trigger_Windows_New=XXXXXX
; Add to the Variable the new ELP part command, here call form F3000 and add behind a form feed FF
Variable=#ELPVariable#:#ELPVariable#F3000FF
; Increase Page Counter by 1
Counter=#PREPARSEPAGECOUNT#
[Add two pages on Trigger YYYYY]
Trigger_Windows_New=YYYYY
Variable=#ELPVariable#:#ELPVariable#F3100FFF3101FF
Counter=#PREPARSEPAGECOUNT#;2
; Add here more trigger texts and forms if needed
[Add now the collected forms string to the ELP_Command]
; primary trigger always true
Trigger_Binary=1
; Secondary trigger only true if minimum one trigger is found
Variable=STRLEN(#ELPVariable#)>2
; Add the collected command to the real ELP_Command. Note that the command starts
; with EA, which is the command for add a full ELP_Command at the end of the job
ELP_COMMAND_ADD=#ELPVariable#;
Related articles: Rules Theory, Rule Assistant, Add key to rule