3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
257 stars 143 forks source link

Expression variable for the name of the print output file #3892

Open guenterw opened 1 year ago

guenterw commented 1 year ago

It would be nice if the name for the document of the print output could be defined via a variable.

Possibly similar to what is possible in QGIS for atlas printing.

Gustry commented 1 year ago

Indeed, it can be either the name of the layout or the expression defined for the atlas.

cxcandid commented 1 year ago

@guenterw I guess that's very easy to implement, because QGIS Server uses the additional URL parameter "FILE_NAME" to specify a file name for the HTTP response. This works with GETPRINT requests as well.

nboisteault commented 1 month ago

@cxcandid Did you test that FILE_NAME works with GetPrint with all formats? I read that it is only for GetMap requests and .dxf format. https://docs.qgis.org/3.34/fr/docs/server_manual/services/wms.html#getmap

cxcandid commented 1 month ago

@nboisteault I use the URL parameter FILE_NAME with GetPrint in production to generate PDF outputs (QGIS Desktop 3.30.1 / QGIS Server 3.5.6 Windows). Didn't test any other format.