yudit-2.9.0-patch1 Priority: low Origin: B.Lefebvre Usage: patch -p0 < thisfile Fixes landscape printout in Yudit uniprint. Gaspar Sinai, Tokyo 2008-06-15 Hi Gaspar. Thanks for your marvelous software, Yudit. I use it since years. I recently had to use uniprint in Landscape mode, and I obtained bad result, text printed in the middle of the page. I tried to pipe uniprint with ps2pdf, same result. So I took a look in the source, and build a patch. I send it to you hereunder. If I misused uniprint and build a silly patch, please let me know. As I don't know which form of diff is useful, I send two. Best regards. B.Lefebvre *** yudit-2.9.0/swindow/SPostscript.cpp- 2007-12-09 20:52:09.000000000 +0900 --- yudit-2.9.0/swindow/SPostscript.cpp 2008-06-15 14:46:31.000000000 +0900 *************** *** 209,217 **** SString bb("%%BoundingBox: "); ! bb.print (widthMargin); bb.append (" "); ! bb.print (heightMargin); bb.append (" "); ! bb.print (width - widthMargin); bb.append (" "); ! bb.print (height - heightMargin); ! head.append (bb); head.append ("%%Title: Untitled"); --- 209,235 ---- SString bb("%%BoundingBox: "); ! switch (orientation) ! { ! case LANDSCAPE: ! ! bb.print (heightMargin); bb.append (" "); ! bb.print (widthMargin); bb.append (" "); ! bb.print (height - heightMargin); bb.append (" "); ! bb.print (width - widthMargin); ! head.append (bb); ! ! break; ! ! case PORTRAIT: ! default: ! ! bb.print (widthMargin); bb.append (" "); ! bb.print (heightMargin); bb.append (" "); ! bb.print (width - widthMargin); bb.append (" "); ! bb.print (height - heightMargin); ! head.append (bb); ! ! break; ! } head.append ("%%Title: Untitled"); *************** *** 263,268 **** m.append ("A4 "); } ! m.print (width); m.append (" "); ! m.print (height); m.append (" 0 () ()"); head.append (m); // windows gs goes crazy if I uncomment this. --- 281,294 ---- m.append ("A4 "); } ! if (orientation == LANDSCAPE) ! { ! m.print (height); m.append (" "); ! m.print (width); m.append (" 0 () ()"); ! } ! else ! { ! m.print (width); m.append (" "); ! m.print (height); m.append (" 0 () ()"); ! } head.append (m); // windows gs goes crazy if I uncomment this. *************** *** 330,334 **** currentPage++; char buff[128]; ! sprintf (buff, "\n%%%%Page: %u %u\nsave\n", pages, currentPage); writeString (buff); } --- 356,378 ---- currentPage++; char buff[128]; ! ! switch (orientation) ! { ! case LANDSCAPE: ! ! sprintf (buff, "\n%%%%Page: %u %u\nsave\n90 rotate\n0 -%d.000 translate\n", pages, currentPage, height); ! ! break; ! ! case PORTRAIT: ! default: ! ! sprintf (buff, "\n%%%%Page: %u %u\nsave\n", pages, currentPage); ! ! break; ! } ! ! ! writeString (buff); } *** yudit-2.9.0/uniprint/Main.cpp- 2007-12-12 22:12:15.000000000 +0900 --- yudit-2.9.0/uniprint/Main.cpp 2008-06-15 14:48:23.000000000 +0900 *************** *** 114,117 **** --- 114,121 ---- orient = SPrinter::LANDSCAPE; } + else if (strcmp ("-landscape", argv[i])==0) + { + orient = SPrinter::LANDSCAPE; + } else if (strcmp ("-printer", argv[i])==0 && i