Forums

Signature widget image not showing on TCPDF plugin form saved

DrSmith69 27 Oct, 2017
Hi Guys,

I have connected the TCPDF plugin which is working awesomely!

One problem I have is I cannot get the image from the signature widget to display on the PDF form stored on my server.

I have read the FAQ's and I see you can add: <img src='{signature}' alt='signature' /> and this will pull the image from the signature widget, i have amended this to <img src='{data:signature}' alt='signature' /> for CFv6 and it works when I just display a standard custom code however it does not pull onto the actual form.

My TCPDF code is standard:

<p>Business Telephone: {data:business_tel}</p>
<p>Home Telephone: {data:home_tel}</p>
<p>Mobile Number: {data:cellular_no}</p>
<p>Email Address: {data:email_address}</p>
<hr />
<p><img src='{data:signature}' alt='signature' /></p>

However, everything else pulls and displays except my signature - this is very crucial so really hoping there is a way to get this right?
Max_admin 28 Oct, 2017
Hi DrSmith,

So it works when you use that code inside a "Custom code" but not when you use the same code inside the TCPDF code ? if yes then I'm afraid that it may be a limitation withing in the TCPDF library itself!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 28 Oct, 2017
Hi DrSmith69 ,

I've seen a problem with the TCPDF library where is you show a full URL for an image then it is not loaded. You may need to edit this to show a relative URL without the domain part. Please see this post

Bob
shatadon 06 Dec, 2017
Can we have a better explanation on this. like an example of how you configure the signature inside the TCPDF. Also is it possible to save this image url to database just like any file input field?
cyberspyder 26 Jun, 2018
I am trying to do the same thing and have not been able to get it to work. How can I have the signature widget save the signature as an image and display in a pdf. I am using Chronoforms 6 in Joomla 3.10.
healyhatman 27 Jun, 2018
If you update TCPDF by redownloading it from the Download link and reinstalling it using the joomla installer, TCPDF now accepts base64 encoded images. So you can just use
<img src = "{data:signature}" />
ITadminguy 03 Nov, 2018
I was able to get this to work.

This
<img src = "{data:signature}" />
generated an error TCPDF ERROR: [Image] Unable to get the size of the image:

So after a few hrs, this will generate a signature in tcpdf

change mysite to the website name
also chanage xxx to the signature no of the signature field id in the designer

<table width="100%" cellpadding="0" border="0" style="border: 1px solid #040400; ">
<tr><td width="99%"><img src="https://mysite.com/components/com_chronoforms6/chronoforms/uploads/{data:signaturexxx}" width="179" height="50" /></td><td width="1%"></td></tr>
<tr><td></td><td></td></tr>
</table>


ITadminguy 05 Nov, 2018
yes
I had a problem at first. I installed cetcpdf via the joomla installer. Installed success message. But there was still no tcpdf in the files widget area to select.

I was using cf6 version from a few months ago and noticed that there was a new cf6 component version from a few weeks ago

so reinstalled the new component and latest cetcpdf viss the joomla installer and the tcpdf started to show u in the files widget area.

then i tried the above code and got the no image size problem. i messed around with alot of variations of signaturexxx sig_img etc. no signature was showing up in the pdf output

was stuck. so i looked back to what i used for cfv5. to display a signature in a pdf and it was the https:/mywebsite..../chronoforms/{date}_signature.png which picked up bob‘s custome pho code to create a signatre png


I had to change {date}_signature.png to https/mywebsite.com...{fata:signaturexxx} which i think picks up the base64 image and not bob’s signsture.png

Not sure why the var:signature did not work. I tried alot of variations


Perhaps because for both cfv5 and cfv6 i used bob’s custom sugnature php code to replace the base 64 signature to signature.png.

note that the signature is also showing up as html in emails using sig_img created using bob’s php signature code

i posted a few months ago how to use bob’s code to create multiple signatures that works for cfv6 only

ITadminguy 05 Nov, 2018
sorry for spelling

iphone keys are too small

healyhatman 05 Nov, 2018
<IMG src="{data:signature}">
Did you have the quotation marks too?

edit: yes you did.
This topic is locked and no more replies can be posted.