There was a problem loading the comments.

How To Merge (Or Attach) Multiple PDFs

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
There are two main options for merging PDFs:

1) You can merge all the PDFs created within a single batch

2) You can merge PDFs created externally to a batch (or from previous batches) during a burst

Both options are configured using your batch-specific INI options.

PDF Options

---

#1 Merging PDFs Within A Normal, Non-Bursting Batch

This first option takes all the PDFs you create in a batch (using File export option), and merges them into one PDF. Optionally you can add a header or trailer PDF file (PDFHeaderFileName or PDFTrailerFileName), set permissions (PDFPermissions), set a password (PDFPassword to open or PDFPasswordMaster to open and edit), and override the file output name (PDFOverrideFileName). Lastly, you can configure this merged file to be emailed, too (PDFEmailList and PDFEmailSubject).

Under the [PDF] group, simply add:

PDFMerge=YES

---

#2 Merging (or Attaching) Multiple Existing PDFs During A Bursting Batch

Sometimes you need to merge or attach numerous existing PDF files to file or email. We have some extended options for this. It can take a bit of thought to set up, but it's worth the time!

An important note... do NOT use the Message via Mail setting for the PDF merge settings. They 100% are not active for PDFMerge processing, because Message via Mail only has to do with pasting report output into the actual email, not merging or attaching anything.

Now, let's go over 5 bursting/attaching scenarios (you can tweak these scenarios to match your needs):

1) Use a crystal report to determine the email list, use the Mail Header and JNUser fields to customize the email, and then send out an email with *NO ATTACHMENT*
- Set the output format to Mail and type to PDF
- Use the new setting PDFBurstMerge=ATTACH-ONLY-BUT-DO-NOT-ADD-CURRENT-REPORT
- Set a VALID PDFBurstMergeDirectory= but the directory CAN be EMPTY (so our app searches a VALID directory, but the directory is empty); I would suggest creating a static directory (like c:\emptydirectory and always keep it empty for this purpose)
- Set PDFBurstMergeFileNamePrefix= to anything.pdf; since it's searching an empty directory it won't find anything
- Use your normal Subject= setting to customize subject (do NOT use PDFEmailSubject=)

2) Use a crystal report to determine the email list, use the Mail Header and JNUser fields to customize the email, and then send out an email with only a FIXED ATTACHMENT that was *previously* generated that is the same across my email group. Crystal report again is only generating JNuser fields for my email and the distribution list. Report itself is empty.
- This is really same as #1 except make sure attachments can be found
- Set the output format to Mail and type to PDF
- Use the new setting PDFBurstMerge=ATTACH-ONLY-BUT-DO-NOT-ADD-CURRENT-REPORT
- Set a VALID PDFBurstMergeDirectory= ; remember this is ONLY a directory, not a filename or filespec (that goes on next setting)
- Set PDFBurstMergeFileNamePrefix=
- Use your normal Subject= setting to customize subject (do NOT use PDFEmailSubject=)

3) Use a crystal report to determine the email list, use the Mail Header and JNUser fields to customize the email, and then send out an email with only a VARIABLE ATTACHMENT that was *previously* generated that varies across my email group but the name of the file is identifiable by JNUser fields.
- This is really same as #2 except you're using variables to set merge path and file names
- Set the output format to Mail and type to PDF
- Use the new setting PDFBurstMerge=ATTACH-ONLY-BUT-DO-NOT-ADD-CURRENT-REPORT
- Set a VALID PDFBurstMergeDirectory= (you can use your jnUserX variables, too); remember this is ONLY a directory, not a filename or filespec (that goes on next setting)
- Set PDFBurstMergeFileNamePrefix= (you can use your jnUserX variables, too)
- Use your normal Subject= setting to customize subject (do NOT use PDFEmailSubject=)

4) Send out an email that includes an attachment of the output from the crystal report MERGED with a VARIABLE ATTACHMENT that was previously generated that varies across my email group but the name of the file is identifiable by JNUser fields.
- Set the output format to Mail and type to PDF
- Use the new setting PDFBurstMerge=YES (this merges current report with other files requested
- Set PDFBurstMergeAppendCurrentReportFirstOrLast= to FIRST or LAST to indicate where the current report is located in merged PDF
- Set a VALID PDFBurstMergeDirectory= (you can use your jnUserX variables, too); remember this is ONLY a directory, not a filename or filespec (that goes on next setting)
- Set PDFBurstMergeFileNamePrefix= (you can use your jnUserX variables, too)
- Use your normal Subject= setting to customize subject (do NOT use PDFEmailSubject=)

5) Attaching current report with previouly generated reports (not merging them)
- Set the output format to Mail and type to PDF
- Use the new setting PDFBurstMerge=ATTACH-ONLY (this attaches current report with other files requested)
- Set a VALID PDFBurstMergeDirectory= (you can use your jnUserX variables, too); remember this is ONLY a directory, not a filename or filespec (that goes on next setting)
- Set PDFBurstMergeFileNamePrefix= (you can use your jnUserX variables, too)
- Use your normal Subject= setting to customize subject (do NOT use PDFEmailSubject=)




Share via

Related Articles

© Report Runner Support