Is it possible to add HyperLink
in jsPDF
?
Here is my code which I am using for the same.
var doc = new jsPDF('p', 'pt');
doc.fromHTML(
'<a href="http://www.google.com">Click Here</a>',
35,
25,
{
'width': 180, 'elementHandlers': elementHandler
});
doc.save("info.pdf");
I got the solution after sicking from last two hours. there is also a method in jsPDF which is not so popular i.e.
doc.textWithLink('Click here', x, y, { url: 'http://www.google.com' });
Hope it will help someone :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With