MapsPrinter icon indicating copy to clipboard operation
MapsPrinter copied to clipboard

The `Disable tiled raster layer exports` option doesn't work

Open MrChebur opened this issue 3 months ago • 3 comments

The Disable tiled raster layer exports option doesn't work:

Image

This happens becauserasterize is not in the list of layout.customProperties()

if layout.customProperty("rasterize") in ["true", True]:
    exportSettings.rasterizeWholeImage = True

Here is full list of layout.customProperties():

 layout.customProperties() = ['atlasRasterFormat',
                                         'forceVector',
                                         'imageAntialias',
                                         'imageCropMarginBottom',
                                         'imageCropMarginLeft',
                                         'imageCropMarginRight',
                                         'imageCropMarginTop',
                                         'imageCropToContents',
                                         'pdfAppendGeoreference',
                                         'pdfCreateGeoPdf',
                                         'pdfDisableRasterTiles',
                                         'pdfExportThemes',
                                         'pdfIncludeMetadata',
                                         'pdfLayerOrder',
                                         'pdfLosslessImages',
                                         'pdfOgcBestPracticeFormat',
                                         'pdfSimplify',
                                         'pdfTextFormat',
                                         'singleFile',
                                         'variableNames',
                                         'variableValues']

So if you replace rasterize with pdfDisableRasterTiles it will work as expected.

https://github.com/DelazJ/MapsPrinter/blob/master/MapsPrinter/processor.py

if layout.customProperty("pdfDisableRasterTiles") in ["true", True]:
    exportSettings.rasterizeWholeImage = True

MrChebur avatar Nov 20 '25 11:11 MrChebur