Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

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

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

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>
    <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>

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 :)