pdfmake
pdfmake copied to clipboard
local `dev-playground` not rendering PDF
Is there an error in the dev-playground, when trying to run it locally? The PDF does not get rendered. As far as I see, the PDF binary (base64 encoded data)
In line 28 of server.js:
pdf.getDataUrl(callback);
The .getDataUrl() method accepts zero arguments; it only returns a promise which resolves into the PDF binary data. I got the PDF to render by explicitly handling the promise returned from .getDataUrl(). I changed line 28 in server.js to:
pdf.getDataUrl().then(
callback,
err => console.error(err)
);
Thanks for testing. Fixed by commit https://github.com/bpampuch/pdfmake/commit/c153a2502d1625a56b3c29324a4fddedb75aa394.