3 Examples with quite some variation in here:
-
Count how often the word confidential is used and if more then 10 times do...
-
Count manually the pages, and insert a form feed character, as in that ASCII file are no form feeds included
-
Workload Job Rotation sends the jobs alternating to X printers, one after the other
Other examples and the full description can be found
-
for Counter and JobCounter .
1. Count how often the word confidential is used and if more then 10 times do...
[GLOBAL]
; Whatever you need
PreParsing=ON
SetTrigger=1:ON
; define the starting variables:
Variable=#MyCounter#:0
[When the word confidential is found]
Search_Windows_new=confidential
Counter=#MyCounter#
[if it was found more then 10 times]
; Primary trigger always true
Trigger_Binary=1
; Now when more then 10 times
Trigger_Variable=#MyCounter#>10
; Archive a copy to boss
OutArchiveDir=#ELP_FORMS_PATH#\boss;#USERNAME#_#DATESERIAL#_#PRINTDOCNAME#
2.: We have an ASCII data stream with 55 lines per page, but without form feeds. We need to insert
-
on the first always the Letterhead (form 500)
-
on the last page a special Terms and Condition form goes on the back (form 501)
-
on all the pages between only the logo (form 502)
If the document already contains form feeds all examples below the #MyFFcounter# can be replaced by #PREPARSEPAGECOUNT# and the insertion of the form feed rule can be erased. Be sure that in rule GLOBAL the key PreParsing=On is set.
2.1 First method to solve the clients requirements
Note: PreParsing with #PREPARSEPAGECOUNT# will not work, as there are no Form Feeds in the data stream. So ELP has to count the rows while reading in and add at the proper place a form feed.
[GLOBAL]
; Whatever you need...
; create and set the own made page counter to initialize 0
Variable=#MyFFcounter#:0
[Insert form feed @ Line 55]
; In every Row 55
Search_RowNo=55
; add \x0C -> ASCII 12 -> form feed and restart counting rows
Add_Binary=\x0C
; and increase the own made page counter
Counter=#MyFFcounter#
[The rule if counter minimum 1]
; Primary trigger is mostly always true, as a 1 is normally always found in the stream.
; otherwise use key SetTrigger in rule Global
Trigger_Binary=1
; trigger this rule only if minimum one page is found.
Trigger_Variable=#MyFFcounter#>0
; Then use this ELP command
; C1:1F500S0; put full letter head on all pages and print simplex (S0)
; C1:#MyFFcounter#F501FFF501; On the last page put the Logo as well, insert a form feed and put T&Cs on back
; C1F502; on all pages in between and the first and the last one put the logo only.
; Note: C1:#MyFF must be at the beginning, as if a document is only one page, the C1:1 will NOT be performed
ELP_Command=C1:#MyFFcounter#S1F502FFF501;C1:1F500S0;C1F502;
Tip: Often you have to convert a matrix printer data stream to a laser printer stream. Unfortunately the matrix printer has some more lines to print on a longer the A4 Paper. here is what to do, if the software can't be told to reduce the amount of lines per page:
a) If it is a pure ASCII Stream, you may use the ELP_Command with ELP_INIT_JOB key to reduce the vertical motion index.
b) if you have some blank rows at the end on each page, set the vertical motion index to 0 and expand it after the form feed to whatever you need.
[Set 0 lpi (lines per inch) on row 64]
Search_RowNo=64
Add_Binary=\x1B&l0C
[Insert Form Feed @ Line 72 and set VMI to 6 lpi]
Search_RowNo=72
Add_Binary=\x0C\x1B&l8C
2.2 Another way is to print the terms and condition on the first page, Then no counter is needed
[GLOBAL]
; C1:1S0F500; on page 1 add the Letterhead and set to duplex printing
; C1:2F501; Insert on new page 2 the T/Cs.
; C1F502; On all remaining pages, print the logo.
ELP_Command=C1:1S1F500FF;C1:2F501;C1S0F502;
[Insert Form Feed @ page 55]
Search_RowNo=55
Add_Binary=\x0C
Related articles: Rules theory, Rule assistent, Add key to rule , Forms management, ELP_Commands, Variables in ELP