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

Adding support for printing to work with a shared volume (cloud environment) #25

Merged
merged 9 commits into from
Oct 14, 2024
Merged
6 changes: 6 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,9 @@ Once ImageMagick is installed (and Ghostscript) then the spring configuration ne
Since the ImageMagick support is a commonly requested configuration there is an IMAGEMAGICK artifact prebuild with the correct configuration. To use this artifact change your maven dependency from: print-servlet-1.2-SNAPSHOT to print-servlet-1.2-SNAPSHOT-IMG-MAGICK (you will likely have to change the 1.2-SNAPSHOT portion to the version of mapfish that you are using).

By default ImageMagick will try to find the convert tool in /usr/bin/convert. You will want to find the path to your convert tool and update imagemagick-spring-application-context-override.xml if that file is included in your build, or mapfish-spring-application-context.xml if you manually changed the mapfish-spring-application-context.xml file to include the imagemagick configuration.


Defining temp work directory for Printing module
----------------------

MAPFISH_PDF_FOLDER : optional environment variable to define the directory path for storing printouts generated by the printing module. When not defined default value is from MapPrinterServlet context
3 changes: 2 additions & 1 deletion docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Upgrade
Version 2.3.2
-------------

* Support for printing in a cloud environment and in an environment without sticky sessions : generates a requested printout metadata json file and stores it in the tempDir. With this information persisted, there is no need for sticky sessions and printing module can be used in a cloud environment with shared volume.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how does this work in a could environment - don’t they need to share a temp folder or something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jodygarnett ,
I elaborated my documentation a bit more.
Answering your question: depending on the cloud environment, engineers an pick an option to share a volume between multiple instances and pass the path in the existing MAPFISH_PDF_FOLDER environment variable.
I have already updated installation.rst file with the documentation for MAPFISH_PDF_FOLDER.

I think the steps for creating a shared volume is not related with this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jodygarnett, i think everything is done from our side.
Do you need more information?

Under development.

Version 2.3.1
Expand Down Expand Up @@ -69,4 +70,4 @@ Release notes:
Developers using mapfish-print-v2 as a library are adivsed:

* packages `com.itextpdf.text` change to `com.lowagie.text`
* `com.itextpdf.text.BaseColor` changes to `java.awt.Color`
* `com.itextpdf.text.BaseColor` changes to `java.awt.Color`
Loading
Loading