Printer
Overview
Section titled “Overview”The Printer trigger starts a run for every PDF printed to one of the RUNOS PDF printers. Instead of a folder you only choose the printer; RUNOS takes its folder itself. So “print in the ERP” becomes a workflow without you having to know any paths.
It needs a printer on the Printer page (left bar). Without one the workflow does not start and reports that the printer does not exist.
The Printer trigger is a File trigger on the printer’s folder. Everything else works as there: spooler, Failed folder, script blocks, shared pool, {{FilePath}}, {{FileName}} and {{FileContent}}.
- Right away: a print starts the run immediately, not at the next check.
CronExpressionis only the fallback check (every 15 seconds by default). - Per user: the folder is the signed-in Windows user’s. On a terminal server each user handles only their own prints.
- Folder changed: if the printer gets another folder on the Printer page, the running workflow follows it by itself.
- PDFs only: the filter is always
*.pdf. - Several workflows on one printer: possible. Then every script block starts with the workflow name, see Shared pool. This also applies when a File trigger watches the same folder.
Structure
Section titled “Structure”"Trigger": { "Type": "Printer", "Name": "InvoicePrint", "Parameters": { "Printer": "RUNOS", "DeleteAfter": true }}| Parameter | Default | Meaning |
|---|---|---|
Printer |
– | Name of the RUNOS PDF printer, as on the Printer page. Required. |
CronExpression |
0/15 * * * * ? |
Fallback check of the folder; prints start the run right away anyway. |
All other parameters (DeleteAfter, NewName, ProcessMode, ConcurrentJobs, RepeatCount, GetFileContent, RemoveScriptFromFile, ScriptStart, ScriptEnd) are the File trigger’s. There is no Pool or Filter here.
Form in the editor
Section titled “Form in the editor”In the diagram, choose PDF printed to a RUNOS printer on the trigger. Under Printer you pick one of the RUNOS printers; below it is the folder the PDFs are saved in. If a printer is missing, create it on the Printer page and click the refresh icon. The other sections (Checking, Processing, Content and script blocks) are the File trigger’s.
Example
Section titled “Example”The ERP prints invoices to RUNOS and writes the recipient’s address into the document as a script block. Every print goes out by mail right away:
{ "Name": "InvoicePrint", "Trigger": { "Type": "Printer", "Name": "Print", "Parameters": { "Printer": "RUNOS", "DeleteAfter": true, "RemoveScriptFromFile": true } }, "Actions": [ { "Type": "MAPI", "Name": "Mail", "Parameters": { "Mode": "Send", "To": "", "Subject": "Your invoice", "Attachments": "{{FilePath}}" } } ]}The document contains: #RUNOS Mail.To=customer@example.com #RUNOS.
