System.print issue

Hello Guys,
i found script bellow in an old topic :
*obj = system.gui.getParentWindow(event) .parent *
*printJob = system.print.createPrintJob(obj) *
*printJob.showPrintDialog = 0 *
*printJob.orientation = system.print.LANDSCAPE *

this work but result is not full screen, it is adding some grey empty space on sides.
what parameter should i change ?
i had to blur screen to not show private datas of my client :

You’re getting the component above the window itself. Try removing the .parent here. Or even going down into the root container, instead of up into the parent.

it is 2 windows, 1 docked window on the top part and another 1 lower part.
so if i remove .parent it prints only the top part.
i manage to play with margin to print it properly, but still there is this grey area not so nice to see.