Print Tag |
Runs 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 the following.
Attribute |
Required/Optional |
Description |
---|---|---|
JobName |
Optional |
Specifies the name that identifies the print job. |
WaitForJobToComplete |
Optional |
When set to true, waits for the print job to finish before sending a response. If not specified, WaitForJobToComplete defaults to false. |
Timeout |
Optional |
Specifies the wait time period. If Timeout is set to -1, the timeout period is infinite. If WaitForJobToComplete is true, then time out after the specified number of milliseconds if the job does not finish. |
ReturnPrintData |
Optional |
When set to true, returns the print data in the response. If not specified, ReturnPrintData defaults to false. |
ReturnSummary |
Optional |
When set to true, returns the <Summary> tag in the response. If not specified, ReturnSummary defaults to true. |
ReturnLabelData |
Optional |
When set to true, returns the <Pages> tag in the <PrintData> tag of the response. If not specified, ReturnLabelData defaults to true. |
ReturnChecksum |
Optional |
When set to true, returns the <FormatChecksum> tag in the response. If not specified, ReturnChecksum defaults to false. |
The following child element tags are supported.
Tag |
Required/Optional |
Description |
---|---|---|
Optional |
Sets the BarTender document that is being printed. |
|
Optional |
Sets the BarTender license server options. |
|
Optional |
Sets the BarTender 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 that were printed in addition to the general print job information. You set the level of detail that is contained in the response by setting the ReturnPrintData, ReturnSummary and ReturnLabelData attributes to true or false. For a complete description of the information that is contained in the different response attributes, refer to Response.
Click here to view a response that includes print data, a print summary, template data, and checksum values.
The following sample code prints a document and waits for the print job to finish printing before it returns 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 sample code prints a document and returns the response without waiting for the print job to finish.
<?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