[GIS] Is it possible in QGIS print composer to include a numeric scale in an html box

print-composerqgisqgis-2qgis-2.2qgis-2.4

For work I always have to create a table with my name, project name, date etc. into my map layouts. I also need to include the scale like "1:150000" in that table.

So far I am solving that by including an html table with the html box function of the print composer. Is there a way to automatically include the right scale? So far I only managed to automatically include the date by using a little javascript. Maybe something similar is also possible for the scale?

Best Answer

Tested with QGIS 3.6.1

As mentioned in the documentation, you can create a label and insert this code to get the current scale for the map with the item name Map 0:

map_get( item_variables('Map 0'), 'map_scale')
Related Question