This example is already stored in Quicksets as "FormsManagement_Pagecounter" with Macro ID 25001.

You can create dynamic macros which might change from page to page. A simple page counter is the most common one.
In order to do this create a form which might look like this:

<esc>&f0X<esc>&fS<esc>%BIN;<esc>%A<esc>*lR<HEX:0E><esc>&a50h6000V<esc>&a90P<esc>)10U<esc>)s1p9vsb4148TPage #PAGEPERCOPYCOUNT# of #PREPARSEPAGECOUNT#<HEX:0F><esc>&a0P<esc>&f1S<esc>&f1x10X

This PCL5 macro contains:

- The macro initialization sequence:

<esc>&f0X<esc>&fS<esc>%BIN;<esc>%A<esc>*lR<HEX:0E>

- Positioning sequence: 50 dots to the right and 6000 dots to the bottom

<esc>&a50h6000V

- Print direction rotation sequence: 90° rotation against the clock

<esc>&a90P

- Selection of the Codepage and font: code page 10U and font 4148 (Univers)

<esc>)10U<esc>)s1p9vsb4148T

- Then the text with ELP variables:

Page #PAGEPERCOPYCOUNT# of #PREPARSEPAGECOUNT#

- Finally set the printing direction again to normal:

<esc>&a0P

- Finally the closing of the macro:

<esc>&f1S<esc>&f1x10X

Important: Store this file as <MACRO_ID>.mac into the W-ELP forms folder. Your macro ID must be between 25000 and 30000. Example: 25001.mac

You can also edit the form 25001.mac to change the text. Please use an advanced text editor like notepad++.
For moving the text you can adjust the positioning sequences / rotation sequence.
Finally go for the test. You can add the form with the ELP_Command=C1F25001;
Please make sure that the key Preparsing=ON is also in the GLOBAL section of convert.ini.

The configuration:

[GLOBAL]

ELP=ON

; Do not go into pass through mode for postscript jobs

Macro_Download=ON

Preparsing=ON

; ELP needs to evaluate the amount of pages of the document.

ELP_Command=C1F25001;

 

Related articles: Watermarks