troubleshooting Question

TCPDF - Create PDF from Form Values and Link to PDF Download

Avatar of F Grace
F Grace asked on
PDFPHP
7 Comments1 Solution577 ViewsLast Modified:
Hi

I am working on a payment module and I wish to create an option to allow the user download a PDF version of their Receipt.

At the moment, I am capturing the form values and displaying a receipt of their payment on the page in HTML, like:
<p>Receipt for Purchase:</p>
    <ul>
    <li>First Name: $pfirstname </li>
    <li>Last Name: $plastname</li>
    <li>Address 1: $paddress1</li>
    <li>Address 2: $paddress2</li>
    <li>Town/Village: $ptownvillage</li>
    <li>Postcode: $peircodepostcode</li>
   <li>Mobile: $mobile</li>
    <li>Email: $email</li>
    </ul>

How do I create a link at the bottom of this to allow them download or open a PDF version of this with the form values?

Attached is the PHP file which uses TCPDF to create a blank PDF document on the server, but without the form values.

Greatful for any help :)
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros