Skip to content

Commit

Permalink
Adding support for printing to work with a shared volume (cloud envir…
Browse files Browse the repository at this point in the history
…onment) (#25)

* Adding Support for reading the tempfile from the disk

* Adding Support for reading the tempfile from the disk
Removing the caching mechanism

* Adding Support for reading the tempfile from the disk
Fixing the mistake of version changes

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

Adding documentation

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

Adding documentation

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

Adding documentation

---------

Co-authored-by: ritika-t-thakur-alb <[email protected]>
Co-authored-by: ritika-t-thakur-alb <[email protected]>
  • Loading branch information
3 people authored Oct 14, 2024
1 parent 8c80498 commit 55b10e7
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 114 deletions.
7 changes: 7 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,10 @@ 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
In case of cloud environment a pvc(persistence volume claim) or a shared volume mount can be passed to the variable MAPFISH_PDF_FOLDER and hence the data can be synched between multiple instances of server.
6 changes: 4 additions & 2 deletions docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Upgrade
Version 2.3.2
-------------

Under development.
* 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.
In case of cloud environment a pvc(persistence volume claim) or a shared volume mount can be used to sync this data between multiple instances of server, where as in case of non-cloud environment the tempDir can be shared between muiltiple instances running on the same machine. This path can be passed by setting the environment variable MAPFISH_PDF_FOLDER.


Version 2.3.1
-------------
Expand Down Expand Up @@ -69,4 +71,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

0 comments on commit 55b10e7

Please sign in to comment.