Save PrintPreview as a single pdf with multiple pages Follow

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)?

2 comments

1
Avatar
Laura Vela
Moderator
Comment actions Permalink

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
Comment actions Permalink

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

Please sign in to leave a comment.