Format Tag |
Loads or activates a specific BarTender document. Also defines whether the document will be closed or saved following a print job.
<Format [CloseAtEndOfJob=true/false] [SaveAtEndOfJob=true/false]>...</Format>
Where ... is replaced with the name and path of the BarTender document.
The supported attributes include:
Attribute |
Required/Optional |
Description |
---|---|---|
CloseAtEndOfJob |
Optional |
If included and set to true, the document will close at the end of the print job. Valid options are true or false. |
DocumentPassword |
Optional |
Sets the document password required to open the document. |
SaveAtEndOfJob |
Optional |
If included and set to true, the document will be saved at the end of the print job. Valid options are true or false. |
If not specified, then all actions will apply to the active BarTender document. If no path is provided, the BarTender install directory is used.
You can load a file stored in Librarian using the path lib://<Folder>/<File>.
<Format> is an optional tag that is used with the <FormatSetup>, <Print> and <ExportPrintPreviewToImage> commands. If you execute a BTXML Script without the <Format> tag, you must have an active document for the script to use or you will receive an error until a document is activated.
|
Seagull recommends that you specify the complete path and file name of your BarTender documents. If the path is not specified and you are sending the BTXML commands as a file, the path will be relative to the location of the BTXML file. If the file isn't found at this location, or the BTXML is being sent as a string, the BarTender default document location is used. |
This example demonstrates the <Format> tag contained within the <Print> command. The <Format> tag can also be contained within the <FormatSetup> and <ExportPrintPreviewToImage> commands.
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">
<Command Name="Job1">
<Print>
<Format CloseAtEndOfJob="true" DocumentPassword="12345" SaveAtEndOfJob="true">Document.btw</Format>
</Print>
</Command>
</XMLScript>
BTXML Script version 1.0 (BarTender 8.0 and higher)
Related Topics