Rectangle 27 0

i solved my problem with the following code line: require("script!pdfmake"); You have to use the scriptloader from webpack.

javascript - pdfmake use in an application with webpack - Stack Overfl...

javascript webpack pdfmake
Rectangle 27 0

i solved my problem with the following code line: require("script!pdfmake"); You have to use the scriptloader from webpack.

can you please show me your config, i can't for the life of me use this library with webpack

If you webpack and pdfmake lib from the build folder link used it would have to go is white following. require("script!**./Path to the lib pdfmake***"); Then you can run without what to initialize the following command immediately: pdfMake.createPdf(docDefinition)

If you NPM USER it's even easier. NPM install pdfmake npm install pdfmake var PdfPrinter = require('pdfmake'); var fonts = { Roboto: { normal: 'citycontrasts.ttf' } }; var printer = new PdfPrinter(fonts); var pdfDoc = printer.createPdfKitDocument(docDefinition); So it should also run without Problehme in Webpack.

Are you sure this works? I've replied here as well since I can get neither of your examples to work and I'm kinda stuck at the moment: github.com/bpampuch/pdfmake/issues/150

javascript - pdfmake use in an application with webpack - Stack Overfl...

javascript webpack pdfmake