I suggested to add
Code: Select all
prt = NIL
Code: Select all
IF Printers.dir # NIL THEN prt := Printers.dir.Current() ELSE prt := NIL END;
prt = NIL; (* <----------- *)
IF prt # NIL THEN
prt.SetOrientation(FALSE);
So eliminating printer from calculation of document size and margins is solving current issue for this case.
There should be more correct calculations for size and margins of document for this rare printer configuration.
However this is difficult to do without ability of reproducing this in my PC.