mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 13:19:20 +02:00
LazReport, pdfexport, improves exported page sizes, from Julio Jimenez Borreguero
git-svn-id: trunk@37404 -
This commit is contained in:
parent
fecde4484b
commit
2cf7d19da5
@ -84,12 +84,10 @@ var
|
|||||||
begin
|
begin
|
||||||
with Sender as TlrCodeReport do
|
with Sender as TlrCodeReport do
|
||||||
begin
|
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
|
// Important. Before drawing, add a page
|
||||||
NewPage;
|
NewPage;
|
||||||
|
// Set paper... 1=Letter 9=A4....
|
||||||
|
//SetPaper(1, poLandscape); // try uncomment this line to test another paper size
|
||||||
// Set up a custom style
|
// Set up a custom style
|
||||||
BoxText := GetDefaultTextRectStyle;
|
BoxText := GetDefaultTextRectStyle;
|
||||||
BoxText.FontName := 'Times';
|
BoxText.FontName := 'Times';
|
||||||
|
@ -76,8 +76,8 @@ type
|
|||||||
TPRText_ = class(TPRText);
|
TPRText_ = class(TPRText);
|
||||||
|
|
||||||
const
|
const
|
||||||
PDFEscx = 0.8;
|
PDFEscx = 0.792553191;
|
||||||
PDFEscy = 0.8;
|
PDFEscy = 0.785447761;
|
||||||
|
|
||||||
procedure TfrTNPDFExportFilter.AddShape(Data: TShapeData; x, y, h, w: integer);
|
procedure TfrTNPDFExportFilter.AddShape(Data: TShapeData; x, y, h, w: integer);
|
||||||
|
|
||||||
@ -184,8 +184,8 @@ begin
|
|||||||
PPage.MarginLeft := 0;
|
PPage.MarginLeft := 0;
|
||||||
PPage.MarginRight := 0;
|
PPage.MarginRight := 0;
|
||||||
|
|
||||||
PPage.Height := trunc(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgh*PDFEscy);
|
PPage.Height := round(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgh*PDFEscy);
|
||||||
PPage.Width := trunc(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgw*PDFEscx);
|
PPage.Width := round(CurReport.EMFPages[FPageNo - 1]^.PrnInfo.Pgw*PDFEscx);
|
||||||
|
|
||||||
PRPanel := TPRPanel.Create(PPage);
|
PRPanel := TPRPanel.Create(PPage);
|
||||||
PRPanel.Parent := PPage;
|
PRPanel.Parent := PPage;
|
||||||
|
Loading…
Reference in New Issue
Block a user