Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HTML/PDF/PHP to populate PDF File and send as attachment

Posted on 2013-01-17
13
Medium Priority
?
1,023 Views
Last Modified: 2013-06-30
Hi,

i  want to create a PDF to email when people fill it in and save as a ".pdf" file without the use of the clients outlook or mail.

do you think this would be best used in PHP or is their a way to do this within LifeCycle Designer?

I have tried to use FPDF and i wasnt able to get it working.

Imran
0
Comment
Question by:Imran Shabir
  • 6
  • 6
13 Comments
 
LVL 9

Expert Comment

by:rinfo
ID: 38792385
Maybe you should try another pdf engine.
There are lots of such engine which allows you to create a pdf file from form itself.
TCPDF is one such engine and there is a nice and elaborate example that does just this.
http://www.tcpdf.org/examples/example_054.phps
Have a look
0
 
LVL 9

Expert Comment

by:rinfo
ID: 38792389
by the way what's  problem you are having with fpdf .
its one of the best suited for your purpose.
0
 

Author Comment

by:Imran Shabir
ID: 38792400
I am trying to render and try to use its examples etc. but it doesnt work..

example of one..

http://imranshabir.co.uk/test/test.php
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 9

Expert Comment

by:rinfo
ID: 38792405
can you post your code here.
Error say you are having problem with phpmailer and guess it has nothing to do with fpdf.
Are you sure you have included phpmailer script in your test.php
0
 

Author Comment

by:Imran Shabir
ID: 38792566
hi i tried the tcpdf and downloaded the files from the website and uploaded it to my site but i keep getting an error of it trying to open a file.. i have checked the permissions and granted full access to the folder.. i uploaded all the files (except example folder)

link: http://imranshabir.co.uk/tcpdf/eetest.php

error:
Fatal error: main() [function.require]: Failed opening required '/config/lang/eng.php' (include_path='.:/usr/lib/php') in /homepages/1/d336192082/htdocs/ImranShabir/tcpdf/eetest.php on line 30
0
 
LVL 9

Expert Comment

by:rinfo
ID: 38792618
What do you wants to achieve .
My impression was you wanted to send  an email which has as attachment a pdf file that has  the values entered by a user in the web page form.
Or is it that you wanted to mail to user a pdf file that contains a form .
Once i know that i would try and create a php script for you using fpdf or tcpdf.
0
 

Author Comment

by:Imran Shabir
ID: 38792653
Its the 1st one.. A user enters info into a few fields and it emails with the info into a pdf (specific fields)
0
 
LVL 9

Assisted Solution

by:rinfo
rinfo earned 1336 total points
ID: 38792819
i think this example suits your requirement fine.
Try and understand how it is done and it should work for you.
http://coreyworrell.com/blog/article/php-html-email-pdf-attachment
0
 

Author Comment

by:Imran Shabir
ID: 38792847
Hi, i wont be able to try it till later and respond later today. I run the demo and saw the attachment its exactly as i want it. I will try understanding it later and respond.

Thanks again
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 664 total points
ID: 38792880
LifeCycle Designer would not help you. There is no need to go to Designer, you can just create "normal" AcroForm fields and then have your customers/clients/users submit the form not via email, but via a submit request to your web server. In this case, you would receive the data just like from an HTML form, and your PHP script can then do whatever it needs to process the data.

There is also an option to submit the data in the "FDF" format, which would allow you to e.g. merge that FDF file with the original PDF file and create a filled form. You can do that for example with the free pdftk program (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/). If you also use the flattening option in pdftk, you end up with a non-interactive PDF form, so that nobody can modify the form fields anymore.
0
 

Author Comment

by:Imran Shabir
ID: 38793863
hi, looking into the http://coreyworrell.com/blog/article/php-html-email-pdf-attachment  examples.. i wasnt sure how id implement the data to populate the fields in the attached pdf.
test.pdf
0
 
LVL 9

Accepted Solution

by:
rinfo earned 1336 total points
ID: 38793946
What you actually doing should be is create a routine/function that will have form values as parameters and using fpdf,tcpdf or any pdf engine create a new pdf everytime submit button is clicked.
Unless your code / or some sort of detail about working is provided , i wonder if somebody would be able to help much
0
 

Author Comment

by:Imran Shabir
ID: 38794670
Rinfo u suggested that you will create a script to my requirements above.. Is that not possible?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

971 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