Forums

Tcpdf image problem

mdiu12 21 Oct, 2015
HI
I am face some problem with attach picture in pdf. i past to tcpdf content {file48} but pdf show only {file48} not show upload image.I also to "print" with tcpdf the windows of chronoforms but the image doesn't show in the pdf.


Thank
mostafa
GreyHead 21 Oct, 2015
Answer
Hi mostafa,

You need to add an image link to the template.

If {file48} is showing then maybe you have the TCPDF action before the File Upload action.

Bob
mdiu12 22 Oct, 2015
Hi Bob

thank for replay and problem is solve but other one

1.How to add Tcpdf Header image and Footer Image.

thanks
Mostafa
GreyHead 22 Oct, 2015
Hi mostafa,

I don't think that you can add a header or footer image - the contents are treated as pure text.

The ChronoForms action only implements a small part of what the TCPDF can do. You can probably add an image using custom PHP to create the PDF.

Bob
mdiu12 10 Dec, 2015
Hi Bob

i have to face some error when form submit .error message "TCPDF ERROR: [Image] Unable to get image:"
How to solve problem.Please Help me.


Thanks
mostafa
GreyHead 10 Dec, 2015
Hi Mostafa,

I checked that the image exist and I can view it from here. Is there perhaps a permissions problem with the images folder so TCPDF can't read it?

What code exactly do you have in the PDF template for the image?

Bob
mdiu12 10 Dec, 2015
Hi Bob
thanks to replay. PDF template image url <img src="http://www.ions2016.navy.mil.bd/images/registratiron/{file48}" style="width:150px; height:160px;"/>

thanks
mostafa
GreyHead 10 Dec, 2015
Hi Mustafa,

That looks OK too, did you check the folder permission? I doubt that is the problem but cant' think of anything else.

Bob
mdiu12 10 Dec, 2015
Hi Bob
Thanks to replay.still have same problem.

thanks
shahidul mostafa
GreyHead 10 Dec, 2015
Hi mostafa,

By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 11 Dec, 2015
Hi Mostafa,

I think that it is working OK now. I found this StackOverFlow answer and changing the HTML in the template to a relative URL
<img src="/images/registratiron/{file48}" . . .
solved the problem.

I think that the problem was that with a full URL because the file may not be local TCPDF uses cURL to download it to the TCPDF cache file and there was then either a problem because cURL wasn't available or the folder wasn't writeable.

I checked that the form submitted OK and a PDF was created with the image in it.

Bob
mdiu12 11 Dec, 2015
Hi Bob
Very very thanks for support my project.it was big problem for me.


Thanks
Shahidul mostafa
This topic is locked and no more replies can be posted.