Hello, I have a PyQGIS app, that generates a PDFs from an Atlas.
If I generate the PDF directly from QGIS Desktop all PDF generate correctly. But If I generate the PDF with my PyQGIS app, some PDF don't generate properly (some elements do not appear) and give error "QPen::setWidthF: Setting a pen width that is out of range". The first PDF contains all the elements, the other PDF are parts of first PDF, so the elements are missing in some PDFs that are in the first. One year ago, this app works perfect. I have tried to change all PDF export options, but the error continues. I make this question in Gis StackExchange, and no one give any answer: https://gis.stackexchange.com/questions/469644/pyqgis-qgslayoutexporter-gives-error-qpensetwidthf-setting-a-pen-width-that Here is a part of my code: # Generate atlas # Es una QgsLayoutAtlas myAtlas.beginRender() myAtlas.next() for i in range(0, myAtlas.count()): exporter = QgsLayoutExporter(myAtlas.layout()) file_name=os.path.join(dir_destiny,'Individuals')+'/'+myAtlas.currentFilename()+".pdf" pdf_settings=QgsLayoutExporter.PdfExportSettings() pdf_settings.forceVectorOutput=False pdf_settings.exportMetadata = False pdf_settings.appendGeoreference = False #pdf_settings.textRenderFormat = QgsRenderContext.TextFormatAlwaysOutlines # For "Always Export Text as Paths" pdf_settings.textRenderFormat = QgsRenderContext.TextFormatAlwaysText # For "Always Export Text as Text Objects" pdf_settings.rasterizeWholeImage = True # For "Disable tiled raster layer exports" Hace que ocupe menos si es TRUE pdf_settings.simplifyGeometries = False exporter.exportToPdf(file_name,pdf_settings) Thank you In advance for your attention and help. Kind regards, Robert Benet
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer