klokantech / iiifviewer

[DEPRECATED] IIIF WebGL / Canvas / DOM mobile-ready fast viewer powered by OpenLayers V3

Home Page:http://klokantech.github.io/iiifviewer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDF print auto size

klokan opened this issue · comments

The PDF print to "auto" should use the size of the canvas element, not of the page.
Right now it seems to be using the size of page which is wrong.

It runs fine for the demo at http://klokantech.github.io/iiifviewer/examples/print.html, because there the canvas has a size of the page, but otherwise it is wrong.

Size of element is passed to constructor of jsPdf and its created on instanceof IiifPrint.
We can change behavior of creating instance of jsPdf or to constructor could be added element instead of "auto". IiifPrint will take size of this element...

NLS related comment moved to #7 (comment)

No need for change in the API is required.
The PDF page is going to be initialised when first object is added.