I'd emailed this earlier, when the forums were unaccessible; now I'm adding it and fleshing it out. Several items, most of which reflect my n00b status but hopefully any resulting information would be useful to all:
1. I downloaded the .zip of the iText servlet, but have no idea where to put it on the server. Thought I'd found a "happy place" for it and altered the fillpdf_itext.java line that referenced the developer's server to point to mine, but when I finally got FillPDF to try to populate a PDF it still made a remote call. :/
2. REALLY stupid question: The default path per the docs for FillPDF indicate sites/all/modules> OTHER > FillPDF -- does that mean that FillPDF goes into a directory called "other" or simply gets plopped as a directory in the sites/all/modules area? (The latter appears to work in terms of activating the module.)
3. I've added a PDF through the interface, but even tho it has two fields that can filled in the FillPDF "Generate Fields" doesn't detect any. If I click "Add" and put the fields in manually, then the module appears to find them. Does this mean that there may be a "best practice" for creating an active field type in a PDF?
If there is a simple-stupid PDF that folks can download and test with, with a couple of fields (a text, a number and a date?), that'd be great. (Assuming there's a set of default data available via Tokens that most folks can try to merge the PDF with, or easily create)
4. New and slightly different question: As a variant on the Webform issue, I'd posted this comment about using "custom token" which lefnire already responded to (sweet!). Quoting: "You can use profile data only if it's exposed as tokens -- I don't know think that's the case with core's profile.module. Try nodeprofile (D5) or content_profile (D6), which uses CCK for profile fields, thereby exposing them to tokens."
I'm going to start working on #4 now (have to try to successfully populate a PDF form with info from user_profiles and an Ubercart shopping cart), but will happily incorporate a proper setup of iText and any sample PDFs or suggestions as I go...
Thanks, folks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | test_template.pdf | 75.81 KB | lefnire |
Comments
Comment #1
GreyHawk commentedOne more weird item -- when I test entering data into a form, submit the form and then try to merge the data with the PDF as any user other than admin (user 1), I get a "permission denied" error; this may not be related to FillPDF but instead to the Webform, but it's weird. I've enabled a bunch of webform and content for non-admin users as part of this, but still get the error.
I'm going to check the Webform arena and possibly post this there, but if anyone here has seen that issue a pointer would be appreciated.
Comment #2
lefnire commented1. No more self-hosted iText servlet, see #545798: FillPDF servlet error, please contact tylerrenelle@gmail.com
2. Just the standard location to put any module in a Drupal install, I worded that strangely.
3. The new interface should generate the fields automatically on PDF upload. If you're still not getting any fields automatically when you should, that's a bug -- hit me up with a new ticket and we'll flesh that out. Also, make sure your PDF templates are unencrypted in order for iText to work (I'm going to try to detect that on the server soon). As far as "best practice", the auto-generate is what you want -- you'll only add fields manually if you know what you're doing (aka, you edited the original PDF template or some-such). I uploaded a simple PDF to work with
4. Let's track that separately #374121: Webform Support
5. Not sure about the 'permission denied' thing, but I'm sure Fill PDF won't work with webform without some massaging. I spoke to soon in saying that Fill PDF will work with 'anything tokens' -- it will, but I have to program the capability (not to difficult, working on it now). So I'm sure you'll get some sort of error on that guy until I get the "universal tokens" capability baked in. Let's track that ala #4 above.