使用基于 URL 的自动化

要自动化 Print Portal 中的某些打印操作,可以在访问“打印”页面时,向浏览器窗口中文档的 Print Portal URL 地址内添加查询参数。下面是可使用的 URL 方案:

http://[ServerName]/BarTender/Print/[RootFolderNameOrID]/[RelativePathToDocument]?[parameters]

下面是可用的查询参数:

样本 URL

以下 URL 指定了您想要为名为“serial.btw”的文档打印两个序列化项目,该文档位于根文件夹的底层。

http://localhost/BarTender/Print/[RootFolderNameOrID]/serial.btw?SerialNumbers=2

以下 URL 指定了您想要为名为“AIAG_PT1.btw”的文档打印五个相同的副本,该文档位于根文件夹的“New Folder/AIAG”文件夹中。此外,还指定了将副本打印到“Easycoder IP”打印机。

http://localhost/BarTender/Print/[RootFolderNameOrID]/New%20Folder/AIAG/AIAG_PT1.BTW?Copies=5&Printer=Easycoder%20IP

以下 URL 与前面示例相同,不同的是在加载客户端打印模块后会自动打印文档(或根据需要显示数据输入表单)。

http://localhost/BarTender/Print/[RootFolderNameOrID]/New%20Folder/AIAG/AIAG_PT1.BTW?Copies=5&Printer=Easycoder%20IP&Task=Print

以下 URL 与前面示例相同,不同的是在加载客户端打印模块后会自动显示文档的打印预览(或根据需要显示数据输入表单)。

http://localhost/BarTender/Print/[RootFolderNameOrID]/New%20Folder/AIAG/AIAG_PT1.BTW?Copies=5&Printer=Easycoder%20IP&Task=PrintPreview

以下 URL 会将“Text Input Box 1”数据输入控件的默认值设置为值“Sample Text”。

http://localhost/BarTender/Print/[RootFolderNameOrID]/[DocumentName].btw?Text%20Input%20Box%201=Sample%20Text

以下 URL 指定了要用于打印作业的具名数据源。在此示例中,具名数据源为“Surname”、“StreetAddress”、“City”、“State”和“ZIPCode”。

http://localhost/BarTender/Print/[RootFolderNameOrID]/[DocumentName].btw?Surname=Jones&StreetAddress=206%20Elm%20Avenue&City=Fremont&State=WA&ZIPCode=98129