Question 1:

Q: We have a customer that would like to create color macro. The problem is when the macro is in color, it's on top of the document, so all variable below text is not visible. How can we create a color watermark, which is printing under the text.

A: ELP calls the ELP_COMMAND F parameter at the end of the page, right at the form feed. As color is always printed in non transparency mode, all other printed information is erased. So the colored watermarks have to be called at the beginning of the page. Usually this will do the job: ELP_COMMAND=C1G1000; where 1000 is the colored form.

The problem you will face is that an additional page will be printed at the end of the job. Because the mentioned G command inserts the form right at the beginning of the first page and after EVERY form feed. This leads into an additional printed page, empty with only the watermark.

To avoid that ELP offers three 3 possibilities:

  1. You only want to print the colored watermark on the first page: ELP_Command=C1:1G1000;
  2. Knowing exactly how many pages per job are printed: ELP_COMMAND=C1:1-5G1000; this print example has 5 pages
  3. If you do not know how many pages the streams have, turn PreParsing on and get the amount of pages right at the beginning of the process in the variable: #PREPARSEPAGECOUNT#

[GLOBAL]

;. . . standard settings

; Count the pages using the preparser, result is in variable #PREPARSEPAGECOUNT#

PreParsing=ON

[Trigger for Forms]

; This section is always performed

Search_Binary=1

; as soon as a 1 is found in the data stream.

; to avoid that every one will re-evaluate that rule:

Search_Only_Once=ON

ELP_Command=C1:1-#PREPARSEPAGECOUNT#G1000;

Tips:

  1. If you insert on the first page terms and conditions then use another variable and increase the variable by 1, or see next question in that example:
  2. Sometimes the form is printed on the first page and the data on a second and beginning with the third page all fits as expected. That can be avoided.

ELP_Command=C1:1-#PREPARSEPAGECOUNT#A26I1G1000;

; or if you print Duplex:

ELP_COMMAND=C1:1A26I1S2G1000;C1:2-#PREPARSEPAGECOUNT#G1000;

All page commands must be set in front of the G command. If set behind, the form will be printed separated from the data, one page in front. Use the same method as above.

Question 2:

Q) I have the same problem as above, but I print all in duplex and I insert on every page the terms and condition. I currently use the ELP_Command: C1:RS1F1000FF;C1:LF1100; inserting the form 1000 and a form feed on the front page as well as the duplex command. Macro 1100 is my terms and conditions on each back page. Macro 1000 needs to go below the text, as it is in color.

A) Well, the situation is the same, the form has to be printed before the text is printed, so use the G command. As ELP counts each printed page, the last printed page is doubled compared to the incoming amount pages (multiplied by 2). The #PREPARSEPAGECOUNT# variable needs to be doubled. As the R and L commands do not allow setting a command for the last page number, there is another method needed to suppress the last additional page:

[GLOBAL]

;. . . standard settings

; Count the pages using the preparser, result is in variable #PREPARSEPAGECOUNT#

PreParsing=ON

[Trigger for forms]

; This section is performed for invoices

Trigger_Binary=Invoice

; As the ELP command inserts N new pages, the last page number to be printed is; N * 2 + 1, and it contains the blank form, form the insertion direct after the form feed.

Counter=#PREPARSEPAGECOUNT#;*2+1

ELP_Command=C1:RG900FFF1002X#PREPARSEPAGECOUNT#;c1:1A26D3H1S1;

; C1:R insert on all right pages of copy 1

;G1000 the form 1000 (letterhead)

;FF a form feed

;F1002 form 1003 the T-C's on the back page before the regular form feed

;X#PREPARSEPAGECOUNT#, but do not do it on the last page plus one, as calculated

;above. So the empty page with the form on is suppressed.

; C1:1 On the very first page,

;A26A4 paper size

;D3 In that case it was reverse landscape print requested

;H1 Draw paper out of tray 2

;S1 set duplex.

The C1:1 command is only to prevent the data stream to perform a form feed after the very first page. All commands which may eject the page, are moved in front of the macro insertion.

Question 3:

Q) I want to print duplex as well, but I need only on all right pages the watermark below my text:

A) The solution is pretty close to the solution above, but shorter:

[GLOBAL]

Preparsing=ON

[Trigger for Forms]

; This section is performed for invoices

Trigger_Binary=Invoice

; Increment counter by one, so that the counter is set to amount of pages + 1

Counter=#PREPARSEPAGECOUNT#;

ELP_Command=C1:RS1G11111X#PREPARSEPAGECOUNT#;

; C1:R insert on all right pages of copy 1

;S1 Print duplex

;G11111 the form 11111 (letterhead)

;X#PREPARSEPAGECOUNT#, but not if the last page plus one, is again a

;right page. So the empty page with the form at the end is suppressed.

Note: When the pages are not duplex, your problem may be this:

C1:RS1A26H4D0G11111X#PREPARSEPAGECOUNT#;

; S1 duplex

; A26 A4

; H4Tray 2

; D0Portrait

 

Related articles: Rules theory, Rule assistent, Add key to rule