diff --git a/components/lazreport/source/addons/lrcodereport/sample/main.pas b/components/lazreport/source/addons/lrcodereport/sample/main.pas index 50722ccd1c..5909fffc2a 100644 --- a/components/lazreport/source/addons/lrcodereport/sample/main.pas +++ b/components/lazreport/source/addons/lrcodereport/sample/main.pas @@ -84,12 +84,10 @@ var begin with Sender as TlrCodeReport do begin - // Set paper... 1=Letter 9=A4.... - //SetPaper(1, poLandscape); // try uncomment this line to test another paper size - // Important. Before drawing, add a page NewPage; - + // Set paper... 1=Letter 9=A4.... + //SetPaper(1, poLandscape); // try uncomment this line to test another paper size // Set up a custom style BoxText := GetDefaultTextRectStyle; BoxText.FontName := 'Times'; diff --git a/components/lazreport/source/addons/pdfexport/lr_e_pdf.pas b/components/lazreport/source/addons/pdfexport/lr_e_pdf.pas index 7ac64df84a..5b7401307f 100644 --- a/components/lazreport/source/addons/pdfexport/lr_e_pdf.pas +++ b/components/lazreport/source/addons/pdfexport/lr_e_pdf.pas @@ -76,8 +76,8 @@ type TPRText_ = class(TPRText); const - PDFEscx = 0.8; - PDFEscy = 0.8; + PDFEscx = 0.792553191; + PDFEscy = 0.785447761; procedure TfrTNPDFExportFilter.AddShape(Data: TShapeData; x, y, h, w: integer); @@ -184,8 +184,8 @@ begin PPage.MarginLeft := 0; PPage.MarginRight := 0; - PPage.Height := trunc(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgh*PDFEscy); - PPage.Width := trunc(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgw*PDFEscx); + PPage.Height := round(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgh*PDFEscy); + PPage.Width := round(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgw*PDFEscx); PRPanel := TPRPanel.Create(PPage); PRPanel.Parent := PPage;