New answers tagged

1

Thank you so much Fran Raga, you solve my problem. Here is the code to export a map by code using Maps Printer plugin : from qgis.core import * import qgis.utils composerTitle = 'Composer_001' # Name of the composer you want to export folder = 'C:/Users/.../' extension = '.jpeg' # Any extension supp title = 'TestExport' project = QgsProject.instance() ...


1

You don't need loop active composer,only select print layout by name. composerTitle = 'Composer_001' # Name of the composer you want to export project = QgsProject.instance() projectLayoutManager = project.layoutManager() layout = projectLayoutManager.layoutByName(composerTitle)


2

You may use the HTML frame. Add a frame and add an expression like this Really cool map of [% @layout_name %] printed on [% format_date(now(),'dd.MM.yyyy')%] UPDATE (after Erik's comment): Really cool map of [% @layout_name %] printed on [% format_date(@project_creation_date,'dd.MM.yyyy')%] Gives in my case


2

Here you go: This is a rad map of [% @layout_name %], created on [%format_date(now(),'dd.MM.yyyy')%] Feel free to browse the field calculator's function-trees, since the help/examples offered are rather easy to understand.


2

I was having the same trouble just now. After further investigation, I found that I accidentally had changed the label's size unit type. Had to play around with it for a while but millimeter type seemed to work just fine. I previously had it at Pixel. That seemed to export my labels just fine. Hope it helps.


0

I found a simple work around which involves printing the composer into a pdf and then editing the pdf (edit text and images). Align your symbols and then export the file as a JPG (or not if you prefer pdf).


2

Just by way of an update, you can now achieve some form of order within aggregate functions in QGIS 3.8 (see changelog entry here) by specifying the order_byparameter. You can order by two fields by concatenating them in the order_by parameter. However the order will be alphabetical so if you are using integers make sure to pad with leading zeros so that e....


Top 50 recent answers are included