Sprache auswählen

Explained solutions on this page:

Q1) My client prints 800 pages, every 50th pages he wants to insert an additional colored paper as a separator, coming from another tray. If possible add a section counter on every inserted page

For adding every #th page an additional sheet, only an ELP_Command is needed.

; C1:1I1; On the first page set the drawing paper tray to Media type "Plain"
; C1;50FF; On the 50th page add a form feed to page 51 is inserted
; C1:51I9F102R0; Select Preprinted media type Insert Form 102 and R0 set the page counter to zero.

ELP_Command=C1:1I1;C1:50FF;C1:51I9F102R0;

Notes:

  • The R0 sets on Page 51 the ELP internal page counter to 0. But the form feed on inserted page 51 increases the page counter to 1 and therefore the next page (51 from incoming data stream) will be treated like page 1
  • There must be a form on the inserted page, as otherwise, depending on the printer settings, an empty page might be suppressed

If you want to generate a section counter, then proceed like that:

1. Open the Forms & Field Installer (FFI) design your form and maybe even add some variables like #USERNAME# and #PRINTDOCNAME# and most important, a new counter variable, for example #MYSECTIONCOUNTER#.

2. Convert the document to a form in the ID range 25000 and up. Here for our example 25678. The macro number needs to be over 25000, as the macro needs to be loaded every time, that the counter variable will be replaced with its correct value.

3. The convert.ini:

[GLOBAL]

; whatever is needed
; Initialised to zero

Variable=#MYSECTIONCOUNTER#:0

[Big job found]

; Primary Trigger always true

Trigger_Binary=1

; If this is the report name from the queue then do that:

Trigger_Variable=#PRINTDOCNAME#:Company Sales Report
ELP_Command=C1:1I1;C1:50FF;C1:51I9F25678R0;

[Increase the section counter]

; when ever the macro/form is called (Search is case insensitive)

OutSearch_Text=&f25678y

; increase counter by one

Counter=#MYSECTIONCOUNTER#

See also: Split a big job into 50 pages pieces, as this is maximum amount of pages being stapled

 

Q2) A client sends 8000 jobs to the printer. I would like to get after each 100 jobs a separation page.

A: Usually this rule is performed on a printer base, as all jobs to the printer need to be counted and then if 100 is reached the insertion page is added.

The inserted document can be designed as described above. But in that case do NOT generate a macro from it, but simply print it through a non ELP activated queue to file. Make sure that the correct tray handling is applied. Then copy the file into the Workpath folder (e.g. c:\ProgramData\WELP) and rename it 22000.mac.

The file will be inserted after each 100th print job.

[GLOBAL]

; what ever is needed

ELP=ON
Macro_Download=ON

; Define the counter variable and set it to a default value

Variable=#JOB_COUNTER#:0

[Queue named rule]

; rename the above rule name to the real queue name, so it is triggered by default
; reads the counter file and increases the red #JOB_COUNTER# value by one.

JobCounter=#ELP_FORMS_PATH##PRINTERNAME#_JC.var

[Is it the 100th Job?]

;Primary trigger is always true, so that the real secondary rigger is analyzed

Trigger_Binary=1

; This section becomes true if the variable #JOB_COUNTER# has got the value 100

Trigger_Variable=#JOB_COUNTER#:100

; Then insert an extra page from another tray, after the job. Call macro 22000, which is not a
; macro but a real print job, which will be sent to the final printer without any changes.

ELP_Command=EE22000;K1;

; finally delete at the end of the process the counter file and restart next document with counter 1.
; The ;OFF option prevents ELP to put " signs around the replaced variables

Call=cmd /c del /Q "#ELP_FORMS_PATH##PRINTERNAME#_JC.var";OFF

Hints:

1. If you have a printer with A4-L and A4-P paper trays, you can also setup an ELP command which switches for job 100 the tray. Then the ELP_COMMAND may look like that:

; The A4-L tray is setup up with media type PrePrinted

ELP_Command=C1I9;

2. If the counter file should be deleted before starting any new print batch that the Job counter starts always with 1 you may easily do it with this process:

A) If you have only printer, simply generate a batch file, which does erase the counter file with this command: del /Q c:\ProgramData\WELP\*_JC.Var. Then generate a Linked Icon on the desktop.

B) For several printers you can do that:B.1) Use Notepad and save a file into the workpath folder with the name delete.txt and the content !Delete JC.VAR! file

B.2) Generate a batch file which copies that file to the queue for which you want to erase the counter files: copy /b \\servername\QueueShareName

c:\ProgramData\WELP\delete.txt

 

B.3) Generate a link for every batch file to the desktop, for easy access.

B.4) Add the next rule to the convert.ini.

[Rule to erase the counter file based on a trigger print job]

; If this content in a job is found

Search_Binary=!Delete JC.VAR!

; Don't print the job, nearly same as NoPrinting=ON, but faster and nothing will be done

KillJob=ON

; Erase the counter file

Call=cmd /c del /Q "#ELP_FORMS_PATH##PRINTENAME#_JC.var";OFF

; Leave the rule interpretation, only this rule set will be executed

Exit=ON

3) If you like to have a continuous job counter

[GLOBAL]

; whatever is needed

ELP=ON
Macro_Download=ON
Variable=#JOB_COUNTER#:0
Variable=#MyJOB_COUNTER#:0

[Queue named rule]

JobCounter=#ELP_FORMS_PATH##PRINTENAME#_JC.var

; Holds the right 2 digits of the counter, so normally form 01 to 99 and then 00 for every 100th job.

Variable=#MyJOB_COUNTER#:RIGHT(#JOB_COUNTER#,2)

[Is it the 100th Job?]

Trigger_Binary=1

; This section becomes true if the variable #MyJOB_COUNTER# has got the value 00 for every 100th job

Trigger_Variable=#MyJOB_COUNTER#:00
ELP_Command=EE22000;K1;

4) Same as example 3) above, but with the counter calculation method.

Exchange the last variable key and the Trigger_Variable key by:

Counter=#JOB_COUNTER#;%100

; and the Trigger_Variable key by:

Trigger_Variable=#JOB_COUNTER#:0

Q3) I want to insert on every first page of a new job a continuous number [opt. as bar code]

A: ELP already comes with a form, which prints the job counter and user name on any requested page/copy of the document using an ELP_Command.

In difference to the second example, the reading command for the job counter is placed into the rule Global, so a unique number is printed, independent which printer is used!

[GLOBAL]

; whatever is needed

ELP=ON
Macro_Download=ON

; read and increase the job counter for all queues c:\ProgramData\WELP\JC.var

JobCounter=#ELP_FORMS_PATH#JC.var

; Print the demo form 23010 for page counter on the first page of each PCL5 based print job

ELP_Command=C1:1F23010;

Now send any print job through the ELP activated queue with a PCL5 driver and you will get a continuous counter with the user name in bar code.

Tip:

    1. If the user name is not needed, or the position is different we suggest to copy the file 23010.mac into another form file, e.g. 1000.mac, open it with the Freeware ASCII Editor Notepad++ and you remove the text #USERNAME#
    2. If the bar code is wrong placed, change the 250 horizontal and 4000 vertical values
    3. If the code should not be rotated, erase the Esc&a90P and Esc&aP commands
    4. If you do want to print it in readable text, change the Esc(s3p103h18v5,10,15,20s5,10,15,20b24700T to any font selection sequence
    5. If this is all too complicated, then use the Forms & Field Installer to generate a complete new form with the counter and other variables, if needed from scratch.

For this example you need the BAS and FOR modules.

If you want to reset the counter to 0 after X (e.g. 10000 jobs) then you also need the SND modul:

[reset Counter after 10000 jobs]

Trigger_Binary=1
Trigger_Variable=#JOB_COUNTER#>9999
call=cmd del /Q "#ELP_FORMS_PATH#JC.var";OFF

; If you want to reset automatically the counter to an initial value, then set the counter in the JC.var file, copy the file to a startup file like JC_Start.var and take this command:

call=cmd copy /Y "#ELP_FORMS_PATH#JC_Start.var" "#ELP_FORMS_PATH#JC.var";OFF

 

Q4) I want to generate X copies, and after every Y copy I would like to get a colored piece of paper

A: We do have documents with 3 to max 10 pages which needs to be printed with ELP between 10 and 970 times. After every 50th copy, we would like to get a colored page

A macro inserted on the last page of each copy is used to generate an own page counter. On the 50th copy the counter is set to 0 and the additional separation page is inserted. The copy counter is also printed on that page

[GLOBAL]

; whatever is needed

ELP=ON
PreParsing=ON
Macro_Download=ON

; generate 378 copies and insert on the last page of each copy (D1;) the form 98765
; which does not exist. This form insertion is used to generate an own copy counter

ELP_Command=K378;C1:#PREPARSEPAGECOUNT#F98765;D1;

; Set the own MyCopyCounter to 0

Variable=#MyTotalCopyCounter#:0
Variable=#MyCopyCounter#:0

; And set the primary trigger to always found

SetTrigger=AlwaysTrue:TRUE

[Search for the inserted non existing form]

; whenever the form call is found in the data stream, ELP is at the end of the last page on every copy

OutSearch_Binary=\x1B&fs98765Y

; Increase the 2 copy counters

Counter=#MyTotalCopyCounter#
Counter=#MyCopyCounter#

; And append the content of the variable #MyInsert#

Add_Binary=#MyInsert#

; which is defined in the following rule:

TriggerSection=Test for 50th copy

[Test for 50th copy]

; this rule is called on the last page of every copy

; the primary trigger is always true

Trigger_Binary=AlwaysTrue

; The secondary mostly not..

Trigger_Variable=#MyCopyCounter#:50

; but on the 50th copy it is true then
; 1. Set the own MyCopyCounter to 0

Variable=#MyCopyCounter#:0

; 2. Add printer command to print an additional page out of another tray (colored paper):
; the dot after the command is needed to print out the page, otherwise the printer may ignore blank pages

Variable=#MyInsert#:\x0C\x1B&l26a0o7H\x1B&a200vH\x1B(10U\x1B(sp10hsb4099TActual copy counter: #MyCopyCounter#

; But if it is NOT the 50th copy then execute directly the last rule

ElseTriggerSection=Not 50th copy

[not 50th copy]

; On all copies 1 to 49 and then on the 50th restart at 1
; set to the inserted value a PCL command, which does absolutely nothing

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

 

Related articles: Rules theory, Rule assistant, Add key to rule, Variables in ELP, Forms & Field Installer

 

Wir benutzen Cookies

Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern (Tracking Cookies). Sie können selbst entscheiden, ob Sie die Cookies zulassen möchten. Bitte beachten Sie, dass bei einer Ablehnung womöglich nicht mehr alle Funktionalitäten der Seite zur Verfügung stehen.