Save PrintPreview as a single pdf with multiple pages 追蹤

0
Avatar
Alexander Weber

When I try to export the printpreview with multiple labels to PDF, it creates also multiple PDFs. Is there a possiblity to merge/append the PDFs to get the printpreview as only one single PDF with multiple pages (without third-party tools)?

6 意見

1
Avatar
Laura Vela
版主
評論操作 永久連結

Hello Alexander,

Thank you for your question.

 

If you are using BarTender v2019 or v2021, an alternative you can use is the 'Print to PDF' method instead. As the new native PDF driver automatically generates the different records within the same PDF file.

To print to the native PDF driver using BTXML you can make use of the PrintToFileName tag in order to define the name and path for the generated PDF file:
http://help.seagullscientific.com/2019/en/#../Subsystems/BTXML/Content/PrintFileName_Tag.htm


An example of a BTXML script would then be:

<XMLScript Version="2.0" Trusted="true">
  <Command Name="Print Document">
    <Print SaveAfterPrintCondition="IfModified" ActionInitiated="true" ReturnPrintData="false" ReturnSummary="false" ReturnLabelData="false" ReturnChecksum="false" ReturnDataSources="false">
      <Format CloseAtEndOfJob="false" SaveAtEndOfJob="true" RegenerateThumbnail="false">C:\Program Files\Seagull\BarTender 2019\Templates\label.btw</Format>
      <PrintSetup>
        <Printer>PDF</Printer>
        <PrintToFileName MakeUnique="true" SelectAtPrintTime="false">C:\Users\lvela\Desktop\test.pdf</PrintToFileName>
      </PrintSetup>
    </Print>
  </Command>
</XMLScript>


If not, another alternative available in v2019 and v2021 might be to use an 'Add files to archive' option to group all PDFs into a single ZIP file (for example):

 

Let me know if that helps or further information is required!

Greetings.

0
Avatar
Alexander Weber
評論操作 永久連結

Hello Laura,

The 'Print to PDF' method solves this problem. Thx.

But ExportPrintPreviewToFile contains the possibility to print label borders, while 'Print to PDF' doesn't. Is it possible to print label borders?

Neither IncludeBorder nor BackgroundColor works.

Greetings

0
Avatar
Laura Vela
版主
評論操作 永久連結

Hello Alexander,

I am glad to hear the 'Print to PDF' method helped solve the issue.

Regarding the label borders, when printing this setting does not depend on the driver but on a setting available on the Page Setup > Shape > Print Borders option of the pertinent BarTender document:

Would this be helpful?

Greetings.

0
Avatar
Tom Clowers
評論操作 永久連結

Hi Laura,

Is there any documentation for this command in the Print command?

SaveAfterPrintCondition="IfModified"

Tom Clowers

0
Avatar
Laura Vela
版主
評論操作 永久連結

Hello Tom,

The only information I could find in the help system is for the command equivalent when working with the Print Scheduler API and our .NET SDK:

Do you have any questions about this command we might be able to help you with?

 

Greetings,

Laura

0
Avatar
Tom Clowers
評論操作 永久連結

Laura, no more questions. The included reference helps. I was concerned in using it that my template would be saved back out when I didn't want it to be. 

Thank you!

登入寫評論。