r14958 by fschmid - Fixed Bug #9006: PS printer output DSC incorrect/contradictory

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 10 23:10:21 CEST 2010


Revision: 14958
Author: fschmid
Date: 2010-04-10T21:01:51.344721Z
Commit message: Fixed Bug #9006: PS printer output DSC incorrect/contradictory

Changeset: 
M  /branches/Version135/Scribus/scribus/pslib.cpp

Diffs:
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(revision 14957)
+++ scribus/pslib.cpp	(revision 14958)
@@ -429,8 +429,17 @@
 	PutStream("%%Title: " + Titel + "\n");
 	PutStream("%%Creator: " + Creator + "\n");
 	PutStream("%%Pages: " + IToStr(numpage) + "\n");
-	BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
-	BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
+	if(breite<hoehe)
+	{
+		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
+		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
+	}
+	else
+	{
+		
+		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(hoehe)) + " " + IToStr(qRound(breite)) + "\n";
+		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(hoehe) + " " + ToStr(breite) + "\n";
+	}
  // 	if (!Art)
 //	{
 		PutStream(BBox);
@@ -623,16 +632,22 @@
 			PutStream("Portrait\n");
 		else
 			PutStream("Landscape\n");
-	}
+	}	
 	else
 	{
 		if (pg->PageOri == 0)
+		{
 			PutStream("Portrait\n");
+			PutStream("%%PageBoundingBox: 0 0 "+IToStr(qRound(maxBoxX))+" "+IToStr(qRound(maxBoxY))+"\n");
+			PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs*2.0)+"\n");
+		}
 		else
+		{
 			PutStream("Landscape\n");
+			PutStream("%%PageBoundingBox: 0 0 "+IToStr(qRound(maxBoxY))+" "+IToStr(qRound(maxBoxX))+"\n");
+			PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs*2.0)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+"\n");
+		}
 	}
-	PutStream("%%PageBoundingBox: 0 0 "+IToStr(qRound(maxBoxX))+" "+IToStr(qRound(maxBoxY))+"\n");
-	PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs*2.0)+"\n");
 	PutStream("Scribusdict begin\n");
 	if ((Art) && (Options.setDevParam))
   	{
@@ -640,6 +655,8 @@
 		PutStream(">> setpagedevice\n");
 	}
 	PutStream("save\n");
+	if(pg->PageOri == 1)
+		PutStream("90 rotate 0 "+IToStr(qRound(maxBoxY))+" neg translate\n");
   	PutStream("/DeviceCMYK setcolorspace\n");
 	PutStream(ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" tr\n");
 	ActPage = pg;




More information about the scribus-commit mailing list