7bb1955
diff -up cups-1.4.3/filter/texttops.c.texttops-rotate-page cups-1.4.3/filter/texttops.c
7bb1955
--- cups-1.4.3/filter/texttops.c.texttops-rotate-page	2008-11-06 16:42:18.000000000 +0000
7bb1955
+++ cups-1.4.3/filter/texttops.c	2010-05-18 16:42:23.669940884 +0100
7bb1955
@@ -97,6 +97,13 @@ WritePage(void)
7bb1955
 
7bb1955
   puts("gsave");
7bb1955
 
7bb1955
+  /* If we're opereating in Landscape (Orientation == 1 or Orientation == 3)
7bb1955
+     then rotate and translate the page */
7bb1955
+  if ( Orientation & 1 ) {
7bb1955
+    printf ("%d rotate\n", (Orientation & 3) * 90 );
7bb1955
+    printf("0 %.0f neg translate\n", PageLength);
7bb1955
+  }
7bb1955
+
7bb1955
   if (PrettyPrint)
7bb1955
     printf("%d H\n", NumPages);
7bb1955
 
7bb1955
@@ -212,7 +219,7 @@ WriteProlog(const char *title,		/* I - T
7bb1955
 
7bb1955
   puts("%!PS-Adobe-3.0");
7bb1955
   printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength);
7bb1955
-  printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
7bb1955
+  puts("%cupsRotation: 0");
7bb1955
   puts("%%Creator: texttops/" CUPS_SVERSION);
7bb1955
   printf("%%%%CreationDate: %s\n", curdate);
7bb1955
   WriteTextComment("Title", title);
7bb1955
@@ -549,6 +556,8 @@ WriteProlog(const char *title,		/* I - T
7bb1955
   puts("%%EndComments");
7bb1955
 
7bb1955
   puts("%%BeginProlog");
7bb1955
+  printf("%%%%Orientation: %s\n", 
7bb1955
+         Orientation & 1 ? "Landscape" : "Portrait");
7bb1955
 
7bb1955
  /*
7bb1955
   * Download any missing fonts...