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

x
?
Solved

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

Posted on 2013-01-17
13
Medium Priority
?
1,019 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
[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
  • 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
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.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

688 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