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

8 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

0
Avatar
Laura Vela
Moderator
Comment actions Permalink

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

Hi Laura,

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

SaveAfterPrintCondition="IfModified"

Tom Clowers

0
Avatar
Laura Vela
Moderator
Comment actions Permalink

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

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!

0
Avatar
Kathleen Stern
Comment actions Permalink

Hello,

Is there a way to do the opposite?  When I choose several labels to print to PDF, it ends up in multiple labels per page in the same PDF.  I have an older version of BarTender.  For example, I have 3000 items in my database.  I want to choose 100 specific ones to create PDF's of.  I want each of those 100 labels on an individual PDF.  I had to do it one by one, but am hoping there's a quick way to select multiple items at one time and have them saved out individually.  

0
Avatar
Laura Vela
Moderator
Comment actions Permalink

Hello Kathleen,

Thank you for your message.

If you want each label to be on an individual PDF file, one approach could by having each label print on individual print jobs (instead of all together within one print job). If you are automating the printing with our Integration Platform, you could achieve this by making use of the 'For each database record' action, so that for each record on your database (or for each record you want to print) the print action is repeated (for this the Print action needs to be 'nested'), therefore creating separated print jobs and thus individual PDF files per database record:

If you are not automating BarTender, you could simple repeat the Data Entry form automatically, so that only one record is selected at a time but, the record selection dialog keeps being displayed until cancelled:

 

Alternatively, another approach would be to use the Document/Form actions to, for example:

* Try to replicate the configuration above (so to implement the 'For each database record' action)

* Try the 'Export to PDF' BTXML option (mentioned on the first messages of this forum)

 

Let me know if this helps

Please sign in to leave a comment.