ExportPrintPreviewToImage Response Tag |
Each time an <ExportPrintPreviewToImage> command is passed to BarTender, an XML response is generated. If the ReturnImageInResponse attribute is set to false, the response contains user, server, and command information followed by the <ExportPrintPreviewToImage> command as an empty element tag: <ExportPrintPreviewToImage/>. The closing tags for command and the response follow. The following example shows a response.
<?xml version="1.0" encoding="utf-16"?>
<Response Version="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>Server</Server>
<Command Name="Job1">
<ExportPrintPreviewToImage/>
</Command>
</Response>
If the ReturnImageInResponse attribute is set to true, the response contains all of the image data in Base64 format. The following example shows a response that contains the image data in Base64 format.
<?xml version="1.0" encoding="utf-16"?>
<Response Version="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>
<Command Name="Job1">
<ExportPrintPreviewToImage>
<ImageData ImageFormatType="jpg" Page="1"/9j/4AAQSkZJRgABAAEBLAEsAAD//gAfTEVBRCBUZWNobm9s
b2dpZXMgSW5jLiBWMS4wMQD/2wBDAAICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgL/xAGiA...
...AUAFABQAUAFABQAUAFAB
QAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH/2Q==</ImageData>
</ExportPrintPreviewToImage>
</Command>
</Response>
|
This example illustrates the large size of responses that contain the image data in Base64 format. The example contains the response for a document that printed six items that have six text fields on each template. The majority of the Base64 data code was removed from this example, because the purpose was to demonstrate the structure of the file, not to show the entire content of the response. The entire response was a 64KB file that included 1,245 lines of code when it was saved as a .txt file. The example serves to remind users of the size of Base64 files and the space that is needed to store such files. |
<Command> Response
BTXML Script version 2.0 (BarTender 9.0 and higher)
Related Topics