Printer - Print Document
Declaration
<AMPRINTER ACTIVITY="print" FILE="text" PRINTER="text" COPY="number" />
Description: Prints the document specified using the default printer or optionally, using a specific printer or all available printers.
Practical Usage
Used to instruct an application to print a document. This activity mimics the act of manually right-clicking on a file via Windows Explorer and selecting Print. The document must have an application associated with it that can perform printing externally such as Notepad for .txt files or a word processor for .doc or docx files. Also, the application must support printing in this manner.
General Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Document |
Text |
No |
(Empty) |
FILE="C:\folder\readme.txt" |
If enabled, specifies the path and file name of the document that should be printed (enabled by default). Advanced Workflows will determine the associated application and request that it prints the document. The application must support printing in this manner. If this parameter is enabled, the URL parameter becomes inactive. |
URL |
Text |
No |
(Empty) |
SITE="http://www.networkautomation.com" |
If enabled, specifies the URL of the web page to print (disabled by default). If this parameter is enabled, the Document parameter becomes inactive. |
Print on |
Text |
No |
Enabled |
|
Specifies the printer(s) that the document should be printed on. Since only the default printer supports the ability to print URLs, this parameter is available only if the Document parameter is enabled. The available options are:
|
Specific printer |
Text |
Yes if set to Specific |
Disabled |
PRINTER="Brother MFC-9840C" |
If enabled, specifies the name of the printer that should be used to print the document. Only available if the Print on parameter is set to Specific. |
Number of copies |
Number |
No |
1 |
COPY="2" |
The number of copies to print. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Examples
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Sample 1: Print document "C:\temp\myDoc.pdf" to a specific printer "Brother MFC-9970CDW (Development)".
<AMPRINTER ACTIVITY="print" FILE="C:\temp\myDoc.pdf" PRINTER="Brother MFC-9970CDW (Development)" COPY="2" />
Sample 2: Print document "C:\Documents\FAQs\faq.doc" on all available printers.
<AMPRINT FILE="C:\Documents\FAQs\faq.doc" PRINTER="allavailable" />