Fillable pdf Form

How can I make a pdf, accessible from a web site, such that it is a form with fillable fields (directly into the pdf)?

Then, once filled, how can the form be "submitted" to the web owners & what is the form in which they can receive it?
Richard KortsBusiness Owner / Chief DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael701Commented:
In general you will need Adobe Acrobat (not just the free Adobe Reader). Acrobat is like a word processor for PDF forms. You can also insert a 'Submit' button to have the data posted to the web. If you're askign for any personal info, please post to a HTTPS: connection.

I have a project on my to do list that will require PDF forms. In some quick research I found references that Open Office can create PDF fill in forms.
0
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
Michael701

So I am assuming that if you do this, you can house the form on a web server, have a link to open in a new window, & click "submit" on the form when finished?

All the obvious stuff.

When you click "Submit" how do you specify where it goes? Can you make it an email attachment to a set of recipients, etc.?

Or??
0
Michael701Commented:
Just FTP the form.pdf to your website. A standard <a href='form.pdf'>My form</a> should cause any browser to open the file with the client installed pdf reader.

When you create the 'submit' button, there are options to specify where to post the data. I do not recommend email, first because it's not secure, second is because the data fields ONLY will be displayed, making it hard for you to read.

Do you think you will use Acrobat or Open Office?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
To Michael701,

I am looking at Open Office (because it's free).

I'm wondering if you can't do the same thing in MS Office (which I have).
0
arnoldCommented:
If this is a web form, why use PDF which you would then have to decipher.

Why not create a standard web form and have the user fillup the data there and then submit the form?
PDF fillable forms is a step that you do not need to make.
 You could output to the user the PDF document when the complete the form.
0
Michael701Commented:
MS Office will NOT create PDF pages or forms.
0
Julian MatzTechnical SupportCommented:
Hi rkorts,

This is possible, but there's very little information about it on the Internet; personally I couldn't find much on it anyway when I was trying to achieve the same thing as you. What you need is Adobe Acrobat Pro and Adobe Live Cycle. Then, when your PDF form is set up, you'll need a server side script that processes the data. I did this with a PHP script. The PHP script sends the entire form as a PDF to the recipient, with all the data entered.

If you have Adobe Acrobat and Live Cycle, let me know and I'll help you get it working. You're also welcome to my PHP script.
0
Julian MatzTechnical SupportCommented:
I started writing the above comment a few hours ago, but got distracted with other things. You can make it so that the full, filled-out PDF form is attached (as a PDF) and emailed to one or multiple specific recipients, it's not just the data fields that are displayed, but the entire PDF. The PHP script takes care of the recipient(s). The PDF just needs to know the URL of the script.
0
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
To julianmatz

That sounds good, except for the cost.

I am proficient in php.

But I think the comment by arnold is germane. Why do a pdf at all if not needed?
0
arnoldCommented:
There are examples where you can create a pdf using PHP.
There are many examples see if that helps
http://www.astahost.com/info/tfclt-create-pdf-php-create-fly-pdf-web-server.html

What is the end result that you want to achieve?
0
Julian MatzTechnical SupportCommented:
>> That sounds good, except for the cost.
Do you mean the cost of the Adobe software? Yeah, I agree; I wouldn't purchase it just for the form, but I had them anyway.

>> Why do a pdf at all if not needed?
I guess it depends on the situation, but yeah, if you don't need the PDF, you could just create your own web form, or use a form builder like www.jotform.com.

Anyway, here is my PHP script, in case it's useful to anyone. When you specify the URL in Live Cycle, just make sure to add #FDF at the end - e.g. http://www.example.com/pdf-mailer.php#FDF

<?php

error_reporting( E_ALL|E_STRICT );

$r = $_REQUEST;

$string = '';

//echo '<pre>'; print_r($_GET); echo '</p>';

$name = ''; //basename( $_GET['form'] );
$postdata = file_get_contents( 'php://input' );
$name = 'Application_' . date( 'Ymd_his' ) . '_' . rand( 1000, 9999 ) . '.pdf';
$file = "/var/www/tmp/$name";
$f = fopen( $file, 'w' );
fwrite( $f, $postdata );
fclose( $f );

$finfo = new finfo( FILEINFO_MIME ); // return mime type ala mimetype extension
$info = $finfo->file( $file );

if ( $info !== 'application/pdf; charset=binary' )
{
	unlink( $file );
	die( "Error: the file type you have submitted ($info) is not valid." );
}

$pdf = wordwrap( base64_encode( $postdata ), 72, "\n", true );

$recipient = 'academy@****.ie';
$cc = '****@gmail.com';
$bcc = 'info@****.ie';
$sender = 'no-reply@****.com';
$subject = 'Application Form';
$boundary = '==Multipart_Mix_x' . md5( rand( 1000, 9999 ) ) . 'x';

$headers = "From: $sender\n";
$headers .= "Cc: $cc\n";
$headers .= "Bcc: $bcc\n";
$headers .= "X-Mailer: PHP v5.3\n";
$headers .= 'MIME-Version: 1.0'."\n";
$headers .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'."\n\n";

$message = <<<__MESSAGE__

This is a multi-part message in MIME format.
--{$boundary}
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

Application form attached. For support, please contact ****@****.

--{$boundary}
Content-Type: application/pdf;
 name="{$name}"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="{$name}"

{$pdf}

--{$boundary}--

__MESSAGE__;

mail( $recipient, $subject, $message, $headers );

//echo "<h1>Thank You!</h1><hr>Your form has been received.<hr>";
//header('Content-type: application/vnd.fdf');
//header("HTTP/1.1 200 OK");
//exit;
//header('Content-type: application/vnd.fdf');

header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.example.com/thankyou/" );
header( "Connection: close" );
exit;

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.