1

I am using jspdf.debug.js latest version. FontAwesome icons used in a web page are not rendering in pdf. I added a FontAwesome user icon in the page.Refer to the image.(Left one is HTML and pdf output is on right) Below is my code snippet.

var pdf = new jsPDF('p', 'pt', 'letter');
pdf.addFont('FontAwesome', 'FontAwesome', 'normal');
pdf.setFont('FontAwesome');
pdf.canvas.height = 72 * 11;
pdf.canvas.width = 72 * 8.5;
html2pdf(document.body, pdf, function(pdf){
    var iframe = document.createElement('iframe');
    iframe.setAttribute('style','position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
    document.body.appendChild(iframe);
    iframe.src = pdf.output('datauristring');
});

enter image description here

BalaajiChander
  • 139
  • 2
  • 20
Neeraj Bhatt
  • 111
  • 2
  • 10

1 Answers1

1

jspdf does not support special symbols. Here is the gitHub issue. See info in this answer.

Yevhenii Bahmutskyi
  • 1,411
  • 3
  • 18
  • 38