Print a form on every page:

This example demonstrates here pretty short, how a form can be printed on every print page. A step by step version is located here. Print a Letterhead on every page

It is also assumed that the arrving jobs are always printed on the same paper size in the same orientation

  1. Select the Configuration Tab, and there open the Section "GLOBAL"
  2. Mark any Section item and "Add key to rule". A list of all possible keys is displayed
  3. Select the key ELP_Command , add the key and return to the Configuration Tab .
  4. Mark the ELP_Command key in the section GLOBAL and press "MODIFY".
  5. The ELP_Command key defines all work, which needs to be done on the data stream. In this first example, the key is entered in the section GLOBAL, therefore the command will be performed on any PCL5 data stream, coming from every activated queue.
  6. Enter now into the field: C1F500; This command will always print Form 500 of every print page. Press Button "Show Installed Macros" and see what the form does.
  7. Start any program, like for example Microsoft Word, type some text in, and print it to the activated queue, USING A PCL5 PRINTER DRIVER!

The print result is your text plus the example letterhead on very page. If you want to print now two copies go back to step 4 and enter: K2;C1F500;C2F500F200;

Assign a form / printerhandling command to a queue:

Let us assume, you want to print invoices and delivery notes. Two different papers, with totally different contents. There are the following ways to solve this issue:

1. Different ELP_Commands are used in the data stream, like <<K2;...>>
2. The ini-File does reflect the different jobs using the Search_xxx and/or Trigger_xxx activated rules.
3. You use different Printer Queues, one called INVOICE, and the other DELIVERY.

The third option is maybe the easiest way for the users to print a document the correct way, simply by using the proper printe queuer. Here is the solution what to do:

Add for both printers an own section in the regular startup ini-File:

  1. Add to your system 2 queues named PrinterA and PrinterB.
  2. Start PPAdmin and activate the queues either direct in the Startup Agent or in the Install Register Tab
  3. Change to the Configuration Tab - New ule/section - Double click or select on the activated queue name top left windows
  4. Generate your setup or click on "Examples" to get the closest setting to your needs.
  5. Close and save all open windows. once returned in the main menue, do the same with the second queue
  6. Just in case you have further queues with other handlings and they have nothing to do with the new 2 rules, Then add to both rules the Miscellaneous key EXIT=ON via Add key to rule.

[PrinterA]

ELP_COMMAND=K3;C1:1....

Exit=ON

[PrinterB]

ELP_COMMAND=K2;C1:1....
Exit=ON

The ELP_Commands are fixed assigned to the printer queue.

Example 2: Like example 1, but you have the need to provide the forms in different languages. The startup.ini file may look like this:

convert.ini invoice.ini delivery.ini

[PrinterA]

IniFile=#ELP_FORMS_PATH#delivery.ini

[PrinterB]

IniFile=#ELP_FORMS_PATH#delivery.ini

[Global]

; English invoice

ELP_COMMAND=K3;C1F1100...

[German]

Trigger_Windows_New=Rechnung
ELP_Command=K3;C1F1000...

[Global]

; English delivery note

ELP_COMMAND=K3;C1F2100...

[German]

Trigger_Windows_New=Lieferschein
ELP_Command=K3;C1F2000...

What happens during the second example at startup:

  1. The GLOBAL section of startup.ini is read and executed. (no particular things are done here)
  2. The section PrinterA or B is read and executed, depending on the name of the driver/queue, that rule switches rom convert.ini to process either invoice.ini or delivery.ini. So everything from convert.ini is not valid anymore.
  3. Switching to the secodn iniFile means:
    - read its GLOBAL section and keep the default form setting
    - But just in case the Trigger_xxx command hits the data stream content, the ELP_Command is overwritten.

It is also assumed that the arrving jobs are always printed on the same paper size in the same orientation

Print on every page your company logo, for any paper size or print orientation.

This means you need to make at least for each paper size 2 segments, because of the orientation. You may also need to make for each segment one macro/form

[Global]

SetTrigger=1:ON

; make sure that primary unused trigger is always marked as found in the data stream

[A4_PORTRAIT]

; This trigger should always come True, because already in PCL UEL
; there is a 1. Note: Only if the trigger comes true, the
; orientation and page size are analyzed as well.

TRIGGER_BINARY=1

; This section is only for portrait print files and

ORIENTATION=PORTRAIT

; only for A4 print files

PAGE_SIZE=A4

; If those three commands come true, then do this command.
; (Macros are not provided you may need to change!)

ELP_COMMAND=K3;C1:1F3333;

[A4_LANDSCAPE]

TRIGGER_BINARY=1
ORIENTATION=LANDSCAPE
PAGE_SIZE=A4

; Here there is another macro call, because the macro is maybe at a
; different place compared to portrait pages.

ELP_COMMAND=K3;C1:1F3334;

[A3_PORTRAIT]

TRIGGER_BINARY=1
ORIENTATION=PORTRAIT
PAGE_SIZE=A3
ELP_COMMAND=K3;C1:1F3335;

[A3_LANDSCAPE]

TRIGGER_BINARY=1
ORIENTATION=LANDSCAPE
PAGE_SIZE=A3
ELP_COMMAND=K3;C1:1F3336;

; and so on. Use for every page size new sections.

Note: All forms need to be printed in 300dpi, because if somebody sets his driver to 300dpi and the forms are generated in 600dpi, the printout would look strange, and all graphical parts are not printed.

If the quality of 300 dpi is not enough, then double the amount of sections needed to be used in order to check for 600 and 300 dpi resolutions. Also the amount of macros files needs to be doubled.

See in the start menu -> examples the MS Word example LetterHead.doc

 

Related articles: Dedicate a Form/ELP_Command to a queue, New rule/section