FileNameTemplate Tag

ClosedDescription

Sets the file name template to use when saving print preview images.

ClosedSyntax

<FileNameTemplate>Value</FileNameTemplate>

Where Value is the file name template. It can include the optional %PageNumber% variable.

ClosedParent Tag

<ExportPrintPreviewToImage>

ClosedRemarks

You can create multiple image files using the <ExportPrintPreviewToImage> command. <FileNameTemplate> allows you to specify the unique file name for each image using a common file name and a variable page number.

If the <ExportPrintPreviewToImage> command generated three label pages using the following <FileNameTemplate> tag:

<FileNameTemplate>Preview_Page_%PageNumber%.jpg</FileNameTemplate>

The following three image files will be saved:

Preview_Page_1.jpg

Preview_Page_2.jpg

Preview_Page_3.jpg

If %PageNumber% is not used, then the page number is appended to the filename for each image file generated.

Required tag that is used with the <ExportPrintPreviewToImage> command.

ClosedExample

<?xml version="1.0" encoding="utf-8"?>

<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">

<Command Name="Job1">

<ExportPrintPreviewToImage ReturnImageInResponse="true">

<Format>c:\format1.btw</Format>

<Folder>c:\Images</Folder>

<FileNameTemplate>Preview_Label%PageNumber%.jpg</FileNameTemplate>

<ImageFormatType>JPG</ImageFormatType>

<Colors>btColors24Bit</Colors>

<DPI>300</DPI>

<Overwrite>true</Overwrite>

<IncludeMargins>true</IncludeMargins>

<IncludeBorder>true</IncludeBorder>

<BackgroundColor>16777215</BackgroundColor>

</ExportPrintPreviewToImage>

</Command>

</XMLScript>

ClosedRequirements

BTXML Script version 2.0 (BarTender 2.0 and later versions)