I'm trying to set the extent of a square feature to the canvas, that works in Qgis, but when i print the canvas into PDF, it gimme always some empty area, below the screenshot of Qgis canvas having feature extent:
below the resulting PDF having empty spaces:
below pyqgis code used to get...