This topic is locked

Individual top, left and right margins for PDF generation

1/24/2022 10:33:03 AM
PHPRunner Tips and Tricks
mbintex author

Sadly, PHPRunner does not have parameters for extra or individual margins nor for choosing the paper size - the last is only possible with individual programming using the pdfmake.js API:

https://pdfmake.github.io/docs/0.1/document-definition-object/page/

With the margins there is a trick:

If you want to have extra upper margins for example for a DIN letter starting at 5.5cm from the top of the paper, you insert one extra table row at the top of your view print layout and with the text tool you insert

 

  is a hard space in HTML.

Choose a height for this cell and you get extra margin at the top.

If you want to have extra left margins, you insert one extra column at the left of your view print layout, insert the little text snippet und choose a width for this cell. You get extra margin from the left paper margin.

It´s only a little tricky to get a margin in exact centimeters based on the standard margins plus the pixel based width or height of your margin-cells.