Search code examples
javascriptpdffontsadobejspdf

Problem with downloading pdf with custom font using jsPDF 'bad /BBox'


When i download a pdf file that i've created using jsPDF, adobe reader gives an error when i open the file saying "the font fontname.otf contains a bad /BBox". Thus i can't print this custom font. When i open the file using chrome, it will open and show the font, but when i print through chrome or adobe reader it prints with standard font.

i've tried converting the otf to ttf and using that with no success. Gives the same error. The font is not corrupted since i've installed on my pc and it's working fine.


Solution

  • Fixed by using the base64 in the same file as main.js and not using external default_vfs.js