mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-01-13 09:00:42 +08: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();
|
|
};
|