?
Solved

How Do I Fill In An Adobe (Fillable) PDF File With Data From A Database

Posted on 2005-03-21
22
Medium Priority
?
3,348 Views
Last Modified: 2013-12-16
I'm new to Adobe (Professional 7.0) I'm actually self-teaching myself Adobe PRO. Please go easy (and VERY simple) on me?

I have 1 field of information stored in an Oracle database - called 'Name.' (There are actually more fields, but once I get this simple example out of the way, I can figure the rest out.)

How do I pass the information contained from the Oracle "Name" field to the Adobe (fillable) form so the end-user can print it out? (I explain it in much greater detail - see below.)

My thinking  - Is it this simple?
http://www.mysite.com/cgi-bin/Adobe_Form.PDF?name=NameData&address=AddressData...MorePost_Or_Get_Data_Here.

I'm utilizing and getting more and more familiar with Adobe Designer, but too self teaching myself. So if could go easy on me, help shed some light there too, it'd be a great big help. Such as, is it as simple as save the "fillable" Adobe form, and naming each field using the "Binding" name field to pass my information to?

I know how to program getting the data using a Web form via CGI into an Oracle DB, and then getting the information back out of the database.

If there is anyone so kind as to just leave one example of how to automatically fill-in one field say "name" and fill in the (fillable) Adobe form's "name" text box, when called from a Web form, I'd appreciate it. I consider this extremely difficult - at least from my point of view - points!

My (full and detailed explaination) example:

I have created a very simple HTML form for the user to fill in their name - then click submit.

Afrter the user clicks "Submit" - their name gets stored into my Oracle database, in the field name "Name".
(I'm fluent enough with Perl to get that accomplised - and then I'm able to retrieve the data in the "name" field using Perl.)

10 minutes later I wish to have an HTML form that states something like, "Who's Record Do You Wish To Retrieve? ... then have a "Submit" button. I'll supply them with a drop down box with the list of names from the Oracle DB "Names" field as a good example.

This time the user can select their record (or their name) and it retrieves the PDF with their name already filled in so they can print it.

Via CGI - I'm able to pass the data contained in the "name" field - but how do you call up the PDF file and pass the data to the Adobe "Name" text field?

Again, is it this simple?

http://www.mysite.com/cgi-bin/Adobe_Form.PDF?name=Name_Data

Have I confused the heck out you all?
0
Comment
Question by:billfinkri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 10
22 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 13599541
No, it's not that simple - unfortunately. You have two choices: Server side merging and client side merging. Both would involve "FDF" - that's a file format defined by Adobe to send form data to e.g. Reader. It's a very simple format, so you can create FDF files based on the data in your database in e.g. Perl.

Such a FDF file can also contain a reference to a PDF file. In this case, your client would request the FDF file, and Acrobat (or Reader) would then automatically download the associated PDF file and merge the data into the form fields in the PDF file. The problem with this is that the form fields are still form fields, and somebody can modify them before printing them. This is the reason why merging the data on the server is usually the preferred solution. You can do this for free with a the pdftk tool: http://www.accesspdf.com/pdftk/

Let me know if this makes any sense, and if you need step by step instructions.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 13599550
One more: If all your clients have the full version of Acrobat, and are running on Windows, you can also use the Acrobat JavaScript "ADBC" feature, which is Adobe's wrapper for ODBC so that your JavaScript program can access the database directly, and therefore fill the form fields without using FDF files.
0
 

Author Comment

by:billfinkri
ID: 14010135
KHKremer,

(Sorry, I didn't even notice there was a response.)

Go ahead and close this question.

I've probably asked the question with too much confusion.

Actually purchased an Adobe "support" contract, as THEY said I _could_ indeed do what I asked during our PRE_Purchase of our Adobe Pro7.

If you leave this question open, I'll let YOU know the outcome.
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 total points
ID: 14010253
All supported parameters that you can attach to a URL are described in this document: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
0
 
LVL 1

Expert Comment

by:LEGANDO
ID: 14094006
It can be easily done in Crystal Reports.
http://www.businessobjects.com/
0
 

Author Comment

by:billfinkri
ID: 14212032

Sorry for taking so long to get this back to Ya'll!

This does NOT work. Matter of fact, after a number of person-to-person phone calls to Adobe, (Of which we paid for the support) I don't believe THEY know how to get it to work, EITHER.

Using THIS page as an example, try this:

http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

their documentation is INCORRECT and they can NOT get my problem solved. (Sorry KhKREMER)

ALL I want to do is make a "fillable" form, use the URL 'http://myORG.Com/MyPDF.PDF#fdf=http://MyORG.Com/MyPDF.fdf" and it SHOULD fill in the my TWO fields.

I've been trying to work with TWO fields, "Name" and "Age" - (just to get the hang of it and get things rolling so I can finish my project) but Adobe is letting me, *US* down.

Step 1) Create A Word Document
Step 2) Print It As An Adobe Document
Step 2a) Bring It Back Into Acrobat
Step 3) Insert Text Boxes
            Fill 'em in
Step 4) Export The Data As An FDF File
Step 4a) Save The PDF File
Step 5) Put The Files In The SAME Directory With SAME Names in the HTDOCS folder on My Web-Site. (With the exception of suffix "FDF" vice "PDF"

i.e. "http://myOrg.COM/Name_Age.PDF" displays my document, but if I use "httpd://MyOrg.COM/Name_Age.PDF#fdf=HTTP://MyOrg.Com/Name_Age.fdf" - Nope!
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14212084
I'll try to get this to work tonight. I'm pretty sure I've used this sucessfully in the past.
0
 

Author Comment

by:billfinkri
ID: 14212151
If you get it working

I will TRULY by YOU LUNCH !! Even if I have to send you a check!

(I'll be out of my office in NC the next coupld of days, but I *WILL* buy you lunch, and INSIST Adobe Hire You!) I'll be in my office today though.

(Get this, Adobe _PROMISED_ they'd call me back in 1 hour - at 8AM this AM! - What, East Coast, it's 10! Not a word Geeesh.)

Thanks, I know you don't have to put this much effort into this, so I'm thanking you ahead of time.

Regards,

Bill
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14217461
Looks like you are right: It's not working. What I found out is that the syntax is correct, and Acrobat is actually retrieving the FDF file from the server (the connection does show up in my log files). However, it's not using the retrieved data to fill in the form fields.

The only way I could make it work was by modifying the FDF file, and replacing the value associated with the /F field (the original file name) with the URL of the PDF file (in your case this would be something like /F (http://myOrg.COM/Name_Age.PDF)
When you now open the _FDF_ file in the browser, Acrobat will automatically retrieve the associated PDF, and will fill in the form fields.

However, I still stand by my first comment: It's best to merge the data on the server, and send just the merged PDF file to the client.

0
 

Author Comment

by:billfinkri
ID: 14219361
Really - thanks for taking so much of your time. (I know how valuable all of our time is these days.)

I'll give that a shot, and get back to you first thing.

Your example is exactly what I wish to do.

(Let me get this straight, though.) It's the FDF file is what contains the "HTTP" reference to the PDF that I wish to have the fields automatically populated with ???

Regards,

Bill
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14219777
Yes, this is correct. Because the the FDF file contains the reference file, you need to load the FDF file into your browser (by e.g. creating a link to the FDF file in a web page).

Open your FDF file in a text editor. Look for something that looks like "/F (filename.pdf)" (this would of course refer to your PDF file). Just replace the file name with the URL of your PDF file.
0
 

Author Comment

by:billfinkri
ID: 14220159
Boy-oh-boy, thanks for your patience.

Here is my "Page" - The reason I put "My Site" is this is a DoD facility, thus obvious reasons.

<html>
<head>
<title>Title Goes Here</title>
</head>
<body>
<a href="http://MySite:Portxx/Name_Address.PDF#fdf=http://MySite:Portxx/Name_Address.FDF">Click Me</a>
</body>
</html>

This comes up with the file you're looking for is a PDF that is supposed to have the values filled in, would you like to look for that PDF??? (Something to that effect!)
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14220314
This is odd... With all my attempts I always got the PDF, just without the data filled in. Do you get the same message if you leave off the "#fdf=..." part?
Did you try to just link to the FDF file?
0
 

Author Comment

by:billfinkri
ID: 14220424
Yes, if I leave the "#FDF" in or out, I get the PDF.

Here is my HTML page - BOTH Links return the same results. They display the PDF file, but no fields filled in.

(Get this, I put up so much stink with Adobe yesterday, THEY GAVE ME THE FDF TOOLKIT!) - It's free, I'll leave it some place if you like? ('long as it's legal of course.)

<html>
<head>
<title>Title Goes Here</title>
</head>
<body>
<a href="http://OurSite.COM:7778/Name_Address.PDF">Click Me</a>
<br><p>
<a href="http://OurSite.Com:7778/Name_Address.PDF#fdf=http://OurSite.Com:7778/Name_Address.PDF">Click Me WITH FDF Appended!</a>
</body>
</html>

I gotta hand it to ya, you've more patience that I have ... this is weird, challenging, but weird. 'specially when Adobe uses the example in THEIR Docs!
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14220528
Try this:


<html>
<head>
<title>Title Goes Here</title>
</head>
<body>
<a href="http://OurSite.COM:7778/Name_Address.FDF">Click Me</a>
</body>
</html>


This does require that you modify the FDF file so that it links to your PDF file.

BTW: Even though the FDFToolkit is free, you don't have the right to redistribute it, so please don't "leave it some place" :-)
0
 

Author Comment

by:billfinkri
ID: 14220647
(Sorry 'bout the Toolkit - I did mentioned "As Long As It's Legal." It is indeed free, but the users need register. (That's all.)

RE: The Original Problem.

If you're familiar with Perl, they have a PERFECT example of how to do what I wish to do, but you have to load a Perl Module "Acrobat::FDF" - (get this) Which doesn't exist!

...lastly, the FDF file, (above) I've tried modifying it to point to the "PDF" file with or withOUT the "URL" reference.

Here's the FDF file: (ALL of it.)

%FDF-1.2
%âãÏÓ
1 0 obj<</FDF<</Fields[<</T(Text2)/V(Name_Here_Modified)>><</T(Text1)/V(Add_Here)>>]/ID[<733C4C4716C8C6A23D120EE0467B259C><128EDD8F82C114429380357B4A9CAFA1>]/F(Name_Address.PDF)>>>>
endobj
trailer
<</Root 1 0 R>>
%%EOF
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14220700
Use this: (replace OurSite.COM:778 with the correct information about your server!)

%FDF-1.2
%âãÏÓ
1 0 obj<</FDF<</Fields[<</T(Text2)/V(Name_Here_Modified)>><</T(Text1)/V(Add_Here)>>]/ID[<733C4C4716C8C6A23D120EE0467B259C><128EDD8F82C114429380357B4A9CAFA1>]/F(http://OurSite.COM:778Name_Address.PDF)>>>>
endobj
trailer
<</Root 1 0 R>>
%%EOF
0
 

Author Comment

by:billfinkri
ID: 14221207
WOW - WOW - WOW, IT WORKS!!!

Get this - (Coincidence, PROBABLY not - and I can't thank you enough for your time.)

What I ended up HAVING to do, is after making a change to the "FDF" file, (to see the changed results in the PDF fields) I had to CLOSE the BROWSER completely, (even though I inserted meta tags to expire the "load_pdf.html" page)

... and now it works.

If I could give you a 1,000 points, you deserve it!

Another finding is that BOTH links worked, with or withOUT the "#FDF=" in the URL!!!
(You had a type-oh in yours - none-the-less, THANK YOU, THANK YOU, THANK YOU! You save me such a great deal of time - I was actually ALMOST ready to give it up!)

With The Kindest Of Regards,

Bill

I will leave my example HTML pages for others to learn from:

<html>
<head>
<title>Title Goes Here</title>
<META http-equiv="Expires" content="Tue, 01 Oct 1956 08:30:00 GMT">
</head>
<body>
<a href="http://FQDN.com:7778/Name_Address.fdf">Click Me</a>
<br><p>
<a href="http://FQDN.com:7778/Name_Address.FDF#fdf=http://FQDN:7778/Name_Address.FDF">Click Me WITH FDF Appended!</a>
</body>
</html>

============

Your FDF Example (That worked, TOO!)

%FDF-1.2
%âãÏÓ
1 0 obj<</FDF<</Fields[<</T(Text2)/V(Name_Here_Modified)>><</T(Text1)/V(Add_Here)>>]/ID[<733C4C4716C8C6A23D120EE0467B259C><128EDD8F82C114429380357B4A9CAFA1>]/F(http://OurSite.COM:778Name_Address.PDF)>>>>
endobj
trailer
<</Root 1 0 R>>
%%EOF


Lastly - would it have made a difference if I saved the FDF using WordPad vice Notepad - that's the ONLY other symptom that I can think of that may have caused it to work.

Again, Regards, Bill
0
 

Author Comment

by:billfinkri
ID: 14221231
(Moderator) Can I RE-OPEN this to award MORE points?

Just take a look at this thread, "khkremer" certainly deserves additional credit for this one, far and above the call of duty!
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 14222305
It probably would not have made a difference if you used a different editor. Because you are already linking to the FDF file, you don't need the #fdf=... command anymore. Acrobat already has access to the FDF file, and as long as the /F information is correct, it will find the PDF and populate the fields with the data from the FDF file.

500 pt is the maximum per question. Just look at it this way: Your question was not answered when you accepted what you thought was an answer, and it just took a little longer to find the correct solution. That's all included in 500 pts :-)
0
 

Author Comment

by:billfinkri
ID: 14223391
Well, I certainly am very thankful for your time. (Didn't I say I'd buy you lunch? Hole me to it!)

Thanks. Maybe I can return the favor sometime, too.

With Kindest Regards,

Bill
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question