-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
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 :)
Metadata
Metadata
Assignees
Labels
No labels