Testing and Debugging Dynamic PDFS
When designing PDFs, you will likely need to submit your form multiple times, and check the results and make small tweaks until you get the layout exactly how you want it. These tips will help streamline your testing efforts:
Typically, to review a generated PDF, you would submit the form, and then go to your Database Browser, look for the desired record (probably the most recent one), and double-click on the corresponding column/link to download the PDF. This can take a lot of time if you have a long or complex PDF with several fields requiring each section to be checked.
Here are a couple of faster alternatives.
Record Details View (Updating)
You can use the Record Details View to access the generated PDF, and if you have updates enabled on the PDF, you can update the record (you only need to make a small change to any one field), click update, and then open the generated PDF after it has been updated. The only requirement to using this option is to ensure the Update Option property of your PDF template is set to true. Doing so forces regeneration of the PDF when an existing record is updated.
Using An Autoresponder Thank you Page
You can create an AutoResponder > Thank-you Page with either a link to your PDF or an iframe that has the src attribute set to path to the PDF using a wildcard for the PDF field/column. Using this method, you can submit the form once, and then hit the REFRESH button of your browser to re-submit the form (without having to fill it out again!), and view the updated PDF.
To use this method, create an Autoresponder profile for your form, go to the Thank You Page and in the text editor, click Source. This puts you into HTML mode.
Easy Option: Link to the PDF on the Autoresponder Thank-you Page:
Add the following code to your Thank you Page (in source view), replacing the path to the form with the unique path to your form.
<a target="new" href="https://forms.logiforms.com/formdata/user_forms/600001_345234/303332/attachments/[wildcardForThePDF]">View PDF [wildcardForThePDF]</a>
Advanced Option: Embedded PDF within an IFRAME
Add the following code to your Thank you Page (in source view), replacing the path to the form with the unique path to your form.
<iframe width="700" height="1000" src="https://forms.logiforms.com/formdata/user_forms/600001_345234/303332/attachments/[wildcardForThePDF]"></iframe>
Exit the source mode and save the page.
After a form is submitted, you immediately see the rendered PDF. Right-click on the iframe object to edit its properties. The width is best set to 100%.
Don't forget to use the unique Path to your Form
In all of these examples, you must replace the path to the form with the unique path to your from. The "600001_345234/303332" segment is a unique reference to your form and account. You can get this URL from the Direct Link option within the Integration Wizard.Enable PDF Debugging
If you are familiar with HTML, you can submit the form in debug mode. To do so add a URL parameter enablepdfdebugging set to true as in the example below:
https://forms.logiforms.com/formdata/user_forms/600001_345234/303332/?enablepdfdebugging=true
This will output the HTML code fed to the PDF engine and the browser rendering of it. You can check the code for any problem areas.
0 Comments