|
Printer - Print document |
Declaration
<AMPRINTER ACTIVITY="print" FILE="text" URL="YES/NO" SITE="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 impersonates the act of manually right-clicking on a file by way of 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.
Parameters
General
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
to print (enabled by default). Selecting this parameter
disables the URL parameter.
Automate will determine the associated application and request
that it prints the document. NOTE: The application must support printing in this manner. |
URL | Text | No | (Empty) |
|
If enabled, specifies the URL or web address of the web page to print (disabled by default). Selecting this parameter disables the Document parameter. |
Print on | Text | Yes | Enabled |
|
Specifies
the printers 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 Print on is set to Specific | Disabled | PRINTER="Brother MFC-9840C" | If enabled, specifies the name of the printer that to use to print the document. This parameter is required if the Print on parameter is set to Specific. |
Number of copies | Number | Yes | 1 | COPY="2" | The number of copies to print. |
Examples
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Example 1
This sample task prints a document to a specific printer.
<AMPRINTER ACTIVITY="print" FILE="C:\temp\myDoc.pdf" PRINTER="Brother MFC-9970CDW (Development)" COPY="2" />
Example 2
This sample task prints a document on all available printers.
<AMPRINTER ACTIVITY="print" FILE="C:\Documents\FAQs\faq.doc" PRINTER="allavailable" />