HTML to PDF action, adding data from database to PDF file

danaviziteu 09 Aug, 2014
Hello, I am using HTML to PDF action to generate PDF file using the data from the submitted form and attach the file in the email sent to the user.
I also need to include in the PDF file additional data from the database. The problem is that when i try to extract the data into the PDF file, it returns an PHP error. How can i bring the data form the database into the PDF file?
GreyHead 10 Aug, 2014
Hi danaviziteu,

What code are you using to get the data? Where are you using it? What PHP Error do you get?

Bob
danaviziteu 10 Aug, 2014
I was trying to use JDatabase in the content of the PDF, but apparently it doesn't work, so i solved it by connecting to the database using mysqli_connect(host,username,password,dbname);
Now i am trying to replace the header of the PDF file with my own image and text. Do you have any suggestions?
Thanks🙂
GreyHead 10 Aug, 2014
Hi danaviziteu,

I would generally do any data processing in a Custom Code action before the tcpdf action - I think that the JDatabase methods will work there.

I've no idea how to put an image in the header though - I think that the question was asked before without being answered.

Bob
This topic is locked and no more replies can be posted.