openoereb / pyramid_oereb_mfp

Implementation of a static extract (PDF export) for the pyramid_oereb server with MapFish-Print
1 stars 3 forks source link

pdf extract cannot be created with mapfish_print:3.29 Docker-Image #137

Closed peterschaer closed 9 months ago

peterschaer commented 1 year ago

Our production environment uses mapfish-print version 3.29 (using the tag camptocamp/mapfish_print:3.29). Our Docker image was last rebuilt in early May. Now I wanted to test version 2.4.4 of pyramid_oereb in the development environment. But with this I can not create a PDF extract. I always get an error message (see error_pypdf.txt). pypdf is not able to read the PDF. I searched around for a long time and then made the following observation: the PDF contains multiple bookmarks (topic pages and documents):

bookmarks1

If I create a PDF with an older version of mapfish_print (e.g. the tag camptocamp/mapfish_print:3.29.4), then the PDF contains only one bookmark for each topic page and no bookmarks for documents

bookmarks2

I suspect that pypdf or the mapfish_print_proxy cannot handle these additional bookmarks. Now I have two questions:

  1. Did this error occur in another canton as well?
  2. Does anyone know if and what has changed in mapfish_print in the last few weeks?

Kind regards Peter

sitj-marc commented 1 year ago

Hello, We have also an error when upgrading to the 2.4.4 version of pyramid_oereb. The error occurs directly in the dynamic extract (check the error log attached). We are using also the latest version of pyramid_oereb_mfp. On the other hand, no errors where detected while upgrading to 2.4.3 version of pyramid_oereb. As for mapfish_print changes, I think that c2c will be able to answer this question.

Kind regards Marc Dynamic_extract_error.txt

peterschaer commented 1 year ago

Hi Marc

your error can be fixed by adding the new logo hooks into the config. You can see an example for this in our config:

https://github.com/AGIBE/oereb_server/blob/95803656c21e0524144b8a515c0775ece2415638/oereb_server.mako#L336

Kind regards Peter

sitj-marc commented 1 year ago

Hello Peter Thank you very much for your quick feedback. It resolved the error we had.

As for the multiple bookmarks you've mentionned before, we also have the same issue

image

Kind regards Marc

jwkaltz commented 1 year ago

Hi Peter, Hi Marc Regarding the recent MapFish-Print versions, so far we have discovered that there are technical issues due to the update of the Java version used by MapFish-Print. We are currently working on fixing that (via maintenance). I am not yet sure if this is the cause for the problem you reported, but MapFish-Print needs to be fixed first, including presumably a new release, and then we can reevaluate the behavior.

jwkaltz commented 9 months ago

Hi @peterschaer I think this issue can be closed, we have tested with MapFish-Print 3.30.2, but in fact I think it will now work again also with MapFish-Print 3.30.5.

peterschaer commented 9 months ago

Indeed, this is issue can be closed. Thanks!