Error on clicking PDF: Button Uncaught TypeError: (u || j.pdfMake).createPdf is not a function

Error on clicking PDF: Button Uncaught TypeError: (u || j.pdfMake).createPdf is not a function

On clicking PDF button I'm getting Uncaught TypeError: (u || j.pdfMake).createPdf is not a function error.
It is because I've not used pdfmake.min.js file in my page.
While using pdfmake.min.js file in my page I'm getting the attached error:

Not sure how to resolve this.

Thanks in Advance

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @narendraadhikari12@gmail.com ,

    That sounds like a problem within pdfmake - it would be worth checking the order that you load the libraries. We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • narendraadhikari12@gmail.comnarendraadhikari12@gmail.com Posts: 2Questions: 1Answers: 0

    Hi Colin,
    Thanks for quick reply.
    I have tested the same code here
    and it seems to be working fine.The order of load is also the same.

    I'm using this library in my Salesforce component, where we need to load these libraries as a static resource and then refer those resources.

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    I'm afraid that in order to be able to help we'd need a link to a page showing the issue, rather than one that works as intended :).

    Allan

This discussion has been closed.