Merge Data to PDF
Occasionally, customers desire to have data from within their database be merged into an editable/interactive PDF file (Also known as PDF Forms). This documentation will walk you through this process.
Note: The output you generated is not intended to be fed back into the database. This template's sole purpose to quickly and efficiently generate pre-filled PDF forms for you.
Video Walkthrough
To begin, you must have access to an editable PDF file, as m-Power will not create one for you. Save this editable pdf file to your m-Power folder. mrc recommends placing this file in a new folder called "pdf" directly off of your root m-Power folder.
Next, build a retrieval application, choosing the "Merge Data to PDF" template. Be sure to select all tables and fields that you would possibly wish to utilize in your PDF Merge. Be sure to sequence by your unique key(s) and build the application.
Prior to running the application, open "Application Properties," and navigate to the "Map PDF Fields" tab.
Be sure to specify to your application, via the "PDF_File_Name" option, the location of your editable PDF file. Note that you can use ${mpower} to specify the root m-Power folder.
While here, be sure to set the "PDF_File_Variables" option to "Yes". This option will allow you to determine the specific input names used with your PDF file. Press Accept.
When you run the application, you will be presented with a listing of every editable field within the PDF file, as well as the input type (Text, Checkbox, etc..) associated with this input. Please print this page.
Next, return back to "Application Properties," and navigate to the "Map PDF Fields" tab once again. Seeing as you no longer need the PDF's input listing, you must change "PDF_File_Variables" to "No." Below this option you will find a listing of all of the fields with your application. Here you will assign the PDF's input boxes to your application's fields. You need not assign every field to a PDF input, but any fields not mapped will not be merged into your PDF output.
Once completed, press OK. When you run the application now, since your "PDF_File_Variables" flag is set to "No" your application will automatically generate a PDF file for you.
Note: Since the Merge Data to PDF is a retrieval, you may use standard retrieval URL syntax to call this application directly from another application. For example, lets say my Merge Data to PDF application was sequenced by Employ_Id. If I have a separate retrieval that lists all of my employee information, I could build a link that calls the Merge Data to PDF passing in slnk=1 and Employ_ID= the current employee id. When an end-user clicks on the link at run-time, the PDF would automatically be generated for the end-user.
Note: Also available in the application properties are the options to customize the PDF output filename and to flatten the PDF. Type the desired filename into the Output PDF Filename property, including the .pdf extension (i.e. output_name.pdf). The Flatten PDF Form property will make the PDF output not editable after output. If Preserve PDF Form is selected, users are able to edit the PDF form.