Link to home
Start Free TrialLog in
Avatar of zicov
zicov

asked on

HTML and PDF

I am developping a html page that contains text fields and a pdf. The problem is that i should get my data from the text field into the text field from my pdf. How can I do that?
Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eric - Netminder
webwoman, as usual, is correct. The best you'll be able to do is put a link to the pdf on your html page.

What you might be able to do, with a lot of fairly sophisticated server-side programming, is take the information from the fields, insert the data into a database, and then print a report to a pdf file, the name of which and link to which could be displayed on an ASP/CFM/PHP page -- but I wouldn't want to try to write the server-side programming to do it.

Regards,
ep
webwoman is right about not being able to have HTML and PDF on the same page. If you want to transfer data from HTML form fields to PDF form fields, you can use PHP to create an FDF (Forms Data Format) file to merge the data into the PDF but you may need to do quite some reading on how to use that. See the PHP manual at the zend.com website.

If you want to transfer form data from PDF to HTML, you can easily do that with PHP by having the PDF form submit data to a PHP script which will print the data on the HTML form using PHP's echo command.
Avatar of webwoman
webwoman

>> html page that contains text fields and a pdf. >>

This is patently impossible. However, since zicov hasn't come back to clarify what they're trying to do, there isn't much more we can do.
It's really not *that* difficult to create PDFs from user input via HTML form!

Using PHP and PDFLib is fairly straight forward - you might want to consider this option.

This way it is also possible to store all the submitted data in a MySQL database and then recreate the PDFs whenever you need to!

We are developing a system for a client where the user is essentially filling in an application form via an HTML form. This is then submitted and written to a database where the client's administrator can check the details have been submitted correctly. Once checked, the PDF is printed and processed in their usual manner (whatever that is...).

The nice bit is that the user never sees the PDF, hence no big d/load, no waiting for plugin to load etc

If you need any more info/help on this, just post here and then I'll contact you privately.
That's not the same thing as having HTML AND PDF on the same page.
essjay,

Welcome to Experts Exchange!

While not specifically prohibited by the Membership Agreement, Experts Exchange frowns on the private resolution of problems here, especially if the resolution involved the eventual awarding of points.

Because we're a collaborative site, and because questions are retained for other, future users who may be paying for EE's services, any specific coding or process is to be discussed here.

Thanks, and again, welcome aboard.

Netminder
CS Moderator
I figure it is somewhat possible to have HTML and PDF on the same page using frames, one window frame for each, although that may not be in ones best interest.
If it's framed, they're not the same page. They're different pages, in a frameset. And it's problematic at best, when one of them is a PDF. YOu get the Acrobat toolbar, which really messes up the frames.
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I may recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to webwoman

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
As recommended

Chmod
Community Support Moderator @Experts Exchange