Open cxcandid opened 1 year ago
@cxcandid - just a little side note to your problem - it doesn't exactly solve your issue.
But: there is an alternative data source for tiled background layers in the "Layer Properties" --> "QGIS Server" --> "WMS Print Layer":
That way you can specify an alternative WMS service that can potentially offer higher-resolution (e.g. 300 dpi) prints as a single image (or with fewer tiles, if you hit the width/height limit of a service).
@andreasneumann - thank you very much for the hint. It is really good to know this feature.
In the case of PDF exports, it probably won't help.
@cxcandid - printing and PDF export is basically the same thing in QGIS server - so yes, the alternative WMS would be in the PDF export instead of the tiled background layers.
Also: have you tried the two settings "Publish WMS/WMTS data source URI" and "Advertise as background layer". It may be, if you turn the "Advertise as background layer" on, that it won't print / be part of the PDF export. Something to try, I am not sure.
@andreasneumann - the source of my raster layer is actually WMS. QGIS Server is tiling the raster automatically in GetPrint responses if format is PDF.
QGIS Server honors the setting for vector/raster export ("Always export as vectors") and for text export ("Always export Text as ...") but not the advanced option "Disable tiled raster layer export".
Maybe we could have another export option for the layout (Disable tiled raster layer
) which is respected by QGIS Server.
Ah - sorry about the confusion. It makes sense to add this setting in the GetPrint command.
It looks like the flag QgsLayoutRenderContext::FlagDisableTiledRasterLayerRenders
is missing in exportSettings.flags
(qgswmsrenderer.cpp).
// Draw selections
exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
// Disable Raster Tiles
if ( layout->customProperty( QStringLiteral( "pdfDisableRasterTiles" ), false ).toBool() )
{
exportSettings.flags |= QgsLayoutRenderContext::FlagDisableTiledRasterLayerRenders;
}
I hope someone can incorporate this customization as it is unfortunately beyond my current capabilities. 🙏
Is there really none of the QGIS server developers interested in making these small changes? ... maybe @elpaso ?
Feature description
When I export a layout to a PDF in QGIS client (3.28.1 Windows), I can select the advanced option to disable tiled raster layers. Unfortunately this option is missing in QGIS Server GetPrint requests.
It would be advantageous if we could disable tiled raster layers by default. Perhaps we could get a global setting like we have for raster resampling.
The raster tiles create unsightly effects and enlarge the output, if the map window is rotated.
When I open the PDF in Inkscape and ungroup all the groups, I see that a large portion of the raster images are just hidden and use a lot of memory, which doesn't happen when the raster is not tiled.
Additional context
No response