klokantech / iiifviewer

[DEPRECATED] IIIF WebGL / Canvas / DOM mobile-ready fast viewer powered by OpenLayers V3
http://klokantech.github.io/iiifviewer/
Other
54 stars 10 forks source link

PDF print auto size #8

Closed klokan closed 9 years ago

klokan commented 9 years ago

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.

daliborjanak commented 9 years ago

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

ghost commented 9 years ago

NLS related comment moved to https://github.com/klokantech/iiifviewer/issues/7#issuecomment-75728684

klokan commented 9 years ago

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