Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      Ubuntu 11.10 64 bit on Intel® Core™ i5-2430M CPU. Sun JDK "1.6.0_30" (build 1.6.0_30-b12) Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode).

      Description

      Rotation logic in org.apache.pdfbox.pdmodel.PDPage on line 721 is not right. Page width and height should be swapped only if the rotation is 90 degree or 270 degree. Page width and height should not be swapped for 0, 180 or 360 degree rotation. Condition on line 721 should be

      if ((rotationAngle == 90) || (rotationAngle == 270))

      Patch:

      ===================================================================
      — PDPage.java (revision 1402957)
      +++ PDPage.java (working copy)
      @@ -718,7 +718,7 @@

      { rotationAngle -= 360; }
      • if (rotationAngle != 0)
        + if ((rotationAngle == 90) || (rotationAngle == 270)) { retval = new BufferedImage( heightPx, widthPx, imageType ); }

        ===================================================================

        Attachments

        1. test.pdf
          1.91 MB
          Ravi Hegde

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              ravihegde@hotmail.com Ravi Hegde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: