尝试使用JS API PdfMake构建 PDF :
<script type="text/javascript" src="/app/js/vfs_fonts.js"></script>
<script type="text/javascript" src="/app/js/pdfmake.min.js"></script>
然后根据这个 Helloworld,我运行:
var docDef={ content: 'This is an sample PDF printed with pdfMake' }
pdfMake.createPdf(docDef).download('optionalName.pdf');
我有这个错误:
未捕获的类型错误:无法读取未定义的属性“Roboto-Regular.ttf”