r16566 by jghali - #9385 : clip page content to bleed box when exporting pdf
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 10 14:57:01 CEST 2011
Author: jghali
Date: Sun Apr 10 12:57:01 2011
New Revision: 16566
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16566
Log:
#9385 : clip page content to bleed box when exporting pdf
Modified:
trunk/Scribus/scribus/pdflib_core.cpp
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16566&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sun Apr 10 12:57:01 2011
@@ -3126,9 +3126,11 @@
ll.isPrintable = false;
if (Options.UseLPI)
PutPage("/"+HTName+" gs\n");
- double bleedRight = 0.0;
- double bleedLeft = 0.0;
- double markOffs = 0.0;
+ double bleedRight = 0.0;
+ double bleedLeft = 0.0;
+ double bleedBottom = 0.0;
+ double bleedTop = 0.0;
+ double markOffs = 0.0;
bleedDisplacementX = 0.0;
bleedDisplacementY = 0.0;
PutPage("q\n"); // Save
@@ -3137,11 +3139,18 @@
// #8773 - incorrect page position if MPageNam.isEmpty()
/*if (!pag->MPageNam.isEmpty())
{*/
- getBleeds(ActPageP, bleedLeft, bleedRight);
+ getBleeds(ActPageP, bleedLeft, bleedRight, bleedBottom, bleedTop);
PutPage("1 0 0 1 "+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.Bottom+markOffs)+" cm\n");
bleedDisplacementX = bleedLeft+markOffs;
bleedDisplacementY = Options.bleeds.Bottom+markOffs;
/*}*/
+ //#9385 : clip to BleedBox
+ if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
+ {
+ double bbWidth = ActPageP->width() + bleedLeft + bleedRight;
+ double bbHeight = ActPageP->height() + bleedBottom + bleedTop;
+ PutPage( QString("%1 %2 %3 %4 re W n\n").arg(FToStr(-bleedLeft)).arg(FToStr(-bleedBottom)).arg(FToStr(bbWidth)).arg(FToStr(bbHeight)) );
+ }
if ( (Options.MirrorH) && (!pag->MPageNam.isEmpty()) )
PutPage("-1 0 0 1 "+FToStr(ActPageP->width())+" 0 cm\n");
if ( (Options.MirrorV) && (!pag->MPageNam.isEmpty()) )
More information about the scribus-commit
mailing list