There are two ways to change or set the ELP Commands K, R or Q from the definition value to a value, which is defined in the data stream.

1. Some drivers and applications let the printer perform automatically the copies by sending down an PJL Command called: @PJL SET QTY=#.

You may first check if the PJL command @PJL SET QTY= is in the data stream, by printing to file and loading the file into any text editor. At the very beginning of the print file are all PJL commands listed. Check if the SET QTY command is used.

If this is the case, enable this function by using key ELP_USE_QTY_FACTOR in the ini file in the sections Global, PrinterName, PrinterDriverName or UserName. But it can also be used in any other later rule.

Once this key is provided, ELP checks in the PJL commands for an entry @PJL SET QTY=#. The copy factor K, R or Q is then replaced by the # factor. If no copy factor is provided, the K factor is used.

Note: This special ELP command is set with the highest priority, as the PJL command is analyzed while processing the data stream out, so after all search and trigger rules had be evaluated.

[Global]

; Turn preparsing on, as the data strram comes form an windows environment

Preparsing=ON

[Trigger Invoice]

Trigger_Windows_New=Invoice

; default print 1 original

ELP_COMMAND=C1I9F500;C2I1F500F200;D2

; But it the QTY PJL command is set, use this copy factor

ELP_Use_QTY_Factor=ON


Unfortunately there is a manufacturer who mixes the Esc&l#X and QTY command, so he always send QTY=1 but in the stream the PCL copy factor Esc&l#X command is used. So here is the ruel set to come around.

[Global]

; Set the default copy factor

Variable=#MyCopyFactor#:1

; note the command is set here in general, but the variables in the command
; are replaced after the data stream is completely evaluated (after all trigger and searches)

ELP_Command=K#MyCopyFactor#;C1:1S1G1100FF;C1:2G1101;

[FACT_FACT 2]

Search_Binary=\x1B&l2X

; Set the copy factor for the ELP command above to 2

Variable=#MyCopyFactor#:2

 

[FACT_FACT 3]

Search_Binary=\x1B&l3X

Variable=#MyCopyFactor#:3


; ... and so on for each possible copy amount

[When the copy factor is till one]

; primary trigger always true

Trigger_Binary=1

; and if the variable is still 1

Trigger_Variable=#MyCopyFactor#:1

; then use the QTY command if available

ELP_Use_Qty_Factor=ON

 

2. Most windows driver use the PCL command Escape-sign&l#X, where the copy number is coded in the # before X.

In order to trigger on those commands the search keys can be used with some rules like that:

[Search_Copy for 2 copies]

Search_Binary=\x1B&l2X

ELP_COMMAND=K2;C1I9;C2I1;

[Search_Copy for 3 copies]

Search_Binary=\x1B&l3X

ELP_COMMAND=K3;C1I9;C2I1;D2;

;...

 

If other conditions set different ELP_Commands, please use variables to set the copy factor. Example:

[Global]

ELP=ON

; Preset the variable to 1 copy

Variable=#MyCopyFactor#:1

[Search_Copy for 2 copies]

Search_Binary=\x1B&l2X

Variable=#MyCopyFactor#:2

[Search_Copy for 3 copies]

Search_Binary=\x1B&l3X

Variable=#MyCopyFactor#:3

;...

[Trigger Invoice]

Trigger_Windows=Invoice

ELP_COMMAND=K#MyCopyFactor#;C1I9F500;C2I1F500F200;D2


Forms management and printer handling (ELP_Command)