ELP offers various methods for calling any external software. The argument length must not exceed 254 characters.

Key name Purpose
CallAtStartUp This ELP key is executed right at the beginning of the process, before the first data stream bytes are even read.
It is used for example to get access to the Active Directory or to user interfaces like Job Ticketing or Project Accounting or collect any external data out of your data bases, or bring in your own data stream manipulation, if needed..
CallAtNextFormFeed Right before processing the coming up FormFeed, ELP can call an external Software.
This function was mainly developed to merge additional documents into the data stream, e.g. data sheets on the back of the page, according to an article offered on the front page..
CallNow As key call, but this is not executed at the end of the software execution, instead it is executed at the time the key is found in an activated searched or triggered rule
Call
CallNoPrint
Calls any external software right at the end of the data stream, e.g. batch files can sort data streams and resend them to queues. There is also a possibility to read back any other gathers data stream.

 

Variables can be added to any key's argument. They are automatically surrounded by "", if that should not happen, add at the end of the arguments ;OFF (Case sensitive)

A second case sensitive opererator ;NOW can be added at the very end of the argument, even behind the ;OFF. Once set, ELP does replace all known variables in the argument at the time the rule is executed. Missing variables will be replaced later (default) right before the call is executed.

As ELP waits for each call until the external Software is finished. call commands can be cascaded or called even out of different rules. A collection of commands is processed in its reversed definition order!

IMPORTANT: The following keys must be used in the same rule/section as the call command. Once set, the key rules all call executions.

Key name Purpose
CallVisible Windows only: All CALL commands are usually executed silent and invisible in the back ground. But just in case they need a unser interaction, then turn this command on. The command is used with PJ_notify.exe and avoids to switch back to the system console.
Just in case they need a user interaction (or simply for checking beside turning the Show Executable in Admin Tab , then turn the key ON. The command is used together with PJ_notify.exe and avoids to switch back to the system console.
CallDoNotWait Windows only: ELP will start the execution of the requested Call command and will continue direct without waiting for any result from the called software.
For example to execute a parallel process, which speeds up the ELP processing time.
Call_via_PJ_Notify Windows only: The called process / software is started under the user rights of the logged in user on the ELP server / PC. Is no user logged in, ELP does execute the Call command invisible under the user system.

 

 

CallAtStartUp method

This function is called right after the rules before reading the data stream are evaluated. So the command needs to be placed in one of those sections: GLOBAL, Printer-,, Driver-, and or User-Name.

Section: CallAtStartUp:

Before the key is called, ELP reads all variables, counter and Sleep keys out of the section "CallAtStartUp" from the actual ini file.
Also the already available variables can be stored there to any file using the Variables_Store key. So they are accessible for external software.
The key "DoNotProcessIncomingStream" can only be used in the section CallAtStartUP. Turned ON, ELP will not process the original incoming data stream, instead the returned stream is processed by using the -R command line option of the CallAtStartUp key. The returned stream size limit is the size of the "Unsigned int" space. If you run 32 Bit Windows it is 4 Gigabyte. If you have less memory available, like 3 GByte Ram minus Windows minus whatever, results in maybe 1 Gigabyte RAM, then use key ELP_MAX_HEP to limit the size.

So a typical usage of the key is like that: call an external software called acc_project in the welp main directory, pass over 4 arguments and read back a file which is named like the processed outgoing file name.

CallAtStartUp=#ELP_PROG_PATH#acc_project.exe "-P1#PRINTERNAME#" "-P2#PCNAME#" "-P3#USERNAME#" "-P4#PRINTDOCNAME#" "-R#OUT_ELP_FILENAME#.acc";OFF

It is possible to return a new ini file with the just the rule GLOBAL, as well as a new data stream, or just an ELP_Command surrounded by << and >>.

IMPORTANT:

  • Different to the following function keys, the CallAtStartUp returned data are processed through the converter.
  • The data can be read back using the CallReadBack key or the -R command line parameter. If a CallReadBack key is provided, the -R argument is NOT used!
  • The handed over "-R[Path]file name" can either be filled with any data streams, which will be processed in front of the real data stream, or an ini file from which just the section GLOBAL is analyzed and performed.
    The return file my look like this (\x1B is Hex1B or ASCII 27), An example for this is the Job Ticketing or Project Accounting

    \x1B%-12345X@PJL ENTER LANGUAGE=ELP
    [GLOBAL]
    ; Make two copies
    ELP_COMMAND=K2;C1F500;F2F500F300;
    ; Define an new variable
    Variable=#MyExternalVariable#=This is an external variable
    \x1B%-12345X

    If your function writes a variable file, which ELP needs to read, then the key VARIABLE_FILE for this application can't be used in the section GLOBAL nor in the sections with User- or Printer name, because the CallAtStartUp key is always performed after the variables are read.
    In this application, the file needs to be read either with a search (if you need the result early) or more simple with a Triggered section, which becomes always true.

    [GLOBAL]
    . . .
    ; The software myStartUPELP analyzes some stuff and
    ; generates the variable file on the fly
    CallAtStartUp="c:\Program Files (x86)\WELP\myStartUpELP.exe" #PRINTERNAME#
    . . .

    [Start process via trigger]
    ; Is always true
    Trigger_Binary=1
    ; read the variables before execution, but after the
    ; CallArStartUp
    Variable_File=c:\ProgramData\WELP\#PRINTERNAME#.var
    ; in this case print the varable in a macro on the first page
    ELP_COMMAND=C1:1F1000;

Sometimes it could be, that the CallAtStartUp needs just to be performed for certain data streams. In that case you may also put the call into a triggered rule, which needs to be evaluated right out of the startup rules.

[GLOBAL]

; Primary trigger always true

SetTrigger=1:ON

; Evaluate first this rule

TriggerSection=Check at front if it is an MS Word document

[Check at front if it is an MS Word document]

; Primary trigger is always true

Trigger_Binary=1

; Secondary Trigger is only true if the job comes from MS Word

Trigger_Variable=LEFT(#PRINTDOCNAME#,16):Microsoft Word -

; use the ELP command to print on all pages the Form 1000

CallAtStartUp=c:\programme\welp\myStartUpELP.exe #PRINTERNAME#...

 

The CallReadBack key

As explained above, this key is pretty much the same as the -R argument of the Call keys. It is used to insert possible print data from the external software into the actual data stream. You may use any at the time of the command call existing variables or the hex notation \x##.

The CallReadBackKey has to be set in the same section as the Call keys.The readback file is removed through ELP, but NOT the variable file.

As an example find here a process, which calls at the end of the data stream Microsoft Word, executes a macro and reads the printed resulting data. The information what Word has to do are stored in ELP as variables and exported into a file, which Word interprets. On request this macro can be provided for free of charge.

[EPS001]

; Searches for a trigger key !EPS001! in the data stream

Search_Binary=!EPS001!

; The key is deleted from the data stream and

Erase_Binary=ON

; the next word is stored into variable #EPS001# and also erased

; from the data stream.

StoreNextWordToVariable=#EPS001#

; At the end of the execution, all Variables are stored in this file

Variables_store=d:\peter\eps.var

; and after this MS Word is called and macro epsdrucker1 executed

call=\x22c:\Programme\Microsoft Office\Office10\winword.exe\x22 /mepsdrucker1"d:\peter\word.prn";OFF

; This macro will print into the file word.prn which is inserted by

; ELP in the current data stream.

CallReadBack=d:\peter\word.prn


CallAtNextFormFeed method

Right before processing the actual page FormFeed, ELP will call an external Software. As the software still processes most files, there will be no access to them. This function was developed for example to merging on the fly PDF documents in a PCL datastream .

All methods described below in the CALL method apply.

Note before the key is called ELP reads all variables, counter keys and Sleep time out of the section "CallAtFormFeed" from the actual ini file.


Call method

This is probably the most commonly used call command. Here are just some of the most often used functions:

  • Archive each single the job, and if for X mins no other job arrives, print them all together in one data stream. This example can be found in the old QA.pdf document, accessible via the start programs menu.
  • print all jobs in a directory to a certain queue


    Call=cmd /C copy /b "#ELP_FORMS_PATH#Archive\#USERNAME#\*.*" "\\#HOSTNAME#\ELP_OUT";OFF

    ; If the files should be deleted (remember the reverse order)

    Call=cmd /C del /Q "#ELP_FORMS_PATH#Archive\#USERNAME#\*.*";OFF

    Call=cmd /C copy /b "#ELP_FORMS_PATH#Archive\#USERNAME#\*.*" "\\#HOSTNAME#\ELP_OUT";OFF

  • To print all files in a directory as single jobs:


    Call="#ELP_FORMS_PATH#MyCopy.bat" "#ELP_FORMS_PATH#Archive\#USERNAME#" ELP_OUT;OFF


    The content of the MyCopy.bat file is:

    echo "ELP PATH: " %1
    echo "Printer share name " %2

    rem dump out all file as a single job, see for command explanantion

    FOR %%i in (%1\*.*) do cmd /c copy /b "%%i" \\127.0.0.1\%2

    rem and delete afterwards
    del /Q %1\*.*

  • There are some examples at: Archiving, Distribute data streams.

Before the key is called, ELP reads all variables and counter keys out of the section "CallAtEnd" from the actual ini-file. Also the variables can be stored to file using the Variables_Store key.

The additional key CloseArchivesBeforeCall=ON can be used to close the actual still open archive file, to have full access to them.

Like all the other call commands, it is allowed to use in the argument line any ELP variable. By default the variables are replaced with their content AND surrounded with "". If your Software have problems with this, then add the operator ;OFF at the very and to the CALL argument line.

Example of how to send an outgoing data stream from a host system to any network printer: Add to any triggered rule in the ini-file the following two keys:

OUTARCHIVEDIR=#ELP_FORMS_PATH#Archive
CALL=cmd /c "copy /b #LAST_ARCHIVE_FILE#" "\\#HOSTNAME#\go9000mfp";OFF

The disadvantate of this is, that the files will remain on the harddisk, so either add the delete command as in the example above or simply use the OutPort key.

 

Tip: Some software like the Lincoln PCL2TIFF wants to open files exclusively. As you want to access maybe still open files, you may need to generate a batch file, and copy the file to a temporarily new file or archive the job and use CloseArchivesBeforeCall=ON before you call apply any external action on that file.

Another CALL example how to send an info, that a job starts printing;


CallNoPrint method

Works exactly the same as the Call method, but the outgoing data is erased, so there will be no printout. It is the same as using the CALL and NoPrinting=ON keys.

CallNow

Works pretty much as the key call, but this is not executed at the end of the software execution, instead it is executed at the time the key is found in an activated searched or triggered rule.

Section: CallNow:

Before the key is called, ELP reads all variables, counter and Sleep keys out of the section "CallNow" from the actual ini file.
Also the already available variables can be stored there to any file using the Variables_Store key. So they are accessible for external software.

[Gloabal]

Preparsing=ON

 

[Archive invoices]

Trigger_Windows_New=Invoice No.:
 

; delete existing archive file, if there

CallNow=cmd /c del /Q #ELP_FORMS_PATH#Archive;invoice_#DATESERIAL#;OFF
 

; And store the file

OutArchiveDir=#ELP_FORMS_PATH#Archive;invoice_#DATESERIAL#

 

 

Example for special sections CallAtFormFeed, CallAtEnd and CallAtStartUp:

You use the tool www.verypdf.com in order to print PDFs directly through the windows driver and you want to differentiate between portrait and landscape jobs:

[My rule which calls and Prints the PDF]

; Searches for a trigger key !EPS001! in the data stream

Trigger_Binary=WhatEver
OutArchiveDir=....
PDF_mode=...

Call=d:\PdfPrint_cmd\pdfprint.exe -printer #PRINTERNAME# -orient #VAR_ORIENTATION##LAST_ARCHIVE_FILE#

This will not work, because of 2 reasons:

  1. The command line of the product needs for orientation 1 portrait and 2 for landscape, but the variable #VAR_ORIENTATION# holds 0 and 1.
  2. A counter will also not work in that rule, as the rule is executed before the job is processed out, and the variable is set during the out writing.

The solution to this example is to increase the counter by 1 using the section CallAtEnd:

[CallAtEnd]

Counter=#VAR_ORIENTATION#

 

As this section is executed right before the call command, in our case at the end of the job, the result is a one for portrait and 2 for landscape.

Archiving Distribute data streams