Skip to content

Commit

Permalink
Use to_bool for rasterization property
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed May 31, 2024
1 parent 305ca91 commit d7600ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Fix Python exception about PDF rasterized

## 3.4.0 - 2024-05-27

* Bump QGIS minimum version to QGIS 3.22
Expand Down
3 changes: 2 additions & 1 deletion atlasprint/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from qgis.gui import QgsLayerTreeMapCanvasBridge, QgsMapCanvas

from .logger import Logger
from .tools import to_bool

__copyright__ = 'Copyright 2021, 3Liz'
__license__ = 'GPL version 3'
Expand Down Expand Up @@ -217,7 +218,7 @@ def print_layout(
# Default to PDF
# PDF settings
if atlas_layout:
settings.rasterizeWholeImage = atlas_layout.customProperty("rasterize", False)
settings.rasterizeWholeImage = to_bool(atlas_layout.customProperty("rasterize", False), default_value=False)
# Export
result, error = QgsLayoutExporter.exportToPdf(atlas or report_layout, str(export_path), settings)
# Let's override error message
Expand Down

0 comments on commit d7600ee

Please sign in to comment.