.. _integrator_print: Print ===== Using MapFish Print v3 ---------------------- Template configuration ~~~~~~~~~~~~~~~~~~~~~~ All print-related files are located in the ``print/`` folder, and the files related to the template in the ``print/print-apps/`` folder. The main configuration file is ``print/print-apps//config.yaml``. * `MapFish print documentation `_ * `Startup with Jasper Reports `_ Notes about the scales ~~~~~~~~~~~~~~~~~~~~~~ The web map and the map printing do not use the same scales. Therefore, if you change the configuration of min/max scaling, you should also test map printing to be sure that it also works as expected. Using a single print server in a set of sites --------------------------------------------- For memory issues, it is recommended to only use a single print server for a set of sites. For that, we need to have only one ``vars_.yaml`` which can easily be generated by the templating. Then we should do: * Remove the print from the ``children`` projects by removing the ``print`` folder: .. prompt:: bash git rm print * Deactivate the print compilation by adding the following lines in the ``.mk`` file: .. code:: make PRINT = FALSE * Point to the parent print server by editing the following lines in the ``vars.yaml`` file: .. code:: yaml vars: ... # For print proxy # This value means that we use the parent print server print_url: http://{host}:8080/print/pdf/ * If needed, set the print templates used by anonymous users by adding the following in the application configuration (``vars.yaml``): .. code:: yaml vars: ... functionalities: anonymous: print_template: - 1 A4 child - 2 A3 child Having a dedicated print instance --------------------------------- The goal is to be able to create a custom makefile with which one we make: .. prompt:: bash make --makefile=.mk to build only the print service. For this, create a makefile with: .. code:: yaml BUILD_RULES = test-packages print TEST_PACKAGES = main print