mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
319 B
TypeScript
11 lines
319 B
TypeScript
import * as pdfMake from 'pdfmake/build/pdfmake';
|
|
import * as pdfFonts from 'pdfmake/build/vfs_fonts';
|
|
|
|
const docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
|
|
|
|
const createPdf = () => {
|
|
const pdf = pdfMake;
|
|
pdf.vfs = pdfFonts.pdfMake.vfs;
|
|
pdfMake.createPdf(docDefinition).download();
|
|
};
|