6

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....

user1190132
  • 515
  • 4
  • 18

2 Answers2

11

Ok the answer is: var doc = new jsPDF('landscape');

It would be helpful if this was in the documentation.

user1190132
  • 515
  • 4
  • 18
6

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.

ni8mr
  • 1,725
  • 3
  • 31
  • 58