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