I'm in Print Composer and want to develop a template. In that template, I would like to add a text Label which automatically represents the size of the sheet in the format "Sheet size: 841x1189".

There is got to be an expression for that but I can't find it. Can someone recap it for me?

1 Answer 1


Go with

'Sheet size: '||@layout_pageheight ||' x '|| @layout_pagewidth ||' mm'

For the future: In any template text field, go to "add expression" and check the bullet point "variables".

Additional input from csk: In order for the formula to work you need to add [% in the front and %] in the end. Forgot about this, my bad.

So we have:

[%'Sheet size: '||@layout_pageheight ||' x '|| @layout_pagewidth ||' mm'%]
  • This works in the expression builder. To paste it directly into the text label, you need to add [% before and %] after.
    – csk
    Commented Apr 16, 2019 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.