Index: C:/Dev/pdfbox-0.8.0-incubating/pdfbox-trunk/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
===================================================================
--- C:/Dev/pdfbox-0.8.0-incubating/pdfbox-trunk/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java	(revision 882426)
+++ C:/Dev/pdfbox-0.8.0-incubating/pdfbox-trunk/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java	(working copy)
@@ -110,6 +110,21 @@
      */
     private Map pageMap = null;
 
+    private Integer[] portraitSpinFormats = new Integer[] 
+    {
+        Integer.valueOf(PageFormat.PORTRAIT),
+        Integer.valueOf(PageFormat.LANDSCAPE),
+        Integer.valueOf(PageFormat.PORTRAIT),
+        Integer.valueOf(PageFormat.REVERSE_LANDSCAPE)
+    };
+    private Integer[] landscapeSpinFormats = new Integer[]
+    {
+        Integer.valueOf(PageFormat.LANDSCAPE),
+        Integer.valueOf(PageFormat.PORTRAIT),
+        Integer.valueOf(PageFormat.REVERSE_LANDSCAPE),
+        Integer.valueOf(PageFormat.PORTRAIT)
+    };
+
     /**
      * Constructor, creates a new PDF Document with no pages.  You need to add
      * at least one page for the document to be valid.
@@ -939,8 +954,8 @@
         double width=mediaBox.getWidth();
         double height=mediaBox.getHeight();
 
-
         int rotation = page.findRotation();
+        /*
         if(rotation == 90)
         {
             format.setOrientation( PageFormat.LANDSCAPE );
@@ -953,7 +968,12 @@
         {
             format.setOrientation( PageFormat.PORTRAIT );
         }
+        */
 
+        boolean originallyPortrait = height > width;
+        int spins = rotation/90;
+        format.setOrientation(originallyPortrait ? portraitSpinFormats[spins].intValue() : landscapeSpinFormats[spins].intValue());
+
         // If there is rotation > 0, we have to exchange the pagedimension for the printer
         if (rotation == 90 || rotation == 270) 
         {

