You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone!
I'm using the librery for a Angular proyect and it's works fantastic. However, I'm having a weird problem when I try to use embedded fonts and compressed pfd on Safari (only here). The result is a pdf with strange caracters :(
The strange thing is that if the pdf is not compressed, it's works good!
Here some stuffs to get context:
Installed jsPDF by npm
Angular 8
Code use:
import jsPDF from 'jspdf';
import RobotoRegularFont from '../../../assets/fonts/Roboto/Roboto-Regular.ttf';
... // other code
generateAndDownloadPDF() {
const doc = new jsPDF('p', 'mm', 'a4', true);
doc.addFont(RobotoRegularFont, 'Roboto', 'normal');
// other code
doc.setFont('Roboto');
// other code
doc.save('export.pdf');
}
Before using this code I tryed with the exaple on the README.md but had the same problem.
The fonts works for all browsers and differents SO in compress mode except Safari.
Any thought what can be happening?
Thanks :)
The text was updated successfully, but these errors were encountered:
Hey everyone!
I'm using the librery for a Angular proyect and it's works fantastic. However, I'm having a weird problem when I try to use embedded fonts and compressed pfd on Safari (only here). The result is a pdf with strange caracters :(
The strange thing is that if the pdf is not compressed, it's works good!
Here some stuffs to get context:
Before using this code I tryed with the exaple on the README.md but had the same problem.
The fonts works for all browsers and differents SO in compress mode except Safari.
Any thought what can be happening?
Thanks :)
The text was updated successfully, but these errors were encountered: