Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Fillable pdf Form

Posted on 2012-04-05
11
Medium Priority
?
599 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:Richard Korts
[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
  • 3
  • 3
  • 3
  • +1
11 Comments
 
LVL 19

Expert Comment

by:Michael701
ID: 37816363
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
 

Author Comment

by:Richard Korts
ID: 37816473
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
 
LVL 19

Accepted Solution

by:
Michael701 earned 2000 total points
ID: 37816552
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Richard Korts
ID: 37816861
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
 
LVL 79

Expert Comment

by:arnold
ID: 37816881
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
 
LVL 19

Expert Comment

by:Michael701
ID: 37816901
MS Office will NOT create PDF pages or forms.
0
 
LVL 21

Expert Comment

by:Julian Matz
ID: 37816962
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
 
LVL 21

Expert Comment

by:Julian Matz
ID: 37816981
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
 

Author Comment

by:Richard Korts
ID: 37816986
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
 
LVL 79

Expert Comment

by:arnold
ID: 37817071
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
 
LVL 21

Expert Comment

by:Julian Matz
ID: 37817193
>> 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

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

722 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