Q: The customer is migrating from NCR printing to a Ricoh MFP. What they want is that every page they send from their application will print on pink paper, then be duplicated onto green paper, and then be stapled.

A: There are 2 ways to do that (for 100% HP compatible printers):

1. If you do not need to make copies,

Using method 2 below: ELP_Command=T200:2;

Staples always 2 pages of the job together.

Using method 3 below: ELP_Command=C1:2F25997R0;

Staples also page 1 and 2 together, but resets on page 2 the page counter to 0, so the next page is again a page one and the game restarts.

2. Using the ELP_COMMAND=R2;C1H4S0;C2H30S0;T200:2; (with copies)

R2; Makes 2 Copies from every page, in the form 11 22 33 44 etc. So every page is duplicated.
C1H4S0; Copy 1 is drawn from tray 2 with the Escape Sequence Esc&l4H and simplex is enforced
C2H30S0; Copy 2 is drawn from tray 5 with the Escape Sequence Esc&l30H and simplex is enforced
T200:2; Use Ricoh stapling top left, and staple together every 2 pages.

So every page is duplicated and the original and the copy is stapled together.

As the print document may contain download fonts etc. ELP will reprint for each 2 pages the whole job from the beginning. There is a command to HP printers, that you can tell them easily where to start.

Note: If you run that example on an non HP or Ricoh printer and the result is like this:

1 2
1 2 3 4
1 2 3 4 5 6

So always the first pages are reprinted. If that does not work then you know that your printer is not fully HP PJL compatible! So please do not use the R-Command but another method.

The real negative thing about that one is also, that if you print larger files in respect of the amount of pages, it could take the printer quite a long time to process and skip the first pages. But we know, up to 50 windows pages modern printers have no problem with that.


3. First split and then staple the job.

For this way, you need two ELP activated queues. The first one (QueueA) will receive the printed data and does not print at all. Instead it takes the data, reprints each page and splits the page out a second queue, which then inserts the staple command. In our example this is QueueB.

Note: If you direct the QueueA to the local port NUL, then you do not have a printer behind the queue which needs to be powered on. Otherwise add the command NoPrinting=ON into the QueueA rule/section.

You also need a dummy form 25997, which will tell ELP to split off the job right at the next form feed.

[Global]

; no changes here leave the standard key in


; Section named as the queue where the data is coming in, so this section is
; automatically executed on data arrival to that queue

[QueueA]

; R2; Command to may 2 copies in 11 22 33 44
: In the C1 command the page size is added, here A4
; In the C2 command the form 25997 is loaded now on every second page
; as this macro contains the file split command for the outport method, ELP will
; create in QueusB for every copy a new file

ELP_Command=R2;C1H4A26;C2H30F25997;

; So you need to change this to the actual real share name (max 8 characters)

OutPort=\\#HOSTNAME#\ShareNameOfSecondQueue

; last key needs to be enables, if the port from QueueA is a printer port and not NUL [QueueA]
; NoPrinting=ON


; Section named as the queue where the data is coming form QueueA, so this section is
; automatically executed on data arrival to that queue

[QueueB]

; now every job is stapled.

ELP_COMMAND=T200;

Again the theory what is going on:

  1. In the process step of the first QueueA ELP receives a file for example with 3 pages: 1 2 3.
  2. The ELP command itself generates a print job like this:

    1 1+Form 25997 2 2+Form 25997 3 3+Form 25997
  3. While writing this document out to the second queue using the OutPort command, ELP will find on every 2 second page with the help of the macro 25997 the ELP command directive Esc)s-997. This directive was included with the form loading trick and tells the out writing process to cut of the data right after the next formfeed and start a new print job.
    This is why the form ID is over 25000, so it will be every time loaded, and not only once and called.

    As a result and you can verify by setting the QueueB on hold, there will arrive 3 or maximum 4 jobs. Their content are:

    Job 1: Page 1 and its copy plus an empty macro 25997 which does nothing anymore.
    Job 2: Page 2 and its copy plus an empty macro 25997 which does nothing anymore.
    Job 3: Page 3 and its copy plus an empty macro 25997 which does nothing anymore.
    mabybe:
    Job 4: Which holds the de-initialization code of the incoming job to QueueA.

    If you want to get rid of Job 4, then use this statement in section Global: KillJobWithLessBytes
  4. Finally the ELP_COMMAND for stapling is performed on every job arriving in QueueB

Benefit of this method:

Tip:

If you want to do the same thing but you want to staple always 2 pages together, like incoming 12345678 out going: 1122(stapled) 3344(stapled) 5566(stapled)

Then change the QueueA ELP_COMMAND to this: R2;C1H4A26;C2:1H30;C2:2F25997;