Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const finalDocDef = {
footer(currentPage, pageCount) {
return {
margin: 10,
columns: [
{ text: options.pdfFooterText, style: ['sub', 'gray', 'left'] },
{ text: `${currentPage} of ${pageCount}`, style: ['sub', 'gray', 'right'] },
],
};
},
content: allContent,
styles: pdfStyles,
};
pdfMake.fonts = {
Roboto: {
normal: 'Roboto-Regular.ttf',
bold: 'Roboto-Medium.ttf',
italics: 'Roboto-Italic.ttf',
bolditalics: 'Roboto-Medium.ttf',
},
RobotoMono: {
normal: 'RobotoMono-Regular.ttf',
bold: 'RobotoMono-Regular.ttf',
italics: 'RobotoMono-Regular.ttf',
bolditalics: 'RobotoMono-Regular.ttf',
},
};
// pdfMake.vfs = pdfFonts.pdfMake.vfs;
pdfMake.vfs = pdfFonts;