Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pdf = new jsPDF('p', 'pt', 'letter');
- pdf.addFileToVFS('CustomFont.tff', 'base64 of .tff file');
- pdf.addFont('CustomFont.tff', 'CustomFont', 'normal');
- pdf.setFont('CustomFont');
- var source = $('#pdf')[0];
- var margins = {
- top: 50,
- bottom: 60,
- left: 40,
- width: 520
- };
- pdf.fromHTML(
- source,
- margins.left,
- margins.top, {
- 'width': margins.width,
- 'elementHandlers': specialElementHandlers
- },
- function (dispose) {
- pdf.save('Test.pdf');
- }, margins);
Add Comment
Please, Sign In to add comment