Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: specified where the defaultSettings code can be found

...

Anchor
templatesettings
templatesettings
Template Settings

The code below overrides the default print settings. It can be added inside a script block in the head of a print template.

Code Block
//Leave the properties which you want to change, you can safely remove the rest
var defaultSettings = {
    'marginTop' : 10, //mm
    'marginRight' : 10, //mm
    'marginBottom' : 10, //mm
    'marginLeft' : 10, //mm
    'pageSize' : 'A4', //full list http://doc.trolltech.com/4.6/qprinter.html#PageSize-enum
    'orientation' : 'portrait', //Possible values 'landscape' & 'portrait'
    'headerHeight' : 0, //mm
    'headerPadding' : 0, //mm
    'footerHeight' : 15, //mm
    'footerPadding' : 1 //mm
    'scales' : [ 250000, 125000, 50000, 25000, 10000, 5000, 2500, 1250, 1000, 500, 250, 125 ]
}

...

You may also change the logo but make sure the height of the logo image does not exceed the height of the footer/header provided in the Template Settings and of course the copyright text. Also please use .png or .jpg for the logo images, .gif images will not work. 

...

In order for this to happen you need to do the following:

...