diff -Naur cups-1.3.7.old/filter/texttops.c cups-1.3.7.new/filter/texttops.c --- cups-1.3.7.old/filter/texttops.c 2010-03-08 11:10:23.040775000 -0800 +++ cups-1.3.7.new/filter/texttops.c 2010-03-09 16:16:28.482652000 -0800 @@ -97,6 +97,13 @@ puts("gsave"); + /* If we're operating in Landscape (Orientation == 1 or Orientation == 3) + then rotate and translate the page */ + if ( Orientation & 1 ) { + printf ("%d rotate\n", (Orientation & 3) * 90 ); + printf("0 %.0f neg translate\n", PageLength); + } + if (PrettyPrint) printf("%d H\n", NumPages); @@ -212,7 +219,7 @@ puts("%!PS-Adobe-3.0"); printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength); - printf("%%cupsRotation: %d\n", (Orientation & 3) * 90); + puts("%cupsRotation: 0"); puts("%%Creator: texttops/" CUPS_SVERSION); printf("%%%%CreationDate: %s\n", curdate); WriteTextComment("Title", title); @@ -721,6 +728,8 @@ puts("%%EndComments"); puts("%%BeginProlog"); + printf("%%%%Orientation: %s\n", + Orientation & 1 ? "Landscape" : "Portrait"); /* * Download any missing fonts...