Browse Source

* Patch from Graeme Geldenhuys (Bug ID 32478)
If page orientation was set to Landscape, the PDF exporter rendered the page from the bottom upwards.
This was because the page.Matrix was set up too early in the exporter.

git-svn-id: trunk@37330 -

michael 7 years ago
parent
commit
710adec670
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/fcl-report/src/fpreportpdfexport.pp

+ 4 - 3
packages/fcl-report/src/fpreportpdfexport.pp

@@ -717,13 +717,14 @@ begin
     end;  { case PaperName }
     pg.UnitOfMeasure := uomMillimeters; { report measurements are always in millimeter units }
 
+    // This must appear before configuring the pg.Matrix
+    if rpage.Orientation = poLandscape then
+      pg.Orientation := ppoLandscape;
+
     // Convert from the Cartesian coordinate system to the Screen coordinate system
     pg.Matrix.SetYScalation(-1);
     pg.Matrix.SetYTranslation(pg.GetPaperHeight);
 
-    if rpage.Orientation = poLandscape then
-      pg.Orientation := ppoLandscape;
-
     for b := 0 to (rpage.BandCount - 1) do
       begin
       rband := rpage.Bands[b];