Returning Template Data in the Response

When you set the ReturnLabelData attribute to true or do not include the attribute at all, a response is returned that includes the print job information that is described in the ReturnPrintData attribute and a detailed definition that includes page, template, object, and data source information. This response can be used to validate and reprint the print job. For a description of the various tags, refer to Pages Response Tag.

When you set the ReturnLabelData attribute of the <Print> command to false, a response is returned that does not include any template data.

The following example shows the response that is returned when the ReturnLabelData attribute is set to true and the ReturnSummary attribute is set to false.

<?xmlversion="1.0"encoding="utf-16"?>

<ResponseVersion="2.0"Name="09232006_103601_Job1"ID="123"AppName="BarTender"AppVersion="9.00"AppVersionId="900"AppVersionMajor="9"AppVersionMinor="00"AppVersionBuild="2345"AppInstancePid="12345"AppInstanceGUID="(5EFC7975-14BC-11CF-9B2B-00AA00573819)">

<User>Administrator</User>

<Server>MyServer</Server>

<CommandName="Cmd1">

<PrintGUID="{C87068F8-4972-41F1-A6E8-724381703764}"JobName="MCIJob"ID="1234"JobLastStatus="Sent"JobCompleted="true">

<JobStatusCompleted="true">

<TimeJobStart>02:24:34</TimeJobStart>

<TimeJobQueued>02:24:34</TimeJobQueued>

<TimeJobSent>02:24:34</TimeJobSent>

<LastStatus>Sent</LastStatus>

<Description>Finished sending print job to printer.</Description>

</JobStatus>

<PrintData>

<PagesTotalLabels="2"TotalPages="2"MediaHandling="true">

<PagePrintedPageNumber="2"TotalPages="2"Status="Printed"MediaHandlingAction="Pause">

<LabelPosition="1">

<ObjectName="Text 1"Type="Text">

<SubStringPosition="1"ShareName="Sub-String 1"Type="Screen Data">

<Value>John Doe</Value>

</SubString>

<SubStringPosition="2"ShareName="Sub-String 2"Type="Date">

<Value>4/24/2007</Value>

</SubString>

</Object>

<ObjectName="RFID 1"Type="RFID">

<SubStringPosition="1"ShareName="RFIDCode"Type="Database">

<Value>30705E30A700004000000001</Value>

</SubString>

</Object>

</Label>

<LabelPosition="2">

<ObjectName="Text 1"Type="Text">

<SubStringPosition="1"ShareName="Sub-String 1"Type="Screen Data">

<Value>John Doe</Value>

</SubString>

<SubStringPosition="2"ShareName="Sub-String 2"Type="Date">

<Value>4/24/2007</Value>

</SubString>

</Object>

<ObjectName="RFID 1"Type="RFID">

<SubStringPosition="1"ShareName="RFIDCode"Type="Database">

<Value>30705E30A700004000000002</Value>

</SubString>

</Object>

</Label>

</Page>

</Pages>

</PrintData>

<MessageID="1606"GUID="{8A8E8550-C822-4e84-8713-212793DFD6E1}"Severity="Information"Category="Miscellaneous"Response="OK">

<Text>

BarTender successfully sent the print job to the spooler.

Job Name: MyJobName

BarTender Document: Document1.btw

Printer: Datamax H-4212 7.1.4

</Text>

</Message>

</Print>

</Command>

</Response>