r23564 by jghali - Fix some lansdcape printing issues

scribus-commit scribus-commit at lists.scribus.net
Wed Apr 8 17:26:25 UTC 2020


Author: jghali
Date: Wed Apr  8 17:26:25 2020
New Revision: 23564

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23564
Log:
Fix some lansdcape printing issues

Modified:
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23564&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Wed Apr  8 17:26:25 2020
@@ -533,7 +533,7 @@
 	PutStream("%%Pages: " + IToStr(numpage) + "\n");
 
 	QString bbox, bboxH;
-	if (width < height || (m_outputFormat == OutputEPS))
+	if ((width <= height) || (m_outputFormat == OutputEPS))
 	{
 		bbox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(width)) + " " + IToStr(qRound(height)) + "\n";
 		bboxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(width) + " " + ToStr(height) + "\n";
@@ -552,7 +552,16 @@
 		PutStream("%%CMYKCustomColor: " + cmykCustomColors);
 	PutStream("%%LanguageLevel: 3\n");
 	PutStream("%%EndComments\n");
-	if (m_outputFormat == OutputEPS)
+	if ((m_outputFormat == OutputPS) && Options.setDevParam)
+	{
+		PutStream("%%BeginDefaults\n");
+		if (width <= height)
+			PutStream("%%ViewingOrientation: 1 0 0 1\n");
+		else
+			PutStream("%%ViewingOrientation: 0 1 -1 0\n");
+		PutStream("%%EndDefaults\n");
+	}
+	else if (m_outputFormat == OutputEPS)
 	{
 		PutStream("%%BeginDefaults\n");
 		PutStream("%%ViewingOrientation: 1 0 0 1\n");
@@ -789,7 +798,10 @@
 	PutStream("Scribusdict begin\n");
 	if ((m_outputFormat == OutputPS) && (Options.setDevParam))
   	{
-		PutStream("<< /PageSize [ " + ToStr(maxBoxX) + " " + ToStr(maxBoxY) + " ]\n");
+		if (pg->orientation() == 0)
+			PutStream("<< /PageSize [ " + ToStr(maxBoxX) + " " + ToStr(maxBoxY) + " ]\n");
+		else
+			PutStream("<< /PageSize [ " + ToStr(maxBoxY) + " " + ToStr(maxBoxX) + " ]\n");
 		PutStream(">> setpagedevice\n");
 	}
 	PutStream("save\n");




More information about the scribus-commit mailing list