How can I automatically print one or more exploded PDFs that were not emailed?
I have a large multi-page Invoice report that must be exploded into several PDFs. Each of the exploded PDFs are assigned a destination email if the Client has an email address in the database. However there are a handful of Clients with no emails for which the Invoice must be printed and mailed via the postal service. It can be a huge problem finding the Invoices to be printed once the batch is processed and then getting them manually ready for mailing. Is there a more efficient way to deal with this process?
Yes - there is. Let us look at the few ways we can set 'no-email address' Invoices to print without you having to locate them in the batch and print them one at a time.
This idea can be used with or without a Message ID. Let's look at what is a Message ID first.
A Message ID is another name for a processing batch or processing type. It is ideal for collating different Job streams like Invoicing, Statements, Payroll, etc. The Message ID must consist of one word with no spaces. When used in a report tag, it must be shown as a text or label with the '#' character immediately after it - this indicates to PDF-eXPLODE that the word preceding the '#' is a Message ID. It is generally found immediately before a database field - email address. In the case where there is no email address the tag will most probably end with <pdfexplode>Invoices#</pdfexplode> or where the tag is populated by the database with an email address, it will end up like: <pdfexplode>Invoicesfirstname.lastname@example.org</pdfexplode>.
So in your database email field , you could insert the word "PrintThis" or "PrintMe" whenever no email address exists. As time passes, this "PrintMe" data in the email field will be replaced with valid email addresses as Clients provide you with their email address. However in the meantime, PDF-eXPLODE will collate ALL pages with an exploded tag of <pdfexplode>Invoices#PrintMe</pdfexplode> into one PDF. and will save them to the exploded path you have nominated under Exploded Path in the Invoices Message ID configuration. Now under General Settings (in the PDF-eXPLODE Options screen), please check the box "Suppress DATE TIME on exploded filename" in the Default File/Email Options tab.
In the Message ID configuration (for Invoices), you should leave the 'Exploded Filename' blank as shown in the graphic below.
This means the exploded filename created by PDF-eXPLODE (as in the tag examples) will be Invoicesemail@example.com and Invoices#PrintMe.pdf , which will consists of all pages that did not have an email address, rather the word 'PrintMe' in the database email field. All exploded PDFs will be saved in the exploded file path shown in the graphic below as C:\Program Files (x86)\PDF-eXPLODE\EXPLODED PDFs
To automatically print the Invoices#PrintMe.pdf you need to configure the following before you commence processing. The following screen under Completed Processing Notification/ Program Processing should be completed as follows:
Choose Before or After
Program to Run - choose PeXPrintPDF.EXE (in the installed PDF-eXPLODE folder - version 4 only )
Program Parameters: enter -PRINT, [PATH TO EXPLODED FILE]\Exploded Filename.pdf, [Printer name]
To print to the default printer, do not include the ,[Printer name], else show the printer name WITHOUT double quotes. The  brackets should not be used either.
For PDF-eXPLODE Version 3:
Program to Run - choose Foxit.exe (from the PDF-eXPLODE installed folder)
Program Parameters: enter /t "[PATH TO EXPLODED FILE]\Exploded Filename.pdf", "Printer name"
For any printer include the Printer name between double quotes and the path of the file to be printed between double quotes also.
Now "Test Program". Save the configuration. At processing time, PDF-eXPLODE will send the PrintMe PDF to the nominated printer at the end of the emailing of exploded files. Each time you run the Invoices and print the batch to PDF-eXPLODE, the PrintMe PDF will be triggered at the end of PDF-eXPLODE processing and its size will diminish as the "PrintMe" data field gets replaced with an email address over time.
If you choose not to use any Message ID in the tag, then your Tag would be an email address like this:
<pdfexplode>firstname.lastname@example.org</pdfexplode> and when there is no email address, the Tag would be
Then your exploded file for printing will be PrintMe.pdf and not Invoices#PrintMe.pdf
If you are having problems printing using the EXE, then you can achieve the same result with a BAT file in the Program to Run and keep the Program Parameters blank. To create the BAT file, do the following:
- Open Notepad and type the following:
For PDF-eXPLODE v4 use the following in PrintMe.BAT
PeXPrintPDF.exe -PRINT, C:\PROGRAM FILES(X-86)\PDF-eXPLODE\PrintMe.pdf, [Printer Name]
For PDF-eXPLODE v3 use the following in PrintMe.BAT
Foxit.exe /t “C:\PROGRAM FILES(X-86)\PDF-eXPLODE\PrintMe.pdf” “Printer Name”
- Now save the file as PrintMe.Bat into the installed folder
- Program to Run: C:\Program Files (x86)\PDF-eXPLODE\PrintMe.Bat
- Program Parameters : blank.
If your report writer (like Crystal Reports) has the functionality to write If/Then/Else logic in a formula, then you have the capability to write calculated fields to populate the Tag. In this processing Idea, the blank database email field need not have the word PrintMe as the data field text.
Create the following formula called "PeXTag" (suitable for Crystal Reports - '//' means that text on the line which follows, is a comment)
Check and then Save this formula in the Crystal Reports Formula interface .
Now create a blank text control, the width of the page and inserted into the Page Header. Then drag the formula field PeXTag into the field and it will display as @PeXTag. Now make the font 7 pitch, Arial and white in color. In PDF-eXPLODE options, configure 2 Message IDs - 1. Email_IT, 2. Print_IT
Notice that the Print_IT message ID has the Print check box checked and the drop down selection shows ONLY (don't E-mail). In the Exploded Path you may want to show a specific path where the Print_IT message file will be saved: