Skip to content
Advertisement

ReferenceError: jsPDF is not defined (with access to the package)

I made a userscript for Google where I click “Do something”, it prints out the webpage, in a PDF.

However, when I click on it, it gives an error: ReferenceError: jsPDF is not defined.

I have the jspdf file located with:

JavaScript

Can you explain why it is raising this error?

Code:

JavaScript

Advertisement

Answer

When you wrote:

JavaScript

you are using the grave accent instead of proper quotes:

https://en.wikipedia.org/wiki/Grave_accent

Once you fixed that, see if there is still an error.

Advertisement