You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/12/11 09:04:48 UTC
svn commit: r1644577 -
/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
Author: tilman
Date: Thu Dec 11 08:04:48 2014
New Revision: 1644577
URL: http://svn.apache.org/r1644577
Log:
PDFBOX-2552: normalize the rotation angle for all values
Modified:
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1644577&r1=1644576&r2=1644577&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Thu Dec 11 08:04:48 2014
@@ -753,11 +753,11 @@ public class PDPage implements COSObject
Dimension pageDimension = new Dimension( (int)widthPt, (int)heightPt );
int rotationAngle = findRotation();
// normalize the rotation angle
- if (rotationAngle < 0)
+ while (rotationAngle < 0)
{
rotationAngle += 360;
}
- else if (rotationAngle >= 360)
+ while (rotationAngle >= 360)
{
rotationAngle -= 360;
}