What is pixel width and length for jspdf's default 'a4' format?

Yevhenii Bahmutskyi picture Yevhenii Bahmutskyi · Jun 26, 2017 · Viewed 9.9k times · Source

What is the size in pixels for jspdf's 'a4' format? I want to add an image to pdf so it will take full width of the document.

new jsPDF('p', 'pt', 'a4');

Answer

L. Merlo picture L. Merlo · Jun 26, 2017
new jsPDF('p', 'pt', [ 595.28,  841.89])

In the sourcecode on GitHub you can see the supported units (relative proportions to pt), and you can also see the default page formats (with their sizes in pt).

Hope this could help,

Laura.