pdfmake icon indicating copy to clipboard operation
pdfmake copied to clipboard

local `dev-playground` not rendering PDF

Open rabraha3 opened this issue 7 years ago • 1 comments

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)
    );

rabraha3 avatar Jul 31 '19 15:07 rabraha3

Thanks for testing. Fixed by commit https://github.com/bpampuch/pdfmake/commit/c153a2502d1625a56b3c29324a4fddedb75aa394.

liborm85 avatar Aug 01 '19 11:08 liborm85