From bf7a97b65f7271dbb0e9b858966a529e4772f6d9 Mon Sep 17 00:00:00 2001 From: jesus Date: Mon, 4 Mar 2013 05:59:26 +0000 Subject: [PATCH] LazReport, store used paper size git-svn-id: trunk@40474 - --- components/lazreport/source/lr_prntr.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/lazreport/source/lr_prntr.pas b/components/lazreport/source/lr_prntr.pas index 6b4103dd76..fbb30e7c32 100644 --- a/components/lazreport/source/lr_prntr.pas +++ b/components/lazreport/source/lr_prntr.pas @@ -801,11 +801,14 @@ begin {$Endif} try - PaperWidth:=fPrinter.PageWidth; - PaperHeight:=fPrinter.PageHeight; - finally + // update paper size in std pt units + PaperWidth := round(fPrinter.PaperSize.Width * 72 / fPrinter.XDPI); + PaperHeight := round(fPrinter.PaperSize.Height * 72 / fPrinter.YDPI); + except PaperWidth:=1; PaperHeight:=1; + // let it as it was .... + raise end; end; {$ifdef DbgPrinter}