Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible advice on Print PDF from IIIF layer in OpenLayers 6? #38

Closed
ghost opened this issue Sep 30, 2019 · 1 comment
Closed

Possible advice on Print PDF from IIIF layer in OpenLayers 6? #38

ghost opened this issue Sep 30, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 30, 2019

FROM:[email protected] Chris Fleet
Hello Klokan Friends,

I know you have said that you are not supporting your IIIFViewer ( https://github.com/klokantech/iiifviewer ) any more as OL6 has support for IIIF, ie. https://openlayers.org/en/latest/examples/iiif.html?q=iiif

However, I wondered if I might be able to pay for your (hopefully quick) advice on the way printing was handled in your iiifviewer, and particularly how we can get this Print PDF function to work in OL6?

Perhaps Dalibor (who created the original example viewer for NLS at https://clientportal.klokantech.com/iiifviewer/issues/7 ) or Petr may be able to advise?

As OL6 is now released, I have managed to create a basic NLS IIIF viewer at https://geo.nls.uk/maps/dev/viewer/ol6index.html with an overview map, overzooming and the Permalink functionality.

However, I cannot get the standard OL6 PDF export https://openlayers.org/en/latest/examples/export-pdf.html?q=pdf to work with the IIIF layer. I also can't get the PNG export https://openlayers.org/en/latest/examples/export-map.html?q=png to work with the IIIF layer either. I wonder if it may be due to the way the CORS headers are handled, as your former Print PDF function generates a an error message “Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.” in OL6. However, our IIIFServer runs on a machine where the CORS config is: Access-Control-Allow-Origin: * and clearly this CORS is okay for printing with your existing NLS viewer - the one we use at https://maps.nls.uk/view/00000207 and at http://klokantech.github.io/iiifviewer/examples/print.html.

I hope some brief advice on the approach to try for how to create the Print PDF function for a viewer like: https://openlayers.org/en/latest/examples/iiif.html?q=iiif might be possible?

Many thanks,

Chris

Link to the Clientportal:
https://clientportal.klokantech.com/iiifviewer/issues/38

@daliborjanak
Copy link
Member

Dupl #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant