How can I explode a PDF and only email a hyperlink of the PDF path to the email recipient?
I need to explode a large master PDF for the current pay run which will be split into many pay advices in PDF format for my employees. Rather than email these PDFs, I would like to suppress the attachment and instead, just include a link in the email, for each employee. This personalised hyperlinked path to their PDF must be capable of opening the PDF when clicked. Furthermore, I would like to know how to password protect each PDF with a password stored on each employee's file in our HR database.
This solution only applies to PDF-eXPLODE Version 4 onwards.
In the PDF-eXPLODE Options, please do the following:
- Select Variables menu item and on the right hand window, select the File Names tab. Then set the Var1 to be a File variable/ Full name. Make sure to check the box 'Use Variable for exploded file name'.
- Now select the tab Sub-Folder Names, and check the box 'Use Variable to create sub folder' and assign Var2 to sub-folder name.
- Click on the File Password tab and select 'Use variable as PDF password' and don't forget to create an owner password. This is critical to ensure proper security on the PDF file.
- Now check the box that says 'Use Variables in e-mails'
- Under General Settings, select the tab Default File/E-Mail Options and check the box : Suppress DATE_TIME on the exploded filename
- Create a new Message ID like "PayStubs". On the Exploded File tab, enter a path for File Path. (Assume: C:\PDF-EXPLODE\EXPLODED PDFS\). This is the parent path where we will create employee specific sub-folders and insert the exploded PDFs for each employee.
- Click on the Attachment tab and check the box 'Do not attach exploded PDF to e-mail'
- Click on E-mail Settings tab for the Message ID PayStubs.
In the Subject type
Your Pay advice for the period <Var4>
In the Message type:
Your pay for the period ended <Var4> has been deposited in your bank account.today. You can access your pay advice in PDF format by clicking on the following link:
Your PDF file is password protected. The password has been separately communicated to you earlier. Please enquire with your HR representative if you have not received your password.
Mark D Stevenson
In the email above, the hyperlink (in a Text email) starts with file:// The < > brackets enclosing the full path is used to overcome hyperlink breaks occurring when the file path has spaces in it.
If you are using HTML emails, then this hyperlink path shown above must be shown in an href statement like this:
<a href="C:\PDF-EXPLODE\EXPLODED PDFS\<Var2>/<Var1>.PDF">C:\PDF-EXPLODE\EXPLODED PDFS\<Var2>/<Var1>.PDF </a>
<Var1> = exploded file name which is allocated in the tag
<Var2> = sub-folder allocated for this employee specifically
<Var3> = employee first name
<Var4> = pay period
<Var5> = employee PDF open password
We recommend using the PDF-eXPLODE HTML editor for creating the HTML code and the hyperlink as other HTML editor will remove any <Var> statements as it conflicts with the HTML syntax whereas PDF-eXPLODE editor understands the keyword <Var> and will preserve the text.
Your tag in the PayStub report template would look like this:
<pdfexplode>12345_140920, Fonzerelli Marco, Marc,9/20/2014,MM99junee%PayStubemail@example.com</pdfexplode>
12345_140920 = 1st variable from database indicating the employee ID + _ + Date (yyymmdd) so that it will be unique from one period to another and sort in the folder
Fonzerelli Marco = 2nd variable - employee Last-First names to create a sub-folder under the Exploded PDFs folder parent path
Marc - 3rd variable showing the employee name for addressing the email
9/20/2014 is the pay date
MM99junee is the employee nominated password coming from the DB
'%' indicates the termination or end of Variables
PayStub# points to the Message ID created earlier - '#' joined to the word PayStub confirms that this is a Message ID
firstname.lastname@example.org is the personal email of the employee
You must make the tag font ARIAL /any pitch size >= 7. We recommend pitch 8 and color white, to suppress displaying the tag text on a white paper background.
Here is a sample email with a link.
You will send emails without any exploded PDF attachments. However the PDFs are archived to specific folders, one for each employee and their current pay period PayStub advice PDF is stored there. In future runs, the folder creation will be overlooked and the exploded PDF just saved to the folder.
If you also want the exploded PDF to be attached to the email, do not implement Configuration #7.