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.
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 new 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 select a unique Dimension field(s) and then build the application.
Prior to running the application, open “Edit Properties,” and navigate to the “Map PDF Fields” tab:
Be sure to specify to your application, via the “Data to PDF Retrieval” option, the location of your editable PDF file.
While here, be sure to set the “List PDF Variables” option to “Yes”. This option will allow you to determine the specific input names used within your editable PDF file. Save the properties once done.
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 “Edit 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 “List PDF Variables” back 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 “List PDF Variables” property is set to “No”, your application will automatically generate a PDF file for you.
- 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.
- 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 output filename must be different than the source PDF filename. 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.