It is recommended to let the ELP Control Center decide which Search_xxx function is best to be used: New rule/section

Each key starting with Search_xxx does compare its argument while reading the incoming data stream. There are several keys with different functionality. If you use in the Configuration Tab the option The step is for setting up any data stream content based rules are, a captured data stream can be automatically analyzed, and the correct and best search method will be used.

Search_Binary Using a binary comparison for the argument. Once found, one the following keys, listed in their priorities, is performed:
Search_Windows Same as above, but possible position sequences between the characters are ignored.
Search_Text Same as Search_Windows, but NOT case sensitive
Search_Windows_New

Newer Windows Drivers do NOT print anymore characters in a proper known symbol set, but in the appearance of the character. For example the letter "A" is in the ASCII symbol set on character 65, but with these new drivers unfortunately "A" might be assigned to any character (e.g. character 73). ELP has a technology to examine in most cases the correct character.

PCL5 escape sequences and parts of such are skipped by Search_Windows_New. If you want to search for PCL5 sequences or parts of such please use Search_Binary.

Search_Text_New

Same as Search_Windows_New, but NOT case sensitive

PCL5 escape sequences and parts of such are skipped by Search_Text_New. If you want to search for PCL5 sequences or parts of such please use Search_Binary.

OutSearches Finally, rules can be applied while writing the data stream out. Maybe again insert certain information or replace variables in forms with the evaluated information coming in that processed data stream
Search_RowNo Pure ASCII files can be searched for RowNumber[,ColumNumber[,PageNumber[,Length,#VarName#]]]
This function enables to add text at a certain position, like missing form feeds, or reads back information into a variable.

Searched rules become true, if the argument is found. having more than one Search_xxx keys in the configuration file, the rules are activated in the row of the appearance in the data stream.

Also Search_xxx keys enables you to insert or delete information in the data stream, or even trigger certain conditioned rules. Here is the list of all additional keys, combined with activated Search_ rules.

ActivateSection   Provided, ELP does also activate the named section
This is the last performed key in a triggered section and nearly the last in a searched section. For search sections the key variables is handled later. Maybe use the keys StoreNextWordToVariable and ActivateSectionAfterStore to read a dummy value, but to evaluate a variable which is set in the Search_ triggered rule.
Add_Binary 2 Once a rule becomes executed using a Search_xxx, Search_RowNo or OutSearch_xxxx argument found in the data stream, the argument of the Add_Binary key is inserted into the data stream right after the searched argument. For special characters in the argument use their hex notation \xXX.
Add_Binary can also be used in Trigger Rules becoming TRUE, but only(!) if they are executed with TriggerSection and/or TriggerSectionAfterStore out of any rules, executed because one of the above search keys had been found.

[Section SEARCH AND ADD]

; \x1B is the hex representation of ASCII 27 = Escape Sign

Search_Binary=\x1BE

; Add direct after the PCL reset command a paper tray command

; Note: May only work if no further paper tray commands are coming behind that command. Otherwise use the ELP_COMMAND=C1:1I5; and remove the ReadOnlySearchKeys key.

Add_Binary=\&n13WdTransparency
ReadOnlySearchKeys=ON

[Section SEARCH AND ADD after]

; If the print data contains the searched text, ELP needs to put on all pages the same

SEARCH_TEXT="Rechnung No: "

; Letter head form, form number 500 using ELP_COMMANDS in Data Stream -> highest priority

Add_Binary=<<C1:1O100;>>
ReadOnlySearchKeys=ON

The same functionality can be achieved using the direct PCL command for macro Overlay form 100: Add_Binary=\x1B&f100y4X, or ELP_Command=C1:1O100;. But for the second way the ReadOnlySearchKeys=ON key has to be turned OF or simply not used.
Important: Instead of using the Erase_Binary and Add_Binary keys, please use Replace_Binary.

Add_AtNextLine   If the one Search_xxx key is found in the data stream, the argument of the ADD_ATNEXTLINE key is inserted into the data stream right after the next found Linefeed, (hex 0A,ASCII 10) character.
Notes:
  • Use this key only for processing ASCII files!
  • This and the key Search_RowNow=Line number can't be used in the same row!
  • This key can only be used in conjunction with Insert_Binary!
Counter   Every time when a section is activated through a SEARCH_ key and this COUNTER key is defined, the provided variable in incremented by default by 1 or any other positive/negative value which can be added after as semicolon:Counter=[#]VariableName[#][<Semicolon>StepValue] or Counter=[#]VariableName[#][<Semicolon>[*Value][+Value][/Value][-Value][%Value]
Disable_Search   If this key is used in a section triggered by any search key, the section is performed (Beside key StoreNextWord...), and no more search statements are evaluated or performed for the rest of the processing.
The Trigger_xxx keys are still processed. If even those commands should not be evaluated anymore, then use instead of the Disable_Search key the EXIT=ON key
Disable_SearchRule   Stops the search for all Search_... items which are defined in the addressed rule. Note: A rule can not disable itself.

[Search for Sindelfingen]

Search_Binary=Sindelfingen

Replace_Binary=Böblingen

[Search for Stuttgart]

Search_Binary=Stuttgart

Replace_Binary=Berlin
Disable_SearchRule=Search for Sindelfingen


Input data stream Output data stream
Sindelfingen, Stuttgart, Sindelfingen Böblingen, Berlin, Sindelfingen

Disable_RowSearch

  This key is only in a rule usable, which is activated by a Search_Binary, _Text, _Windows or _New key. Is the key set to ON, all Search_RowNo rules are deactivate
Erase_Binary 1 The found data will be erased. Only used in conjunction with Search_ key. May not work with _new search methods. Valid arguments are:
- ON or 1 Erase the searched information from the data stream
- OFF or 0 Leave the searched information in the data stream, (default)
- or any #Variable# with the string content ON or OFF

[Section SEARCH AND DELETE]

Search_Binary=!K TRIGGER!

; The data stream is searched for "!K TRIGGER". Once the argument is found, it is erased and the ELP_COMMAND performed.

Erase_Binary=ON
ELP_COMMAND= K3;C1F1000;C2F1100;D2

Insert_Binary 1 The argument of this command is inserted right before the found Search_Binary, Search_Text or Search_Windows argument. Does not work with _new search method. If a section is activated by a found Search_Binary key, and the Replace_Binary command is not used, the Insert_Binary has the second highest execution level, and the others are ignored. The length of both arguments of Search_ and Insert_Binary may not exceed the size of 255 characters!

[Section SEARCH AND INSERT]

Search_Binary=Rechnungsnr.
Insert_Binary=\x1B(s20vs3b4148T

; Speed up

ReadOnlySearchKeys=ON

This example demonstrates how to print the text "Rechnungsnr." Very large with 20pt, bold and in Univers.
Only used in conjunction with Search_ key.

InsertAfterNextFormFeed 2 Text and or PCL Commands can be entered, even ELP variables can be used within.
The given argument is inserted in the data stream behind the next coming Form Feed, even before the insertion of any possibly ELP_Command (Page control / forms). Notes:
  • Due to the way how ELP processes the data stream, the command is only inserted, when on the page a dummy ELP control command sequence \x1B)s-994Z is found. This command is usually set with Add_Binary. So that PCL command and the key are usually paired. Like in the example below: When a text is found on a certain page, then add here the PCL trigger sequence \x1B)s-994Z which will tell ELP to insert after the next form feed the given key argument
  • Several trigger can be inserted on a page! ELP will insert the arguments of the InsertAfterNextFormFeedkey in the order they had been defined. First in, first out.
  • As the Sequence and the key are paired, an just in case one is missing, the result will be a mixed output of arguments. between pages of course.
  • You may define several insertions, which will be used:
    1. in the row they are defined, FiFO and
    2. on the pages the \x1B)s-994Z key is used. Each key will insert one next provided InsertAfterNextFormFeed argument. So you may use several on one page or on different pages.

[Section SEARCH AND INSERT Terms 6 Conditions AFTER NEXT FormFeed]

SEARCH_Windows=Invoice no.:

; Set Flag to insert at next form feed the T&Cs

Add_Binary=\x1B)s-994Z

; And insert after the next form feed the demo form T&Cs 501

InsertAfterNextFormFeed=\x1B&f501y3X\x0C

; And turn duplex printing on

InsertOnTopOfPage=\x1B&l2S
ReadOnlySearchKeys=ON

InsertBeforeNextFormFeed 2 Text and or PCL Commands can be entered, even ELP variables can be used within.
The given argument is inserted in the data stream before the next coming Form Feed. And there even before the insertion of any possibly ELP_Command (forms insertion). Please note, in addition the ELP control command \x1B)s-984Z must be set in the data stream.
For an example, see more or less above.
You may define several insertions, which will be used:
1. in the row they are defined, FiFO and
2. on the pages the \x1B)s-994Z key is used. Each key will insert one next provided InsertAfterNextFormFeed argument. So you may use several on one page or on different pages.
InsertOnPreviousPage 2 Inserts something on the previous page.Only if ELP=ON and PreParsing=ON is set. Does not work on the first page. You may use the key several times in a rule or in different rules, even working on the same page. The insertion is then done using the LIFI principle.
Preparsing needs to be turned ON in rule Global.
InsertOnRelativePageNum 2 Value;Argument
Insert the argument relative to the actual page. The numeric value may be:
0: Adds the argument on top of the actual page.
<0: Insertion is done # pages before the actual page.
>0 Insertion is done # pages after the actual page.
Example, you are on page 3, Value=2 -> The argument is inserted on page 5. Try to avoid FormFeeds in the argument.
InsertOnTopOfPage 2

Inserts something at the top of a page.Only if ELP=ON and PreParsing=ON is set. You may use the key several times in a rule or in different rules, even working on the same page. The insertion is then done using the LIFI principle.
Example please see above ad preparsing needs to be turned ON in rule Global.

OverWriteInOutFile   see manuals for further details, should be only used with OutSearch
PrintOnlyASCII   If turned on, ELP will only print pure ASCII text and no escape Sequences.This key can only be used in rule GLOBAL, is mainly for evaluation, see manual for further details
ReadOnlySearchKeys   This key can be used in and section which contains SEARCH_ keys. Turned ON ELP will then only process or evaluate the Add, Insert, Replace, Erase and StoreNextWordToVariable keys
RememberFilePos   Stores the actual file position for later use in a variable. Should be used only with OutSearch
Replace_Binary 1 This information will replace found searched data using Search_Binary, Search_Windows or Search_Text rules.The argument of this command will replace the argument of the SEARCH_xxxx command.

[Section SEARCH AND Change]

; \x1B is the hex representation of ASCII 27 = Escape Sign

Search_Binary=\x1B&l5H

; Letter head form, form number 500 using ELP_COMMANDS in Data Stream -> highest priority

Replace_Binary=\&n13WdTransparency
ReadOnlySearchKeys=ON

See also Example: Depending upon the paper tray used, print specific forms on every page

ReplaceNextTerm 1 Similar functionality as search and replace using variables, but after the first found event, the "variable" will be erased. This key is used to insert an additional search for a specific term, but only one time. This searched new term will be replaced by the key argument, or deleted if there was no argument provided. The syntax of the keys argument is
SEARCHTEXT:REPLACETEXT
As the column is used to divide the search and replace arguments it is not allowed to be used in the search text. After ELP did find the search text beginning right after the original SEARCH_xxx. searched item, it will replace the found item and destroy itself. Therefore the command is only once searched/executed.

For example, the key can be used to set at the end of the line some stuff back, like color. So the following example searches in a row

[Invoice customer order number German/English print version]

; If one of the two items can be found in the data stream

Search_Binary="Bestellung "
Search_Binary="Your Order "

; switch to bold and red color

Insert_Binary \x1B(s3B\x1B*r3U\x1B*v1S

; at line end; return to black and white

ReplaceNextTerm=\x0D\x0A:\x0D\x0A\x1B*r1U\x1B*v1sT
ReadOnlySearchKeys=ON

Note, that the search text is CR-LF and that those 2 characters are also added in the argument. So the amount of printed lines remain the same.

Search_Only_Once   If this key is used in a section triggered by any search key, the section/rule is performed, but then the search_xxx key is erased form the searched list. This means, that the section/rule will be only performed one time -> the first time the searched argument is found in the data stream
SkipUntilEnd   All remaining bytes of the incoming data stream, including the search item will be ignored by ELP. No additional Search_xxx keys are performed on the remaining data stream, nor any other possible Trigger_xxx items in that skipped part are searched. Use this key for example to avoid additional pages from spoolers.
For cutting off the data stream while writing out see PCL command \x1B)s-997Z.
StoreNextWordToVariable* 2 The next word in the data stream after the search term is stored into the provided variable name, Can be used with Search and OutSearch keys. See manual for the meaning of length added with Semicolon (not +)The word is searched using the same mechanism like the search command, binary or windows mode
StoreNextWordToIntVariable 2 Same functionality as StoreNextWordToVariable, but at the end of the reading process, the word is converted into a signed long integer value. The word is searched using the same mechanism like the search command, binary or windows mode
TriggerSection 3 If all trigger conditions of the named rule are true, the rule is performed as well, right at the position the searched item was found. This could be very early in the process especially before other rules may apply. The key can also be used right in one of the automatically activated rules at startup like GLOBAL, PrinterName, UserName, DriverName, PortName , END OF CONVERT or PassThrough. The key can be used X times in a rule.
TriggerSectionAfterStore 3 If the variable after the command StoreNextWordToVariable or StoreNextWordToIntVariable is fully read, ELP does call the provided rule name. So the variable content can be for example immediately analyzed. The key can be used X times in a rule.
Important: Usually the executed rule does analyze the content what is read back. So the primary trigger must be TRUE before the secondary is really evaluated one is analyzed.It is therefore strongly recommended, so SetTrigger=PrimaryTriggerisAlwaysTrue:ON in the rule GLOBAL and test on that one in the called triggered rule. Example

1 Keys only available with these keys: Search_Binary, Search_Windows and Search_Text. Cannot be used with OutSearch_xxx found items.
2 Keys are available with these keys: Search_Binary, Search_Windows, Search_Text, Search_Windows_New and Search_Text_New
3 It is illegal to use an IniFile or EXIT key in the named TriggerSection.

* As Search is performed before the trigger analysis, it may happen that a certain searched trigger items are NOT yet found, especially when they are in the same read (Max_ReadBuffer) buffer the search just evaluates. In this case you may preset the trigger using the SetTrigger key. Executed from searched rules, Add_Binary can be used in those tested rules as well! Add_Binary will NOT work in the standard Trigger analysis after all data is read in.

While writing the data stream out, there are additional keys for OutSearching the data stream available, which may be used to read data in and maybe use them immediately for storing the splitted part of the stream under a certain name.

OutSearch_Binary Using a binary comparison for the argument. Once found, one the following keys, listed in their priorities, is performed:
OutSearch_Windows Same as above, but possible position sequences between the characters are ignored.
OutSearch_Text Same as Search_Windows, but NOT case sensitive


Note for Searching form feeds:

Searching for a from feed or especially for 2 succeeding form feeds in order to eliminate one is straight forward as long as the PreParsing mode key is not turned on (PreParsing=ON usually placed in the rule GLOBAL).

The preparsing function is just needed for the evaluation of the variable #PREPASREPAGECOUNT#, which is the counted amount of incoming pages, or if one of these keys is used: InsertOnTopOfPage or InsertOnPreviousPage.

If the preparsing function is needed and you also need to eliminate a double form feed, then please get in contact with your dealer / distributor or stethos. They / we will try to develop a rule which does ignore the form feed. It can be done in 2 ways:

a) There are behind the second form feed some unique commands or texts, or
b) with the usage of the ELP_Command: N1 Ignore Form Feed on this page

Notes for Search_Binary:

  • It is recommended to let ELP Control Center decide which Search_xxx function is best to be used: New rule/section
  • In order to a prevent ELP to run into recursion while using ADD and/or INSERT and/or REPLACE keys do never insert the exact same search text!
  • The processing of the argument is handled case sensitive.
  • You may add several Search_Binary key statements within one section. The ELP server will search for all definitions. If only one of them is found, all keys of the section are performed. This means, that several Search_Binary commands in one section are OR combined, and that only one Replace_Binary or Insert_Binary Add_Binary and Erase_Binary is allowed per section.
  • Do not use this key in the section/rule GLOBAL or any of the automatic executed rules at start up, Printer-, User-, or Port-Name.
  • Before Replace and the other text editing keys are performed, ELP does scan the active section for all other keys,
    - If that is NOT necessary, processing time can be saved by using the key ReadOnlySearchKeys=ON.
    - If the key IniFile was used to change the config file and as the action keys above are analyzed in the rule after the IniFile was executed, the rule needs to be continued in the new inifile, under the same rule name!
  • By default, Search_xxx rules are also executed while reading in possible loaded forms/macro files. if that should NOT be the case, use key: FastMacroLoading=ON
  • The search commands are applied on the whole data stream, The associated keys like Erase_, Add_ etc. are also always evaluated/performed. However, evaluation the remaining keys, like IniFile, PassThrough etc. is only supported up to the point of time, the first Byte is written out. This can be very soon in case ELP=OFF (ELP Function is turned off) or in AP_ELP boxes or printer build in firmware extensions, the limit is as small as 2 MB. If in those cases you want to evaluate all available keys within searched rules, the key: ProcessSearchKeys needs to be used and set to on. But note: It doesn't make any sense to turn any command on, which needs the complete print job. For example Archiving or IN/OutPort commands are invalid after the first bytes are written out.
  • Once StoreNextWord keys are used, only the ERASE_Binary key is evaluated.
  • If the searched section should only performed one time, actually the first time the searched item is found, then add the key Search_Only_Once to the same section and turn it ON.

[Section SEARCH AND PERFORM 1]

Search_Binary="Kundennummer: "

; If the text Kundennummer: followed with a blank is found, the ELP command file is performed.

ELP_COMMAND=K3;C1F1000;C2F1100;D2

This following example turns Free-Escape off, when data stream looks like using IS0-7 bit German symbol set. See page 14 for details.

[Section SEARCH AND PERFORM 2]

Search_Binary=Stra~e

FREE_ESCAPE=OFF


Notes for Search_Text:

It is recommended to let ELP Control Center decide which Search_xxx function is best to be used: New rule/section

This command performs the same functionality as the Search_Binary key with two differences:

  1. The comparison between the searched text and the data stream text is performed case insensitive.

    Example: "SEARCH_TEXT=Greta Garbo" will be true for all following data stream contents: greta garbo; Greta Garbo; Greta GARBO etc.
  2. In addition this key ignores any positioning Escape Sequences (Esc*p#X or Esc*p#Y), the windows driver might generate between each printed character. Here are some tips to make the trigger findable in the data stream, especially if you are not able to interpret a PCL data stream:

    - Do not set the driver to print True Type as graphics.
    - The trigger word(s) should be formatted if possible with a printer internal font.


Notes for Search_Windows:

It is recommended to let ELP Control Center decide which Search_xxx function is best to be used: New rule/section

This key performs like Search_Text , exception, that the search string is case sensitive to the key value.


Notes for Search_Windows_New:

It is recommended to let ELP Control Center decide which Search_xxx function is best to be used: New rule/section

This command is pretty similar to Search_Windows but with following differences:

  • Out of the manipulation keys, currently only Add_Binary, Disable_Search and Search_Only_Once can be used.
  • StoreNextWordTo[int]Variable is implemented but not guaranteed to work
  • The search is processed parallel to the Trigger analyses, so after the complete data stream is read. This means, that with StoreNextWordTo[Int]Variable found variables are NOT replaced further down the data stream. But they are in later loaded macros.
  • The command finds search texts coming from the new Windows drivers. The fonts themselves need to be UNICODE based! (Will not work with current MS version of Calibri, as the true type font is not Unicode compliant)
  • It is not guaranteed, that characters above 127 are treated correctly.
  • Does not search in Binary data. Only text and escape sequences can be searched.
  • As the searched item can't be deleted (Erase_Binary is not implemented) the routine does also overread the Font Character definition sequences Esc*cE and Esc(sW
  • The Key TriggerNewYPosMode=ON can be set in the rule Global. This advises the search routine to ignore Positioning sequences also in Y direction.

    The typical MS Windows fonts Arial, Times New Roman and Courier New are Unicode symbol set based.


Notes for Search_Text_New:

It is recommended to let ELP Control Center decide which Search_xxx function is best to be used: New rule/section

Same functionality as Search_Windows_New, but case insensitive.


Search_RowNo:

The Syntax for this key is:

Search_RowNo=RowNumber[,ColumNumber[,PageNumber[,Length,#VarName#]]]

This command is used as the other search keys usually in a standalone section, but only those keys are interpreted:
- ReadOnlySearchKeys, All ELP keys (not Search_xxx and Trigger_xxx) , Erase_Binary, Add_Binary, Read_Only_Search_Keys; TriggerSection and TriggerSectionAfterStore can be used to evaluate the content of the read back variable. Both last keys can be used, there is no difference in handling.

Those other keys are NOT used: Search_only_once, Replace_xx, Insert_xx. Add_xx, StoreNextWordToxxxx and some more minor important keys.

It should only be used for pure ASCII print files, because it counts the print rows by searching for Linefeeds. The counter is set to 1 at the beginning of each page, found by an Form Feed character ASCII 12.

Important information:

  1. If a Search_RowNo key is used the first time in a second ini-file, AND
  2. This ini-file is called by the main ini-file (convert.ini) AND
  3. In the main ini-file is no Search_RowNo AND
  4. The new ini-file is called by a Search_XXX rule,
    THEN the row and column and page counters are reset to 1. In other words, the actual processed row which performed the rule Search_Binary -> ini-file reading -> new Search_Row key will be row Nr. 1 at Col Nr. 1 on page 1. (Actually it is not at the actual pos, it is at the beginning of the actual processed data stream part.
    In order to avoid that, simply insert in the main ini-file a dummy section, with a dummy Search_RowNo command.

Once ELP begins to evaluate a specific row, indicated by the first operand of the keys data entry, this happens:

Only RowNumber is provided and NO ColumnNumber is defined The Add_Binary ini-file key is searched in the provided section and performed right at the beginning of the row.
A RowNumber is provided and the ColumnNumber is larger than 0 The Add_Binary ini-file key is searched in the provided section and performed right at that column.
A ColumnNumber of 0 will lead to ignore the whole command.
If the row does have less columns, then the command is ignored as well
Like above, but also a page number is provided If the page number is 0, the Add_Binary ini-file key is searched in the provided section and performed right at that column for every page. If the Page number is greater than 0, then the Add_Binary is only performed on the provided page number.
Like above, page number, length and variable Name is provided The next length bytes of the print data stream is stored into the provided ELP variable. This variable can later be used and positioned in forms, or for searches in assigned databases.
the Bytes are only read until the provided length is reached, or any byte below ASCII blank is found.
The key Erase_Binary=ON can be used to blank the length Bytes out.
The key Add_Binary should not be used, as his entry would be inserted after the first and not after the length byte.
Any blanks at the end of the term are not stored into the variable.


Note: The command can't be used at the beginning of a Row, which is also modified with key ADD_AtNextLine!

ELP automatically creates the following two variables, when minimum one Search_RowNo command is defined in the configuration file.

#VAR_ACTROWNO# The Variable holds the actual processed row number can can be evaluated for example during a Search_Binary triggered rule using the keys: TriggerSectionAfterStore or TriggerSection.
#VAR_ACTCOLNO# The Variable holds the actual processed column number can can be evaluated for example during a Search_Binary triggered rule using the keys: TriggerSectionAfterStore or TriggerSection.

 

As a first example: In my print job are two rows in the beginning of each page. I would like to remove them, or move the text with PL command... If I remove the two rows manually it works fine, but when I use the PL command it doesn't work. Any idea?

A: Well, add those lines to the ini-file at the right position:

[Move the 3rd line up]

; Select the third row

Search_RowNo=3

; insert in that line at the beginning the escape sequence to move the cursor relative up

Add_Binary=\x1B&a-240V

; Speed up the processing

ReadOnlySearchKeys=ON

Instead of moving the cursor up, you can also position it.


The second example will print line 8 of the document in 14pt Univers bold, and switches back to the standard font on the next line. In order not to screw up the line spacing, 6lpi is maintained.

[Print Line 8 Bold]

SEARCH_ROWNO=8
Add_Binary=\x0E\x1B)s1p14vs3b4148T\x1B&l6D
ReadOnlySearchKeys=ON

[Print Line 9 StandardFont]

SEARCH_ROWNO=9
Add_Binary=\x0F
ReadOnlySearchKeys=ON

The next example reads the bytes 20 to 25 out of the data stream on page 1 in row 11 in the variable #test#:and tests the content

[Global]

; Set primary trigger text "AlwaysOn" to found.

SetTrigger=AlwaysFound:ON

[Get Address]

SEARCH_ROWNO=11,20,1,5,#test#
TriggerSectionAfterStore=Evaluate content of test variable

 

[Evaluate content of test variable]

; Primary trigger is always true

Trigger_Binary=AlwaysFound

; Secondary trigger is true when the content of the variable #test# is 01458, the company number

Trigger_Variable=#test#:01458

; set the ELP_Command for forms for company 01458 and exit the rule interpretation.

ELP_Command=C1F500;

Exit=ON

The fourth example does split an ASCII job into single invoices / Delivery notes. The split criteria hast to be inserted on the last page, when the page number 01 indicates a new first page.

[Global]

 

; Set primary trigger text 1 to found.

 

SetTrigger=AlwaysFound:ON

; Turn preparser on to enable ELP tag pages while reading the data stream in

 

Preparsing=ON

; initalize the variable reading the page number out of the stream

 

Variable=#MyFoundPageNumber#:0

 

[ELP_SPLIT]

 

; This rule is only executed when in a second run the splitted job has to be treated.

; the name of the rule is identical to the name of the queue receiving those splitted jobs below

 

IniFile=#ELP_FORMS_PATH#Split.ini

; Split.ini must be defined in the Workpath folder (default: c:\ProgramData\Welp) and does enable ELP a complete new set of rules for each splitted job.

; The execution of the convert.ini does ended here

[ELP_IN]

 

; This rule is only executed when job to be splitted arrives in the first queue names ELP_IN.

; that Job is NOT printed (Maybe set that Queue to port NULL

 

NoPrinting=ON

; But send the splitted parts to the ELP_Split queue which is shared with the name ELP_Split as well.

OutPort=\\#HOSTNAME#\ELP_Split

; Usually for ASCII Files not needed, but just to be save:

OutPortMode_CollectFonts=ON

[Search for Page counter]

 

; Read on the second row, at column 114, on every page (no page number is provided), minimum length 2 Bytes,

; the found content into the variable #MyPageNumber#

 

Search_RowNo=2,114,,2,#MyFoundPageNumber#

; And after the content is read, analyze it immediately using the next rule

 
 

TriggerSectionAfterStore=Test Page Number 01 for Splitting

[Test Page Number 01 for Splitting]

; Primary Trigger is always TRUE

 
 

Trigger_Binary=AlwaysFound

 

; But the secundary trigger only if a new page 01 is found

Trigger_Variable=#MyFoundPageNumber#:01

; Then set the variable back to default

 

Variable=#MyFoundPageNumber#:0

 

; and Insert on the previous page the ELP internal command to split that page right after the page end.

 
 

InsertOnPreviousPage=\x1B)s-997Z

 

If the word INVOICE is found in Row 14 then move the next row one line up.

 

[Global]

; Define an offset Variable which is by default 0, so no move is made.

Variable=#MyOffset#:+0

; Define an Trigge that is always found.

SetTrigger=TriggerAlwaysTrue:ON

[Search for the word INVOICE]

Search_Binary=INVOICE

; Test if it was found in row 14

TriggerSection=Check for row 14?

; In any case add the move command either with 0 or one line up offset

Add_Binary=\x1B&a#MyOffset#V

[Check for row 14?]

Trigger_Binary=TriggerAlwaysTrue

Trigger_Variable=14:#VAR_ACTROWNO#

; primary trigger is always true and secondary just when the actual row is number 14, then

TriggerSection=Check for row 14?

; In any case add the move command either with 0 or one line up offset

Variable=#MyOffset#:-120

The last example has to reposition a table on page one in Row 14. But as the given Formfeeds insert a line feed after (too much) the table is on the second and following pages starts in Row 15.

[Global]

; Set a variable with a dummy command which is inserted on all pages 15.

; However the content of the variable is at start-up so dummy, that the printer does nothing

Variable=#InsertOnSecondPage#:\x1B&a+0H


[Search only on first page line 14]

Search_RowNo=14

; Move cursor 200 deci units up. (720 units = 2.54 cm = 1 inch)

Add_Binary=\x1B&a-200V

; and search only on the first page

Search_Only_Once=ON

 

[Search also for line 15 on all pages]

Search_RowNo=15

; add content of variable, which is on the first page a PCL command, which is unique, but does nothing
; See init setting in rule Global

; But on the second page the content is changed with the next rule with the same move up command

Add_Binary=#InsertOnSecondPage#


[Activate real second and following page uplift]

; if the special dummy command was inserted on first page this rule becomes true

Search_Binary=\x1B&a+0H

; then make sure that it is only once found and set the insertion variable to the real move up command

Search_Only_Once=ON

Variable=#InsertOnSecondPage#:\x1B&a-200V

Related articles: Triggering rules with hierarchy, Special keys for triggered rules