Solved

Online PDF Forms Processing without Adobe Life-Cycle ES

Posted on 2010-11-16
24
642 Views
Last Modified: 2012-06-21
Without using Adobe's Life-Cycle ES, I need to host (make available online) a number of PDF forms on a secure website and on submit update a database. What are my options other than LC ES? My project doesn't have the budget for LC ES, I need a lower cost solution.

Is it true that the form can be designed to send a soap /  webservices XML file? What could I use to capture this request and handle the database update?


Thanks in advance!

Frank
0
Comment
Question by:Fgriffin
  • 13
  • 10
24 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 34154149
are you interested it in doing with php?
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34154530
There are two different forms technologies built into Acrobat: AcroForms and XFA forms - the latter ones are what the LiveCycle products use. You can create AcroForms and have them submit forms data via a normal HTML forms submission, so anything that you can do with web forms can then also be done with AcroForms.
Do you have access to Adobe Acrobat Pro? I can walk you through a simple sample form.
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34155503
My preference is to use a SOA based solution because of another project that will eventually link to this one. However, there are budget issues and there may not be enough money for a high end solution. In fact, the more the numbers come in on the RFPs the more it looks like a PHP project.

I can get a copy of Acrobat Pro latter today. I appreciate very much your offer to walk me through a sample form. I will post another comment when I have it installed.

Thanks,

Frank
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34165487
In a related question, I am receiving information that using PDF for creation is not a good idea and that using a HTML form would be more expedient. Would you comment comment on this, please.

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_26622841.html#a34164738

Thanks, again.

Frank
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34167908
You can use either HTML or PDF - what it comes down to is what do you want your form to look like? If you are happy with your form in HTML, then go for it. However, if you already have a paper form (or any other form of existing form), you can convert that to PDF and make it interactive. This is for example what the IRS is doing with their forms.

I see from the other question that you want to create your PDF on the fly - is there any reason for that? Would it be possible to create the form once (e.g. in Acrobat) and then just send down that file whenever somebody wants to add new data to the database?
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34168104
This is an interesting use case, once a form is filled out it is never updated. If the data changes, a new form is created. All the data within a form is always bound to that iteration (version) of that form. No data is ever updated on a form. In 20+ years of programming I have never come across this use case, except in Document Management Systems where the image is stored and the data may or may not be extracted.

Yes, there is a Word based existing form and my preference would be to convert that to a PDF and use that as the online form like the IRS. But I can't afford to have problems-on-end extracting data because of different versions of the Acrobat Reader. And, of course, I don't have the budget of the IRS to deal with those kind of problems. :-)

Frank
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34173356
Would you expand on this please, "Would it be possible to create the form once (e.g. in Acrobat) and then just send down that file whenever somebody wants to add new data to the database"?

0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34175238
Do you have access do Adobe Acrobat Pro yet? That's what you would use to create such a form. Once you have Acrobat, let me know which version, and I will show you how to create a form and fill it in, and also how to submit the data to a PHP script.
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34175470
Thank you! I was pulled off on to another project, but I will have it installed by Monday.

0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34189161
Khkremer, I now have Acrobat Pro X installed.

Thanks,

Frank
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34239924
Khkremer, I have Acrobat Pro 10.0.0 installed.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 34241313
Open the document you want to convert to a form in Acrobat X. Then click on the "Tools" button (upper right corner) to expose the available tools. There should be a "Forms" category - if it's not there, click on the little menu item right above the tools list (it has a triangle to show that there is a menu hidden behind it) and enable the Forms category.
Expand "Forms" and select "Edit". This will bring up the new form editor.
If there are already normal (non-interactive) form fields in the document (e.g. because you are working with a scanned document) let Acrobat try to detect those for you, otherwise - or if you want to start from scratch - select to skip that task.
If Acrobat prompts you to save the form, do so.
Once the form editor is up, there is a toolbar where you can find the different form field types (e.g. button or text field). Click on one of those and draw the rectangle on the page where you want that field to be. Specify a name for each form field that is meaningful (e.g. FirstName, LastName, ... instead of Text1, Text2, ...)
You can look at the full properties dialog by clicking on the "All Properties" link - we'll leave that alone for now, just to get a simple form done.
Once you've added a bunch of fields, it's time to think about how the data should be sent to your server: We need to add a submit button. Add a button, call it "Submit" and bring up "All Properties".
On the properties dialog, select the "Actions" tab. If you accidentially close the properties dialog, you can just double-click on the form field to bring it up again (while you are in the form editor).
The default action is for the "Mouse Up" trigger - we'll use that, and we need a "Submit Form" action. Select that and click on the "Add" button.
As I said before, the easiest way to receive that form data is via a normal HTML form submission. That's what the web is build on, and that's also what works very well with PHP.  So, we select "HTML" as the export format. Just provide a link to your PHP form handler, and you can give your form a test drive.
If you also want to use the form with the free Reader, don't select "PDF - the complete document" - it will not work with normal forms and Reader. You can make it work by reader-enabling your form, but that will limit what you can do with that form (number of forms distributed, or forms processed has to be 500 or less).

Do you know how to write a PHP script that processes HTML forms?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:Fgriffin
ID: 34242033
Great info, thanks!

I let Acrobat try to detect the fields on my PDF document and it found about 85% of them. However, I don't see them on the form; I can see them in the panel on the right where all the fields are listed, just not on the form itself. Also when I switch to preview mode the fields that it added are not available to fill in. The one I added manually is along with the Submit Button I added. How do I get the fields it detected active on my form?

No, I don't know how to write a PHP script to process my HTML form.

Again, thanks for your assistance!

Frank
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34242086
Let's first see if we can get the form fields to work correctly, then we can take care of the server part. What server technology do you usually use to create dynamic web pages?

When you click on the field name in the right hand column, do you see anything getting selected on the page? There should be a blue frame around the selected field. Is it possible that the recognized fields are too small, or not where you expect them?
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34242099
One more thing: In the preview mode, when you select "Highlight Existing Fields", does Acrobat highlight anything that is in an odd location?
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34242198
I normally use a very high end RAD platform, but because of budget I need to use PHP. I have some experience with it using various CMSs like Joomla and WordPress.

No, I don't see any corresponding blue frame around the selected field in the right hand column for the fields auto detected. I do see the one I created, however.
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34242271
No, "Highlight Existing Fields" is selected but only the field I added manually shows up. Nothing else in an odd location.

When I select one of the fields near the bottom of the page in the panel on the right, the form in the left pane moves down, like it knows where the corresponding field is at on the form. But again nothing is highlighted. I changed the view to 400% just to see if it made a field smaller than I could see at only 100% but I could still see nothing.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34242468
Would you be able to share the form with me - or at least something that looks similar and gives you the same problems?
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 500 total points
ID: 34242609
Here is a simple PHP script that will take some information from a form, and then update records in a MySQL database. It's from a toy project I've done recently to demonstrate forms submission to somebody. Take a look and let me know if it makes sense, or what does not make any sense to you.
<?php

include("vars.php");

$idx = $_POST['index'];
$state = $_POST['state'];

$field1 = $_POST['Field1'];
$field2 = $_POST['Field2'];
$field3 = $_POST['Field3'];

$field4 = $_POST['Field4'];
$field5 = $_POST['Field5'];
$field6 = $_POST['Field6'];

$field7 = $_POST['Field7'];
$field8 = $_POST['Field8'];
$field9 = $_POST['Field9'];

        $cid = mysql_connect($host,$user,$pwd);
        if (!$cid) { echo("ERROR: " . mysql_error() . "\n");    }

        mysql_select_db($db);

        if ($state == 0)
        {
                $SQL = "UPDATE document SET state='1', field1='" . $field1 . "', field2='" . $field2 . "', field3='" . $field3 . "' WHERE idx='" . $idx . "';";
        }
        else if ($state == 1)
        {
                $SQL = "UPDATE document SET state='2', field4='" . $field4 . "', field5='" . $field5 . "', field6='" . $field6 . "' WHERE idx='" . $idx . "';";
        }
        else if ($state == 2)
        {
                $SQL = "UPDATE document SET state='3', field7='" . $field7 . "', field8='" . $field8 . "', field9='" . $field9 . "' WHERE idx='" . $idx . "';";
        }

        $retid = mysql_db_query($db, $SQL);
        if (!$retid) { echo(mysql_error()); }

        echo '<a href="index.php">Back to index</a>';
?>

Open in new window

0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34243318
It just dawned on me, I am using a trial version of Acrobat. Would that cause the problem - auto detected fields not showing up?
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34243375
This should not be a problem - at least in the past, the trial was a full version with a time limit. I have not had a chance to look at the AX trial version, but I'm pretty sure that they have not changed that.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 34252030
Fgriffin provided the PDF file in question in a private email because of confidentiality concerns. I took a look and the form fields are there, but they are off the page - outside of the crop box. We don't know why that happened. I ran the form field recognition again with three different versions of Acrobat, and every time the recognized fields were correctly added to the page. It is possible that the reason is the eval version of Acrobat that Fgriffin is using.
Unfortunately at this time I don't have a clean system available to install the eval version, so we don't have a way to confirm that suspicion.

Just to recap: You now know how to add form fields to a PDF file (both manually, and at least in theory also with the "find form fields" function in Acrobat). Do you need more help with the PHP part?
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34261945
Yes, I believe this answers the scope of this question. I might need help with the PHP part, but what you have provided gives me a good start.

Thanks again, for all your information!


Frank
0
 
LVL 1

Author Closing Comment

by:Fgriffin
ID: 34261968
Great information provided by khkremer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now