Populating PDF FormsPosted by: grantwood / Thursday, April 24, 2008 – 4:33pm
43
minutes
If you're in an industry where standardized forms are the norm, then the holy grail is automatically pushing data from your database into the required PDF. Yes, it's true, we still live in a world where forms consume most of the process. And this probably won't change too much over the years. If you've ever dreamed of taking those field values and shoving them right into the required form then the included technique file and videos in this mini series will provide you with everything you need. Not only has the work been done but there's a ton to learn from this wonderfully crafted FileMaker solution. The file is ready-to-go, the solution is based on freely available technology and the videos are worth the price of admission. Don't miss this series of videos if you have any desire to merge data from FileMaker into preexisting PDF forms! Details: Released - 4/24/2008 / Size - 2.73 MB / Length - 43 min
Filed under: videos | Subscribers Only
. Good Questions.
. grantwood said this on Saturday, April 26, 2008 - 1:28pm.
. @xoomaster 1) I can extract the fields names, including the accepted values used in checkboxes, radio buttons, etc. Then I could automatically create the key-value pairs to save you some time. You would only have to supply the values. A couple of issues when doing this: 2) Yes, you can add the form to the technique file. In terms of integrating this technique file into your own solutions, you don't need the patient-related tables. These are really good questions. I think I'll make a few changes to the technique file to address your questions. For #2 It will probably be better if I split the technique file into two files, one containing the patient-related data, and one containing the PDF-related data. I'll just need a little bit of time to do this, and I'll probably do a follow-up video that highlights the changes. Keep the feedback coming! Sean . . Hi Sean,.
. xoomaster said this on Saturday, April 26, 2008 - 4:17pm.
. Hi Sean, My main confusion is about access to a preexisting PDF file/Form like I mentioned above. "1) I can extract the fields names, including the accepted values used in checkboxes, radio buttons, etc. Then I could automatically create the key-value pairs to save you some time. You would only have to supply the values." How can you extract fields names and their accepted values on a form, without having Acrobat Professional ? Also the form I mentioned above, is "Locked" so even if I had Acrobat Professional, I don't think I can accurately find data related to the field's names ? I don't know much about Acrobat, so I apologize for the above questions if they appear redundant. I think your technique could have a huge impact on the way I do my forms at my work. Thank you again. Xoomaster . . Extracting Field Names.
. grantwood said this on Saturday, April 26, 2008 - 4:24pm.
. @xoomaster I would attempt to extract the field names using the same iText library that I use in the technique file. I wouldn't use Acrobat Professional. Since your DMV form is locked, I may not be able to extract the field names, but I'll try. Sean . . Extracting Field Names Screenshot.
. grantwood said this on Sunday, April 27, 2008 - 10:28pm.
. @xoomaster Hey, I managed to figure out how to extract field names from locked forms. I needed to include two additional Java libraries, both free. I used your DMV form as a test, and here's a screenshot: I could use your help with something. Should I automatically create a main key-value pair record for each field found? Maybe you don't want to populate every field, like some of the checkboxes. You would have to delete the unused key-value pairs, or you could just leave them, although that would add clutter. Sean . . This is awesome . I am very.
. xoomaster said this on Sunday, April 27, 2008 - 11:02pm.
. This is awesome . I am very much interested in how you extracted the Filed names ? Here is a challenge : Ideally, you want your users to just pick a PDF file and then automatically give them the "Name of the fields" in that PDF. At that time, they will have the option of creating their own calculations and key-value pairs and submitting only what they are interested in filling. I appreciate your effort. Please let me know how to extract the field names though. Xoomaster . . iText Is Your Friend.
. grantwood said this on Sunday, April 27, 2008 - 11:44pm.
. @xoomaster I used the iText library to extract the field names, although it couldn't extract field names from your form because it was secured, so I needed help in the form of two other libraries. Sometime soon I'll post the updated technique file so that everyone can inspect the script that extracts the field names (it's not a long script). "Ideally, you want your users to just pick a PDF file and then automatically give them the "Name of the fields" in that PDF. At that time, they will have the option of creating their own calculations and key-value pairs and submitting only what they are interested in filling." Well, this technique is really only meant for developers. I personally wouldn't want users trying to create calculations. That seems like a problem waiting to happen. Sean . . Problems Populating Your Secure Form.
. grantwood said this on Tuesday, April 29, 2008 - 6:49pm.
. @xoomaster While I can extract the field names from your DMV form, I'm having difficulty populating the form. According to the security settings, the filling of PDF form fields is allowed, so you would think that the fields could be filled programatically as well. Will have to research some more. Sean . . Let me know how it goes. I.
. xoomaster said this on Tuesday, April 29, 2008 - 7:06pm.
. Let me know how it goes. I had tried creating forms and doing Javascript for calculations within PDF forms, but PDFs are generally not easy to work with. One of the major problems include data import and export from and to PDFs. Please remember the above form is just an example, so don't worry too much if it doesn't work out. . . Requirements.
. metamora said this on Wednesday, April 30, 2008 - 1:27pm.
. Does this solution require a particular version of FileMaker Pro? If so, what are the requirements? . . Requires Version 9.
. grantwood said this on Wednesday, April 30, 2008 - 7:05pm.
. @metamora The solution requires version 9. Sean . . Just run through your pDF videos....
. rscholes said this on Thursday, May 15, 2008 - 4:59am.
. What a buzz! Ross . . Maybe.
. grantwood said this on Thursday, May 15, 2008 - 2:47pm.
. @rscholes Maybe in a few months. Do you personally need the ability to extract data from PDF forms? Sean . . Editing form fields after the script is run does not work....
. TonyWhite said this on Friday, July 25, 2008 - 12:43pm.
. I am trying to edit the form fields after the script is run and it does not work. It seems that the form fields that are filled out are not editable and that the form fields that are NOT filled out are gone from the form. Is that possible? The workflow that I am setting up requires that users have the ability to edit the form fields. Please advise. Thanks. . . Sample File Available?.
. grantwood said this on Friday, July 25, 2008 - 4:16pm.
. @TonyWhite Would it be possible to email me a sample PDF? If so, then please send it to chartpacs@gmail.com. . . Just sent the files....
. TonyWhite said this on Wednesday, July 30, 2008 - 12:22pm.
. I just sent a before and after PDF by email with the subject line "Editing form fields after the script is run does not work..." Thanks. . . Try This.
. grantwood said this on Thursday, July 31, 2008 - 2:42pm.
. In the technique file, if you click on the Scripts toolbar icon, you'll see the following line: stamper.setFormFlattening(true); You can either comment out this line, or set it to false. . . stamper.setFormFlattening(true); & Extended rights issue.
. bavltd said this on Wednesday, April 15, 2009 - 5:22am.
. Hi I have set up the solution on both mac & pc with stamper.setFormFlattening(false); It appears that the process messes with the Extend Features that enable acrobat reader to edit and save the pdf. If I use a pdf form that doesn't have extended features enabled, populate the form from FM and then open in acrobat pro and enable the extended features everything is great. I was hoping to populate a pdf that already had the extended features enabled. Anyone else experienced this? If there was an extract data from pdf I would be really interested. . |
Be Notified!Let us tell you when a new video is posted. We'll send you an email with a direct link right to your email inbox.
Make sure and whitelist (or add to your address book editor@filemakermagazine.comFileMaker Reference Tool
* $29.99 is the FMPug member price for a printed copy. 10 Most Recent Videos |
Can you show us more details !
Excellent work, but I am at lost when it comes to 2 issues :
1) how do you find out what the actual field names are, on a form that you have not created, otherwise how do you use your technique to populate a form like : http://www.dmv.ca.gov/forms/reg/reg195.pdf
2) Can you add the form like the above to your Tech file ?
do you have to recreate all the fields, since it is unrelated to what you have in your tech file ?
I hope this makes sense . Thank you
Xoomaster