Populating Form Fillable PDFs

Is there really any question the PDF file format will be going away any time soon? Personally, I don't think so. And, neither should you. Adobe released their license to the technology in 2008 and it became an open standard for the world to use. Airlines use it for tickets, ticket companies use it for concerts and basically it's the digital equivalent of good old real-world paper for the digital world.

So what does this mean to you and your FileMaker database? Well, if you've got data within your database or you're capturing data in something like Web Direct, then knowing you can merge that data into a form fillable PDF can be invaluable. Especially if you need to put that data into a fixed format - like a PDF!

By running a server side script, and running some freely available software which is super fast an efficient, you can send out contracts, invoices, notices or even event tickets with merged in data from your FileMaker database.

Yes, you can certainly generate a PDF right from within FileMaker using your own data, but there are those situations where replicating an existing PDF just takes too much time. So just merge the data into a form fillable PDF. Plus, it just might be faster than generating it from within FileMaker!

AttachmentSize
PopulatingFormFillablePDFs.zip2.04 MB
Tags:
PDF

Comments

Matt thank you once again for lesson and clear instruction. This is going to help me with new project.

Dear Mr.Petrowsky, I would like to make it clearer how set all. On Win FMServer17 i install BaseElements in Extensions Directory and PDFtk Server command line tool. On Clients Side I have a mixed environment connected to a Server (Win and Mac), what should I install in each of the Base Elements Technique Container Field and what changes i must do in scripts so it run from Win/Mac?
Thanks, best Regards.

Fulvio,

The setup Matt has described involves using Perform Script on Server, so the plug-in only needs to be installed on the server.

If you want the process to operate on the user's computer instead you will have to set up pdftk on each machine and install the appropriate plug-in on each machine. If you want to script the plug-in installation, define two container fields and store a copy of the Mac version of BaseElements in one and the Windows version of the plug-in in the other. Your script for installing the plug-in would then test the value of Get ( SystemPlatform ) - as per the Help system, a value of 1 means an Intel-based Mac and a value of -2 means a Windows computer.

--
Daniel Farnan

Ignorance is curable, not preventable

Hi,

I'm attempting to get this running on a Win Server. It populates fine except it's ignoring the input PDF file and keeps reverting to your example contract, even after deleting from the global container. So even without an input PDF it produces a populated contract PDF..Any thoughts?

File hosted on Win Server 18, client is FMPro Advanced Mac 18

Question: When I drag the BaseElements.fmplugin to the container field, I receive an error message "This action cannot be performed because this file is not modifiable." I am running the PopulatingFormFilliablePDFs on FileMaker Pro Advance 17, hosted on a FileMaker Server on a Mac. I have added fmserver (and my user) to the permissions with Read & Write privileges. What am I missing?

Additionally, once this plugin is installed, is it "installed" on all hosted databases or do I have to create Container fields in each database to gain the functionality?

Thank you for the input,

Michael

Great technique, thanks very much. I did find a gotcha condition that other devs might want to be aware of.

Tests on the command line worked, the plug-in worked, everything seemed to work, except I couldn't get the PSOS to work, Ultimately I realized that the PDFtk command was failing because my (Mac) hard drive still had the default name of "Macintosh HD". It was the space in the name that was causing the error.

To avoid it, you can escape the spaces when creating the path variables, or just change the name of the @#@# drive, which is what I ended up doing.

Bill

Now with less evil!

This tutorial showed us how to fill a PDF form from FileMaker. But, can we use pdfTK to fill in fields from a report? That would mean that we could adjust the number of rows displayed in the PDF output. Is this feasible? Thanks.

After downloading the pdftk_server-2.02-win-setup.exe file, what needs to happen with it? Does it need to be copied/saved to the FMS Server Machine and installed there? If so, does it need to be run from any particular directory?

Dave17

So I used pdftk to generate the .fdf file to get the PDF field names. Now creating a .xfdf file all I did was copy the .xfdf text in the Filemaker File into a code editor , and then I changed the field names to the fields name that I got from my .fdf file and Saved to my desktop. I then run in terminal pdftk original.pdf fill_form data_merge.xfdf output new.pdf , a new pdf is created but my fields arent populated , if i do to the generated .fdf file and open that into text editor and change the <<(v) of a field to "x" and save that file and go back to terminal - it then works - so my issue is getting a working .xfdf file formate because it doesnt seem to be picking up the fields in that file format . Only works if I edit the original .fdf file , which isnt a big issue , but would be easier to read, edit, and Understand in .xfdf format vs .fdf , but cant seem to get a working file

Cameron Maciel

Hello from Alaska!

My FMP server is running on Linux. I had to install the BaseElements Linux plugin. Will this cause problems with this PDF solution?

-Aaron