Select your language


ELP can count any information inside and also outside a data stream. This page explains:


Other examples and the full description can be found


Counter, basics

ELP is able to increase, decrease, multiply and divide the integer value of any variable. The full syntax is depending upon the calculations:

  • Counter=VariableName[;Integer value to change].
  • Counter=VariableName[;#ELP_Variable#].
  • Counter=VariableName[;[+Integer][*Integer][-Integer][/Integer][%Integer][...]].
  • Counter=VariableName[;[-#ELP_Variable#][...]].

By default the change step is adding 1 to the value. For example, if you need to count a special word in the data stream:

[Search for the word Confidential and increase the counter]



If the correct page counter needs to be known in advance, and for example on every page the terms and conditions are inserted, multiply the Variable #PREPARSEPAGECOUNT# by to like that:



; The Preparsing function evaluates the correct sum of pages.



[Get final page number]


; Primary Trigger above always true, so this rule is always executed.

; multiply the input pages by 2 and subtract 1, so this is the last page with data


; As Form F1001 (T&C) is inserted on every back page, but the last page = paper sheet is printed out of another tray


Please note, that the last position to change counters is with the trigger command. Meaning that variables defined during the ELP out writing will not be changed anymore, like #VAL_ORIENTATION# etc.

Another example is to also print the T&C's on the back, but on the front page has to go a color watermark underneath the printed document.




[Do always the Form Command]


; Primary Trigger above always true, so this rule is always executed.

; multiply the input pages by 2 and add 1, so this is the real printed last page plus 1


; As Form F1001 (T&C) is inserted on every back page, but as the G command is automatically inserted after a form feed,

, the X on the right handed page prevents the insertion for the last printed page (2 * incoming amount of pages) plus 1


See also here for more complex example with more copies


Another example is to print the last page in simplex, when the duplexed job has got an odd amount of pages.



; The Preparsing function evaluates the correct sum of pages.



[If Job has only one page]

; primary trigger always true


; secondary trigger true if only one page


; Set duplex to off


; end here

[Then more than one page printed]


; save the amount of pages in Variable #EvenOddPages#


; and turn duplex printing on


[Calculate if Even or Odd amount of pages]


; Page num % 2 = 1 on Odd, = 0 on even amount pages


[Print the last page if needed in simplex]


; yes last page is on a right handed page


; add the simplex exception for the last page to ELP Command


Find here more Counter examples

How to transfer counter values between jobs

ELP can continuously count events, like all print jobs, or jobs going to a certain printer, or any other counter on searched events, like amount of printed checks. See also Variables in ELP if your needed event is not already implemented and a variable for it does already exist.

Here is an example for a job counter, which has the small disadvantage that ELP serves several queues. It can happen that two jobs running the same time might have the same job number, as the number itself is read at the beginning but stored back at the end of the process. A started job in between may then read the same value. Therefore look at the key JOB_Counter to implement this function correctly.


; read the variable file at the job beginning

; There is only on variable in: #MyCount#


; Then increase the variable automatically


; And store it back at the job end to the same file


Those counters can be used in the printed documents for generating for example bar codes on the fly: For the example above open an MS Word document, and insert a field: PRINT 14 27 ")10U" 27 ")s1p12vsb4148T#MyCounter#" 15 or use the forms_field_installer.doc macro.

Then the job number is printed in Univers at the given position. You may change the font definition any time for example to a definition of a bar code from the bar code section.

ELP is also able to use as many as needed counters, for example for all controlled queues, even with queue unique variables, like below #MC9500#;#RI420#, or for events like check numbers etc.




[HP Color LaserJet 9500]


[Ricoh C420]


In that example every queue has an own variable, but you may have it even easier using a job counter, following next.

Find here more Counter examples

Job Counter

You may use the rule assistant in order to generate a job counter. The form 23010 prints the job counter as a bar code with readable text below on the left hand of the page, rotated by 90°. You may use the Forms & Field Installer to generate such forms.

The following steps generate an automatic job counter, which can be placed at any position on the page, or simply be used to count jobs.

  1. A job counter can be placed in every activated rule. So in theory ELP can handle nearly indefinite rules with the same amount of counters. But be careful, as by default always the same variable #JOB_COUNTER# is used, the variable content is the counter of the last read counter file.
  2. The variable key JOBCOUNTER points to any regular text file. The file holds in the first line the start up value of the counter, which is incremented and stored right away back to the file. The increased value is then available in the ELP variable #JOB_COUNTER#.
  3. The variable itself can be used like explained on the last page in forms or using Search and Add or Insert.
  4. If you like to use different variable names then simply add your name to the command semicolon separated. For example:


To install an overall job counter simply add the variable key JOB_COUNTER into the section global, leave the default argument as it is. As long as the variable #JOB_COUNTER# is not used in a form, open the file after some jobs and look at the value.

Another example is to establish a counter how many documents / jobs are printed, which contains the word confidential:

[Search for Confidential]


; print it on the first page


Tip: The variable can of course be exported into any report / accounting file or can be passed to any external software by command line parameter using one of the CALL keys.

You may also use any time after that the variable #JOB_COUNTER# in any form or data stream.

Note Please keep in mind, that as soon as the variable #JOB_COUNTER# is defined, ELP will NOT read the JOBCOUNTER key anymore.





This way will work out, as the variable #JOB_COUNTER# is defined in the rule invoice. If the two counter lines are flipped, the Invoice rule JobCounter key is ignored as the variable #JOB_COUNTER# was already defined by the command in GLOBAL.


Related articles: Bar code with the user name and a continuous counter, Variables in ELP, [Job]Counter examples


We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.