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

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


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

Changeset: 
M  /trunk/Scribus/scribus/pslib.cpp

Diffs:
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(revision 14958)
+++ scribus/pslib.cpp	(revision 14959)
@@ -427,8 +427,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);
@@ -625,12 +634,18 @@
 	else
 	{
 		if (pg->orientation() == 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))
   	{
@@ -638,6 +653,8 @@
 		PutStream(">> setpagedevice\n");
 	}
 	PutStream("save\n");
+	if(pg->orientation() == 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