Print Tag |
Executes a print job.
<Print [JobName=Value] [WaitForJobToComplete=true/false] [Timeout=Value] [ReturnPrintData=true/false] [ReturnSummary=true/false] [ReturnLabelData=true/false] [ReturnChecksum=true/false]>...</Print>
The supported attributes include:
Attribute |
Required/Optional |
Description |
---|---|---|
JobName |
Optional |
The name that identifies the print job. |
WaitForJobToComplete |
Optional |
Waits for the print job to complete before sending a response if set to true. If not specified, WaitForJobToComplete will default to false. |
Timeout |
Optional |
The wait time period. If Timeout is set to -1, the timeout period is infinite. If WaitForJobToComplete is true, then time out after number of milliseconds if the job does not complete. |
ReturnPrintData |
Optional |
Returns the print data in the response if set to true. If not specified, ReturnPrintData will default to false. |
ReturnSummary |
Optional |
Returns the <Summary> tag in the response when set to true. If not specified, ReturnSummary will default to true. |
ReturnLabelData |
Optional |
Returns the <Pages> tag in the <PrintData> tag of the response when set to true. If not specified, ReturnLabelData will default to true. |
ReturnChecksum |
Optional |
Returns the <FormatChecksum> tag in the response if set to true. If not specified, ReturnChecksum will default to false. |
The following child element tags are supported:
Tag |
Required/Optional |
Description |
---|---|---|
Optional |
Sets the BarTender document being printed. |
|
Optional |
Sets BarTender's license server options. |
|
Optional |
Sets BarTender's media handling options. |
|
Optional |
Sets the name of the data source and its value. |
|
Optional |
Sets the document's print options. |
|
Optional |
Sets the query prompt options. |
|
Optional |
Sets how BarTender uses record set data. |
Each time a <Print> command is passed to BarTender, an XML response is generated. This response can contain general information about the print job, or it can contain more detailed information about the job, the printer, and the items printed in addition to the general print job information. You set the level of detail contain in the response by setting the ReturnPrintData, ReturnSummary and ReturnLabelData attributes to true or false. Refer to Response for a complete description of the information contained in the different response attributes.
Click here to view a response that includes print data, a print summary, template data and checksum values.
The following example will print a document and wait for the print job to finish printing before returning the response.
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">
<Command Name="Job1">
<Print WaitForJobToComplete="true" Timeout="20000" ReturnPrintData="true" ReturnSummary="true" ReturnLabelData="true" ReturnChecksum="true">
<Format>Document1.btw</Format>
</Print>
</Command>
</XMLScript>
The following example will print a document and return the response without waiting for the print job to complete.
<?xml version="1.0" encoding="utf-16"?>
<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">
<Command Name="Job1">
<Print WaitForJobToComplete="false" Timeout="20000" ReturnPrintData="true" ReturnSummary="true" ReturnLabelData="true" ReturnChecksum="true">
<Format>Document1.btw</Format>
</Print>
</Command>
</XMLScript>
BTXML Script version 1.0 (BarTender 8.0 and higher)
Related Topics