浏览代码

* 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 8 年之前
父节点
当前提交
710adec670
共有 1 个文件被更改,包括 4 次插入3 次删除
  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];