r21504 by jghali - When writing Postscript, clip page to bleeds

scribus-commit scribus-commit at lists.scribus.net
Fri Nov 11 09:04:55 UTC 2016


Author: jghali
Date: Fri Nov 11 09:04:54 2016
New Revision: 21504

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21504
Log:
When writing Postscript, clip page to bleeds

Modified:
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21504&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Fri Nov 11 09:04:54 2016
@@ -733,8 +733,19 @@
 	if (pg->orientation() == 1 && psExport)
 		PutStream("90 rotate 0 "+IToStr(qRound(maxBoxY))+" neg translate\n");
   	PutStream("/DeviceCMYK setcolorspace\n");
+	// Clip to bleeds
+	QString clipStr;
+	double bbWidth  = pg->width()  + bleedLeft + bleedRight;
+	double bbHeight = pg->height() + Options.bleeds.bottom() + Options.bleeds.top();
+	clipStr += ToStr(markOffs) + " " + ToStr(markOffs) + " m\n";
+	clipStr += ToStr(markOffs + bbWidth) + " " + ToStr(markOffs) + " li\n";
+	clipStr += ToStr(markOffs + bbWidth) + " " + ToStr(markOffs + bbHeight) + " li\n";
+	clipStr += ToStr(markOffs) + " " + ToStr(markOffs + bbHeight) + " li cl clip newpath\n";
+	PutStream(clipStr);
+	// Move to page origin
 	PutStream(ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.bottom()+markOffs)+" tr\n");
 	ActPage = pg;
+	// Clip to margins if requested
 	if (Clipping)
 	{
 		PDev = ToStr(Ma->left()) + " " + ToStr(Ma->bottom()) + " m\n";




More information about the scribus-commit mailing list