Format Tag |
Loads or activates a specific BarTender document. Also defines whether the document is closed or saved after 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 the following.
Attribute |
Required/Optional |
Description |
---|---|---|
CloseAtEndOfJob |
Optional |
If included and set to true, the document closes at the end of the print job. Valid options are true or false. |
DocumentPassword |
Optional |
Sets the document password that is required to open the document. |
SaveAtEndOfJob |
Optional |
If included and set to true, the document is saved at the end of the print job. Valid options are true or false. |
If not specified, then all actions apply to the active BarTender document. If no path is provided, the BarTender install directory is used.
You can load a file that is stored in Librarian by using the lib://<Folder>/<File> path.
<Format> is an optional tag that is used with the <FormatSetup>, <Print> and <ExportPrintPreviewToImage> commands. If you run a BTXML script without the <Format> tag, you must have an active document for the script to use. Otherwise, you receive an error until a document is made active.
|
We recommend 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 is relative to the location of the BTXML file. If the file is not found at this location, or if the BTXML is sent as a string, the BarTender default document location is used. |
The following sample code shows the <Format> tag as being contained in the <Print> command. The <Format> tag can also be contained in 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