The table plugin JsPDF-AutoTable: https://github.com/simonbengtsson/jsPDF-AutoTable how do I make the page landscape as oppose to portrait? In the documentation it just says "Only pt supported (not mm or in)". I don't understand how to make the page landscape; landscape makes sense for a lot of tables....
The jsPDF AutoTables plugin is for converting a table to a PDF. This is a dependable client-side library to generate reports online in a table format.
jsPDF(orientation, unit, format) Creates new jsPDF document object. instance Parameters: orientation One of "portrait" or "landscape" (or shortcuts "p" (Default), "l") unit Measurement unit to be used when coordinates are specified. One of "pt" (points), "mm" (Default), "cm", "in"
Ok the answer is: var doc = new jsPDF('landscape');
It would be helpful if this was in the documentation.
I have done it initializing jsPDF instance like this:
var doc = new jsPDF('l', 'pt');
Here, l means Landscape format. For portrait, p can be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With