[gs-code-review] Fix for 687515, Some A3 Landscape Postscript files are transformed in Portrait

Alex Cherepanov alexcher at coscript.com
Sun Jun 13 14:47:33 PDT 2004


Make pdf_dominant_rotation() return unknown text rotation for the file
without text. It returned 0 rotation before, which excluded
consideration of DSC comments later on.
Fix bug 687515

-------------- next part --------------
Index: gs/src/gdevpdf.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpdf.c,v
retrieving revision 1.94
diff -b -u -r1.94 gdevpdf.c
--- gs/src/gdevpdf.c	27 May 2004 19:05:36 -0000	1.94
+++ gs/src/gdevpdf.c	13 Jun 2004 21:25:48 -0000
@@ -818,7 +818,7 @@
 pdf_dominant_rotation(const pdf_text_rotation_t *ptr)
 {
     int i, imax = -1;
-    long max_count = -1;
+    long max_count = 0;
     static const int angles[] = { pdf_text_rotation_angle_values };
 
     for (i = 0; i < countof(ptr->counts); ++i) {


More information about the gs-code-review mailing list