View Issue Details

IDProjectCategoryView StatusLast Update
0007793ScribusPDFpublic2012-04-29 10:54
ReporterBAlpha Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Platformi686OSFedora LinuxOS Version10
Product Version1.3.5svn 
Target Version1.5.0Fixed in Version1.5.0svn 
Summary0007793: Make crop mark length user-settable
DescriptionIt would be nice to have a way to manually set the length of crop (and maybe other) marks on export, possibly also allowing negative values (such that the marks are inside the bleed area instead of outside, where the latter adds to the page size, which may be undesirable).
TagsNo tags attached.
Patch

Activities

jghali

2009-02-14 12:52

administrator   ~0021139

Yep. However i'm not sure *at all* we should allow negative values as having crop marks in the bleed area may cause crop marks to be viewable after trimming.

BAlpha

2009-02-14 15:33

reporter   ~0021140

True, but helpful when you want to come as close as possible to the original format while still having bleed when proofing on non-oversized paper. That's probably why InDesign does exactly that when printing directly.

louisdesjardins

2012-03-12 19:11

developer   ~0027791

I agree that negative values can be useful.

I second this RFE !

Chelen

2012-03-21 18:12

reporter  

cropmark.diff (42,209 bytes)   
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(révision 17391)
+++ scribus/pdflib_core.cpp	(copie de travail)
@@ -2748,31 +2748,31 @@
 		{
 		// Bottom Left
 			PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" 20 l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Left
 			PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Bottom Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" 0 m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+                        PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+ 			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		}
 		if (Options.bleedMarks)
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp	(révision 17391)
+++ scribus/prefsmanager.cpp	(copie de travail)
@@ -455,6 +455,7 @@
 	appPrefs.pdfPrefs.bleeds.Bottom = 0;
 	appPrefs.pdfPrefs.useDocBleeds = true;
 	appPrefs.pdfPrefs.cropMarks = false;
+        appPrefs.pdfPrefs.cropMarkSize = 20;
 	appPrefs.pdfPrefs.bleedMarks = false;
 	appPrefs.pdfPrefs.registrationMarks = false;
 	appPrefs.pdfPrefs.colorMarks = false;
@@ -1741,6 +1742,7 @@
 	pdf.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Bottom));
 	pdf.setAttribute("UseDocBleeds", static_cast<int>(appPrefs.pdfPrefs.useDocBleeds));
 	pdf.setAttribute("CropMarks", static_cast<int>(appPrefs.pdfPrefs.cropMarks));
+        pdf.setAttribute("CropMarkSize", appPrefs.pdfPrefs.cropMarkSize);
 	pdf.setAttribute("BleedMarks", static_cast<int>(appPrefs.pdfPrefs.bleedMarks));
 	pdf.setAttribute("RegistrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
 	pdf.setAttribute("ColorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
@@ -2476,6 +2478,7 @@
 			appPrefs.pdfPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
 			appPrefs.pdfPrefs.useDocBleeds = static_cast<bool>(dc.attribute("UseDocBleeds", "1").toInt());
 			appPrefs.pdfPrefs.cropMarks = static_cast<bool>(dc.attribute("CropMarks", "0").toInt());
+                        appPrefs.pdfPrefs.cropMarkSize = ScCLocale::toDoubleC(dc.attribute("CropMarkSize"), 20.0);
 			appPrefs.pdfPrefs.bleedMarks = static_cast<bool>(dc.attribute("BleedMarks", "0").toInt());
 			appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("RegistrationMarks", "0").toInt());
 			appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("ColorMarks", "0").toInt());
Index: scribus/scpageoutput.h
===================================================================
--- scribus/scpageoutput.h	(révision 17391)
+++ scribus/scpageoutput.h	(copie de travail)
@@ -42,6 +42,7 @@
 	double BleedLeft;
 	double BleedRight;
 	double BleedBottom;
+        double cropMarkSize;
 	bool   cropMarks;
 	bool   bleedMarks;
 	bool   registrationMarks;
@@ -88,7 +89,7 @@
 
 	virtual void drawArrow(ScPainterExBase* painter, PageItem* item, QTransform &arrowTrans, int arrowIndex);
 	virtual void drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options );
-	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset );
+	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize);
 	virtual void drawRegistrationCross( ScPainterExBase* painter );
 
 	ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);
Index: scribus/scribusstructs.h
===================================================================
--- scribus/scribusstructs.h	(révision 17391)
+++ scribus/scribusstructs.h	(copie de travail)
@@ -225,6 +225,7 @@
 	bool setDevParam;
 	bool useDocBleeds;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/scpageoutput.cpp
===================================================================
--- scribus/scpageoutput.cpp	(révision 17391)
+++ scribus/scpageoutput.cpp	(copie de travail)
@@ -44,6 +44,7 @@
 	BleedRight = 0.0;
 	BleedBottom = 0.0;
 	cropMarks = false;
+        cropMarkSize = 20.0;
 	bleedMarks = false;
 	registrationMarks = false;
 	colorMarks = false;
@@ -58,6 +59,7 @@
 	BleedRight = opt.bleeds.Right;
 	BleedBottom = opt.bleeds.Bottom;
 	cropMarks = opt.cropMarks;
+        cropMarkSize = opt.cropMarkSize;
 	bleedMarks = opt.bleedMarks;
 	registrationMarks = opt.registrationMarks;
 	colorMarks = opt.colorMarks;
@@ -1943,14 +1945,14 @@
 		FPoint start, end;
 		double left = offsetX, right = offsetX + width;
 		double bottom = offsetY + height, top = offsetY;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , options.cropMarkSize);
 	}
 	if (options.bleedMarks)
 	{
 		FPoint start, end;
 		double left = offsetX - bleedLeft, right = offsetX + width + bleedRight;
 		double bottom = offsetY + height + bleedBottom, top = offsetY - bleedTop;;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , 20.0);
 	}
 	if (options.registrationMarks)
 	{
@@ -2032,7 +2034,7 @@
 	painter->restore();
 }
 
-void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset )
+void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize)
 {
 	FPoint start, end;
 	double left   = box.left(), right = box.right();
@@ -2041,31 +2043,31 @@
 	double bleedBottom = bleedBox.bottom(), bleedTop = bleedBox.top();
 	// Top Left
 	start.setXY( bleedLeft - offset, top );
-	end.setXY  ( bleedLeft - offset - 20, top );
+	end.setXY  ( bleedLeft - offset - markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedTop - offset );
-	end.setXY  ( left, bleedTop - offset - 20);
+	end.setXY  ( left, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Top Right
 	start.setXY( bleedRight + offset, top );
-	end.setXY  ( bleedRight + offset + 20, top );
+	end.setXY  ( bleedRight + offset + markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedTop - offset );
-	end.setXY  ( right, bleedTop - offset - 20);
+	end.setXY  ( right, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Bottom Left
 	start.setXY( bleedLeft - offset, bottom );
-	end.setXY  ( bleedLeft - offset - 20, bottom  );
+	end.setXY  ( bleedLeft - offset - markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedBottom + offset );
-	end.setXY  ( left, bleedBottom + offset + 20);
+	end.setXY  ( left, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 	// Bottom Right
 	start.setXY( bleedRight + offset, bottom );
-	end.setXY  ( bleedRight + offset + 20, bottom  );
+	end.setXY  ( bleedRight + offset + markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedBottom + offset );
-	end.setXY  ( right, bleedBottom + offset + 20);
+	end.setXY  ( right, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 }
 
Index: scribus/pdfoptions.h
===================================================================
--- scribus/pdfoptions.h	(révision 17391)
+++ scribus/pdfoptions.h	(copie de travail)
@@ -149,6 +149,7 @@
 	bool hideMenuBar;
 	bool fitWindow;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp	(révision 17391)
+++ scribus/ui/prefs_pdfexport.cpp	(copie de travail)
@@ -85,6 +85,7 @@
 	clipToPrinterMarginsCheckBox->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab
 	printCropMarksCheckBox->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        printCropMarkSizeSpinBox->setToolTip( "<qt>" + tr( "Length of crop marks" ) + "</qt>" );
 	printBleedMarksCheckBox->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	printRegistrationMarksCheckBox->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	printColorBarsCheckBox->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -548,7 +549,9 @@
 		useDocumentBleedsCheckBox->hide();
 
 	registrationMarkOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
-	printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
+        printCropMarkSizeSpinBox->setValue(prefsData->pdfPrefs.cropMarkSize);
+        printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
+        printCropMarkSizeSpinBox->setEnabled(prefsData->pdfPrefs.cropMarks);
 	printBleedMarksCheckBox->setChecked(prefsData->pdfPrefs.bleedMarks);
 	printRegistrationMarksCheckBox->setChecked(prefsData->pdfPrefs.registrationMarks);
 	printColorBarsCheckBox->setChecked(prefsData->pdfPrefs.colorMarks);
@@ -674,6 +677,7 @@
 	prefsData->pdfPrefs.UseSpotColors = !convertSpotsToProcessCheckBox->isChecked();
 	prefsData->pdfPrefs.doMultiFile = false;
 	prefsData->pdfPrefs.cropMarks  = printCropMarksCheckBox->isChecked();
+        prefsData->pdfPrefs.cropMarkSize = printCropMarkSizeSpinBox->value();
 	prefsData->pdfPrefs.bleedMarks = printBleedMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.registrationMarks = printRegistrationMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.colorMarks = printColorBarsCheckBox->isChecked();
Index: scribus/ui/tabpdfoptions.h
===================================================================
--- scribus/ui/tabpdfoptions.h	(révision 17391)
+++ scribus/ui/tabpdfoptions.h	(copie de travail)
@@ -119,6 +119,7 @@
 
 public slots:
 	void doDocBleeds();
+        void doCropMark();
 	void ToggleEncr();
 	void EnablePDFX(int a);
 	void DoDownsample();
@@ -204,6 +205,7 @@
 	QCheckBox* colorMarks;
 	QCheckBox* docInfoMarks;
 	ScrSpinBox* markOffset;
+        ScrSpinBox* cropMarkSize;
 	QGroupBox* CBox;
 	QGridLayout* CBoxLayout;
 	QGroupBox* ColorGroup;
Index: scribus/ui/prefs_printerbase.ui
===================================================================
--- scribus/ui/prefs_printerbase.ui	(révision 17391)
+++ scribus/ui/prefs_printerbase.ui	(copie de travail)
@@ -451,11 +451,46 @@
         </widget>
        </item>
        <item>
-        <widget class="QCheckBox" name="cropMarksCheckBox">
-         <property name="text">
-          <string>Crop Marks</string>
-         </property>
-        </widget>
+        <layout class="QHBoxLayout" name="horizontalLayout_10">
+         <property name="topMargin">
+          <number>0</number>
+         </property><item>
+          <widget class="QCheckBox" name="cropMarksCheckBox">
+           <property name="text">
+            <string>Crop Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="cropMarkSizeSpinBox">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="value">
+            <number>20</number>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_5">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
        </item>
        <item>
         <widget class="QCheckBox" name="bleedMarksCheckBox">
@@ -594,5 +629,22 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>cropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>55</x>
+     <y>485</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>128</x>
+     <y>485</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
Index: scribus/ui/printdialogbase.ui
===================================================================
--- scribus/ui/printdialogbase.ui	(révision 17391)
+++ scribus/ui/printdialogbase.ui	(copie de travail)
@@ -437,17 +437,35 @@
        <string>Marks</string>
       </attribute>
       <layout class="QGridLayout">
-       <item row="0" column="0">
-        <widget class="QCheckBox" name="cropMarks">
+       <item row="6" column="1">
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QLabel" name="MarkTxt1">
+           <property name="text">
+            <string>Offset:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="markOffset">
+           <property name="toolTip">
+            <string>Indicate the distance offset for the registration marks</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="6" column="0">
+        <widget class="QCheckBox" name="colorMarks">
          <property name="toolTip">
-          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
+          <string>Add color calibration bars</string>
          </property>
          <property name="text">
-          <string>Crop Marks</string>
+          <string>Color Bars</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="1">
+       <item row="5" column="1">
         <widget class="QCheckBox" name="registrationMarks">
          <property name="toolTip">
           <string>Add registration marks which are added to each separation</string>
@@ -457,7 +475,7 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
+       <item row="5" column="0">
         <widget class="QCheckBox" name="bleedMarks">
          <property name="toolTip">
           <string>This creates bleed marks which are indicated by  _ . _ and show the bleed limit</string>
@@ -467,36 +485,18 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="1">
-        <widget class="QCheckBox" name="colorMarks">
+       <item row="2" column="0">
+        <widget class="QCheckBox" name="cropMarks">
          <property name="toolTip">
-          <string>Add color calibration bars</string>
+          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
          </property>
          <property name="text">
-          <string>Color Bars</string>
+          <string>Crop Marks</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="0">
-        <layout class="QHBoxLayout">
-         <item>
-          <widget class="QLabel" name="MarkTxt1">
-           <property name="text">
-            <string>Offset:</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="ScrSpinBox" name="markOffset">
-           <property name="toolTip">
-            <string>Indicate the distance offset for the registration marks</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="2" column="1">
-        <spacer>
+       <item row="6" column="2">
+        <spacer name="horizontalSpacer">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
@@ -508,6 +508,22 @@
          </property>
         </spacer>
        </item>
+       <item row="2" column="1">
+        <widget class="ScrSpinBox" name="cropMarkSize">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="minimum">
+          <number>1</number>
+         </property>
+         <property name="maximum">
+          <number>100</number>
+         </property>
+         <property name="value">
+          <number>20</number>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_4">
@@ -707,5 +723,21 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>cropMarks</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSize</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>58</x>
+     <y>358</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>358</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
Index: scribus/ui/printdialog.cpp
===================================================================
--- scribus/ui/printdialog.cpp	(révision 17391)
+++ scribus/ui/printdialog.cpp	(copie de travail)
@@ -409,6 +409,7 @@
 	m_doc->Print_Options.bleeds.Right  = BleedRight->value() / m_doc->unitRatio();
 	m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
 	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
+        m_doc->Print_Options.cropMarkSize = cropMarkSize->value();
 	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
 	m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
 	m_doc->Print_Options.registrationMarks = registrationMarks->isChecked();
@@ -466,6 +467,7 @@
 	options.useDocBleeds  = true;
 	options.bleeds=*m_doc->bleeds();
 	options.markOffset = prefs->getDouble("markOffset",0.0);
+        options.cropMarkSize = prefs->getDouble("cropMarkSize",20.0);
 	options.cropMarks  = prefs->getBool("cropMarks", false);
 	options.bleedMarks = prefs->getBool("bleedMarks", false);
 	options.registrationMarks = prefs->getBool("registrationMarks", false);
@@ -546,7 +548,9 @@
 	BleedRight->setEnabled(!docBleeds->isChecked());
 	BleedLeft->setEnabled(!docBleeds->isChecked());
 	markOffset->setValue(m_doc->Print_Options.markOffset*unitRatio);
+        cropMarkSize->setValue(m_doc->Print_Options.cropMarkSize);
 	cropMarks->setChecked(m_doc->Print_Options.cropMarks);
+        cropMarkSize->setEnabled(m_doc->Print_Options.cropMarks);
 	bleedMarks->setChecked(m_doc->Print_Options.bleedMarks);
 	registrationMarks->setChecked(m_doc->Print_Options.registrationMarks);
 	colorMarks->setChecked(m_doc->Print_Options.colorMarks);
Index: scribus/ui/pdfopts.cpp
===================================================================
--- scribus/ui/pdfopts.cpp	(révision 17391)
+++ scribus/ui/pdfopts.cpp	(copie de travail)
@@ -272,6 +272,7 @@
 		Opts.bleeds.Bottom = Options->BleedBottom->value()/docUnitRatio;
 	}
 	Opts.markOffset = Options->markOffset->value()/docUnitRatio;
+        Opts.cropMarkSize = Options->cropMarkSize->value();
 	Opts.cropMarks = Options->cropMarks->isChecked();
 	Opts.bleedMarks = Options->bleedMarks->isChecked();
 	Opts.registrationMarks = Options->registrationMarks->isChecked();
Index: scribus/ui/preview.cpp
===================================================================
--- scribus/ui/preview.cpp	(révision 17391)
+++ scribus/ui/preview.cpp	(copie de travail)
@@ -599,6 +599,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
@@ -711,6 +712,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
Index: scribus/ui/tabpdfoptions.cpp
===================================================================
--- scribus/ui/tabpdfoptions.cpp	(révision 17391)
+++ scribus/ui/tabpdfoptions.cpp	(copie de travail)
@@ -800,14 +800,18 @@
 	MarkGroupLayout->setSpacing( 5 );
 	MarkGroupLayout->setMargin( 10 );
 	MarkGroupLayout->setAlignment( Qt::AlignTop );
-	cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( cropMarks, 0, 0 );
+        colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
+        MarkGroupLayout->addWidget( colorMarks, 0, 0 );
 	bleedMarks = new QCheckBox( tr( "Bleed Marks" ), MarkGroup );
 	MarkGroupLayout->addWidget( bleedMarks, 1, 0 );
 	registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
-	colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
-	MarkGroupLayout->addWidget( colorMarks, 0, 1, 1, 2 );
+        MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
+        cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
+        MarkGroupLayout->addWidget( cropMarks, 0, 1 );
+        cropMarkSize = new ScrSpinBox( MarkGroup, unitIndex );
+        MarkGroupLayout->addWidget( cropMarkSize, 0, 2 );
+        cropMarkSize->setMinimum(1);
+        cropMarkSize->setMaximum(100);
 	docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup );
 	MarkGroupLayout->addWidget( docInfoMarks, 1, 1, 1, 2 );
 	MarkTxt1 = new QLabel( MarkGroup );
@@ -908,6 +912,7 @@
 		connect(InfoString, SIGNAL(textChanged(const QString &)), this, SLOT(checkInfo()));
 		connect(InfoString, SIGNAL(editingFinished()), this, SLOT(checkInfo()));
 		connect(docBleeds, SIGNAL(clicked()), this, SLOT(doDocBleeds()));
+                connect(cropMarks, SIGNAL(clicked()), this, SLOT(doCropMark()));
 		EmbedFonts->setToolTip( "<qt>" + tr( "Embed fonts into the PDF. Embedding the fonts will preserve the layout and appearance of your document." ) + "</qt>");
 		CheckBox10->setToolTip( "<qt>" + tr( "Enables presentation effects when using Adobe&#174; Reader&#174; and other PDF viewers which support this in full screen mode." ) + "</qt>");
 		PagePrev->setToolTip( "<qt>" + tr( "Show page previews of each page listed above." ) + "</qt>");
@@ -992,6 +997,7 @@
 	ClipMarg->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab 
 	cropMarks->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        cropMarkSize->setToolTip( "<qt>" + tr( "Indicate the size of crops'marks" ) + "</qt>" );
 	bleedMarks->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	registrationMarks->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	colorMarks->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -1381,7 +1387,9 @@
 		doDocBleeds();
 	}
 	markOffset->setValue(Opts.markOffset*unitRatio);
+        cropMarkSize->setValue(Opts.cropMarkSize);
 	cropMarks->setChecked(Opts.cropMarks);
+        doCropMark();
 	bleedMarks->setChecked(Opts.bleedMarks);
 	registrationMarks->setChecked(Opts.registrationMarks);
 	colorMarks->setChecked(Opts.colorMarks);
@@ -1459,6 +1467,7 @@
 	pdfOptions.UseSpotColors = !useSpot->isChecked();
 	pdfOptions.doMultiFile = false;
 	pdfOptions.cropMarks  = cropMarks->isChecked();
+        pdfOptions.cropMarkSize = cropMarkSize->value();
 	pdfOptions.bleedMarks = bleedMarks->isChecked();
 	pdfOptions.registrationMarks = registrationMarks->isChecked();
 	pdfOptions.colorMarks = colorMarks->isChecked();
@@ -1563,6 +1572,11 @@
 		BleedLeft->setEnabled(true);
 	}
 }
+ 
+void TabPDFOptions::doCropMark()
+{
+        cropMarkSize->setEnabled(cropMarks->isChecked());
+}
 
 void TabPDFOptions::checkInfo()
 {
Index: scribus/ui/prefs_printer.cpp
===================================================================
--- scribus/ui/prefs_printer.cpp	(révision 17391)
+++ scribus/ui/prefs_printer.cpp	(copie de travail)
@@ -91,7 +91,9 @@
 			   prefs->getDouble("BleedLeft",0.0)*unitRatio);
 	bleedsWidget->setup(bleeds, 0, 0, false, false);
 	markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio);
-	bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarkSizeSpinBox->setValue(prefs->getDouble("cropMarkSize",20.0));
+        cropMarkSizeSpinBox->setEnabled(prefs->getBool("cropMarks", false));
 	bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
 	registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
 	colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
@@ -128,6 +130,7 @@
 	prefs->set("BleedLeft", bleeds.Left / unitRatio);
 	prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
 	prefs->set("cropMarks", cropMarksCheckBox->isChecked());
+        prefs->set("cropMarkSize", cropMarkSizeSpinBox->value());
 	prefs->set("bleedMarks", bleedMarksCheckBox->isChecked());
 	prefs->set("registrationMarks", registrationMarksCheckBox->isChecked());
 	prefs->set("colorMarks", colorBarsCheckBox->isChecked());
Index: scribus/ui/prefs_pdfexportbase.ui
===================================================================
--- scribus/ui/prefs_pdfexportbase.ui	(révision 17391)
+++ scribus/ui/prefs_pdfexportbase.ui	(copie de travail)
@@ -261,8 +261,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>456</height>
+            <width>317</width>
+            <height>409</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_19">
@@ -685,8 +685,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>638</height>
+            <width>240</width>
+            <height>541</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_8">
@@ -1012,8 +1012,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>470</height>
+            <width>624</width>
+            <height>446</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_18">
@@ -1039,7 +1039,24 @@
            </item>
            <item>
             <layout class="QFormLayout" name="formLayout_7">
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::ExpandingFieldsGrow</enum>
+             </property>
+             <item row="2" column="0" colspan="2">
+              <widget class="QCheckBox" name="printBleedMarksCheckBox">
+               <property name="text">
+                <string>Bleed Marks</string>
+               </property>
+              </widget>
+             </item>
              <item row="3" column="0" colspan="2">
+              <widget class="QCheckBox" name="printColorBarsCheckBox">
+               <property name="text">
+                <string>Color Bars</string>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="0" colspan="2">
               <widget class="QCheckBox" name="printPageInfoCheckBox">
                <property name="text">
                 <string>Page Information</string>
@@ -1053,36 +1070,48 @@
                </property>
               </widget>
              </item>
-             <item row="5" column="1">
-              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
-             </item>
-             <item row="5" column="0">
+             <item row="6" column="0">
               <widget class="QLabel" name="label_17">
                <property name="text">
                 <string>Registration Mark Offset:</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="0" colspan="2">
-              <widget class="QCheckBox" name="printCropMarksCheckBox">
-               <property name="text">
-                <string>Crop Marks</string>
-               </property>
-              </widget>
+             <item row="6" column="1">
+              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
              </item>
-             <item row="1" column="0" colspan="2">
-              <widget class="QCheckBox" name="printBleedMarksCheckBox">
-               <property name="text">
-                <string>Bleed Marks</string>
+             <item row="1" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_13">
+               <property name="rightMargin">
+                <number>0</number>
                </property>
-              </widget>
-             </item>
-             <item row="2" column="0" colspan="2">
-              <widget class="QCheckBox" name="printColorBarsCheckBox">
-               <property name="text">
-                <string>Color Bars</string>
+               <property name="bottomMargin">
+                <number>0</number>
                </property>
-              </widget>
+               <item>
+                <widget class="QCheckBox" name="printCropMarksCheckBox">
+                 <property name="text">
+                  <string>Crop Marks</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="ScrSpinBox" name="printCropMarkSizeSpinBox">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                 <property name="value">
+                  <number>20</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
              </item>
             </layout>
            </item>
@@ -1783,7 +1812,24 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>printCropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>printCropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>134</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
  <buttongroups>
   <buttongroup name="rangeButtonGroup"/>
  </buttongroups>
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(révision 17391)
+++ scribus/scribus.cpp	(copie de travail)
@@ -7896,6 +7896,7 @@
 	options.setDevParam = false;
 	options.doClip = true;
 	options.cropMarks = false;
+        options.cropMarkSize = 20.0;
 	options.bleedMarks = false;
 	options.registrationMarks = false;
 	options.colorMarks = false;
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(copie de travail)
@@ -1000,6 +1000,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -1059,6 +1060,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(copie de travail)
@@ -2853,6 +2853,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -2940,6 +2941,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(copie de travail)
@@ -627,6 +627,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -686,6 +687,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(copie de travail)
@@ -1509,6 +1509,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -1595,6 +1596,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(révision 17391)
+++ scribus/pslib.cpp	(copie de travail)
@@ -670,31 +670,31 @@
 		{
 		// Bottom Left
 			PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" 20 li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" " + ToStr(Options.cropMarkSize) + " li\n");
 			PutStream("st\n");
 		// Top Left
 			PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Bottom Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Top Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		}
 		if (Options.bleedMarks)
cropmark.diff (42,209 bytes)   

Chelen

2012-03-21 18:16

reporter   ~0027841

I tried to do a patch to change the length of crop marks, it is what you would have isn't it?

With pdf, I can choose the length of crop but I have not test with printer as I do not have one here.

ps: It is my first patch so, if you have comment or something to improve on this patch, just ask.

jghali

2012-03-24 12:04

administrator   ~0027855

Last edited: 2012-03-24 12:31

I tested your patch. There are a few things that do not work :

- spinbox in pdf export dialog do not always use proper unit
- when exporting pdf of a document with non zero bleed, mark offset is not always correctly applied. Try with 5 mm bleed, crop marks + bleed marks enabled, 3mm crop size and 0mm offset.

Also some implementation recommandations :
- crop mark size should apply to bleed mark size
- no need to enable/disable crop mark size widget

[Edit] I will fix item 3 and 4 myself.

Chelen

2012-03-24 18:35

reporter   ~0027857

Here is the news patch which use proper unit correctly.
About the second issue, I don't understand. I tried with these values but it looks good. I have added my pdf if you want to see my result.

About other recommendations, I wonder if I should apply this value to bleed mark but I didn't as I was not sure you want this in this patch. It is a good idea I think, thanks for doing this.

I add the enable/disable widget because this value is useless if we don't need mark crop. And it is a way to inform the user that this spinBox is related to cropMark even there is a tooltip

I wait more information to fix the second issue

Chelen

2012-03-24 18:35

reporter  

Document-1.pdf (2,013 bytes)

Chelen

2012-03-24 18:36

reporter  

croplength.diff (42,156 bytes)   
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(révision 17391)
+++ scribus/pdflib_core.cpp	(copie de travail)
@@ -2748,31 +2748,31 @@
 		{
 		// Bottom Left
 			PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" 20 l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Left
 			PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Bottom Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" 0 m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+                        PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+ 			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		}
 		if (Options.bleedMarks)
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp	(révision 17391)
+++ scribus/prefsmanager.cpp	(copie de travail)
@@ -455,6 +455,7 @@
 	appPrefs.pdfPrefs.bleeds.Bottom = 0;
 	appPrefs.pdfPrefs.useDocBleeds = true;
 	appPrefs.pdfPrefs.cropMarks = false;
+        appPrefs.pdfPrefs.cropMarkSize = 20;
 	appPrefs.pdfPrefs.bleedMarks = false;
 	appPrefs.pdfPrefs.registrationMarks = false;
 	appPrefs.pdfPrefs.colorMarks = false;
@@ -1741,6 +1742,7 @@
 	pdf.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Bottom));
 	pdf.setAttribute("UseDocBleeds", static_cast<int>(appPrefs.pdfPrefs.useDocBleeds));
 	pdf.setAttribute("CropMarks", static_cast<int>(appPrefs.pdfPrefs.cropMarks));
+        pdf.setAttribute("CropMarkSize", appPrefs.pdfPrefs.cropMarkSize);
 	pdf.setAttribute("BleedMarks", static_cast<int>(appPrefs.pdfPrefs.bleedMarks));
 	pdf.setAttribute("RegistrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
 	pdf.setAttribute("ColorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
@@ -2476,6 +2478,7 @@
 			appPrefs.pdfPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
 			appPrefs.pdfPrefs.useDocBleeds = static_cast<bool>(dc.attribute("UseDocBleeds", "1").toInt());
 			appPrefs.pdfPrefs.cropMarks = static_cast<bool>(dc.attribute("CropMarks", "0").toInt());
+                        appPrefs.pdfPrefs.cropMarkSize = ScCLocale::toDoubleC(dc.attribute("CropMarkSize"), 20.0);
 			appPrefs.pdfPrefs.bleedMarks = static_cast<bool>(dc.attribute("BleedMarks", "0").toInt());
 			appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("RegistrationMarks", "0").toInt());
 			appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("ColorMarks", "0").toInt());
Index: scribus/scpageoutput.h
===================================================================
--- scribus/scpageoutput.h	(révision 17391)
+++ scribus/scpageoutput.h	(copie de travail)
@@ -42,6 +42,7 @@
 	double BleedLeft;
 	double BleedRight;
 	double BleedBottom;
+        double cropMarkSize;
 	bool   cropMarks;
 	bool   bleedMarks;
 	bool   registrationMarks;
@@ -88,7 +89,7 @@
 
 	virtual void drawArrow(ScPainterExBase* painter, PageItem* item, QTransform &arrowTrans, int arrowIndex);
 	virtual void drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options );
-	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset );
+	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize);
 	virtual void drawRegistrationCross( ScPainterExBase* painter );
 
 	ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);
Index: scribus/scribusstructs.h
===================================================================
--- scribus/scribusstructs.h	(révision 17391)
+++ scribus/scribusstructs.h	(copie de travail)
@@ -225,6 +225,7 @@
 	bool setDevParam;
 	bool useDocBleeds;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/scpageoutput.cpp
===================================================================
--- scribus/scpageoutput.cpp	(révision 17391)
+++ scribus/scpageoutput.cpp	(copie de travail)
@@ -44,6 +44,7 @@
 	BleedRight = 0.0;
 	BleedBottom = 0.0;
 	cropMarks = false;
+        cropMarkSize = 20.0;
 	bleedMarks = false;
 	registrationMarks = false;
 	colorMarks = false;
@@ -58,6 +59,7 @@
 	BleedRight = opt.bleeds.Right;
 	BleedBottom = opt.bleeds.Bottom;
 	cropMarks = opt.cropMarks;
+        cropMarkSize = opt.cropMarkSize;
 	bleedMarks = opt.bleedMarks;
 	registrationMarks = opt.registrationMarks;
 	colorMarks = opt.colorMarks;
@@ -1943,14 +1945,14 @@
 		FPoint start, end;
 		double left = offsetX, right = offsetX + width;
 		double bottom = offsetY + height, top = offsetY;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , options.cropMarkSize);
 	}
 	if (options.bleedMarks)
 	{
 		FPoint start, end;
 		double left = offsetX - bleedLeft, right = offsetX + width + bleedRight;
 		double bottom = offsetY + height + bleedBottom, top = offsetY - bleedTop;;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , 20.0);
 	}
 	if (options.registrationMarks)
 	{
@@ -2032,7 +2034,7 @@
 	painter->restore();
 }
 
-void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset )
+void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize)
 {
 	FPoint start, end;
 	double left   = box.left(), right = box.right();
@@ -2041,31 +2043,31 @@
 	double bleedBottom = bleedBox.bottom(), bleedTop = bleedBox.top();
 	// Top Left
 	start.setXY( bleedLeft - offset, top );
-	end.setXY  ( bleedLeft - offset - 20, top );
+	end.setXY  ( bleedLeft - offset - markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedTop - offset );
-	end.setXY  ( left, bleedTop - offset - 20);
+	end.setXY  ( left, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Top Right
 	start.setXY( bleedRight + offset, top );
-	end.setXY  ( bleedRight + offset + 20, top );
+	end.setXY  ( bleedRight + offset + markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedTop - offset );
-	end.setXY  ( right, bleedTop - offset - 20);
+	end.setXY  ( right, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Bottom Left
 	start.setXY( bleedLeft - offset, bottom );
-	end.setXY  ( bleedLeft - offset - 20, bottom  );
+	end.setXY  ( bleedLeft - offset - markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedBottom + offset );
-	end.setXY  ( left, bleedBottom + offset + 20);
+	end.setXY  ( left, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 	// Bottom Right
 	start.setXY( bleedRight + offset, bottom );
-	end.setXY  ( bleedRight + offset + 20, bottom  );
+	end.setXY  ( bleedRight + offset + markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedBottom + offset );
-	end.setXY  ( right, bleedBottom + offset + 20);
+	end.setXY  ( right, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 }
 
Index: scribus/pdfoptions.h
===================================================================
--- scribus/pdfoptions.h	(révision 17391)
+++ scribus/pdfoptions.h	(copie de travail)
@@ -149,6 +149,7 @@
 	bool hideMenuBar;
 	bool fitWindow;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp	(révision 17391)
+++ scribus/ui/prefs_pdfexport.cpp	(copie de travail)
@@ -85,6 +85,7 @@
 	clipToPrinterMarginsCheckBox->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab
 	printCropMarksCheckBox->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        printCropMarkSizeSpinBox->setToolTip( "<qt>" + tr( "Length of crop marks" ) + "</qt>" );
 	printBleedMarksCheckBox->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	printRegistrationMarksCheckBox->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	printColorBarsCheckBox->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -548,7 +549,9 @@
 		useDocumentBleedsCheckBox->hide();
 
 	registrationMarkOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
+	printCropMarkSizeSpinBox->setValue(prefsData->pdfPrefs.cropMarkSize*unitRatio);
 	printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
+	printCropMarkSizeSpinBox->setEnabled(prefsData->pdfPrefs.cropMarks);
 	printBleedMarksCheckBox->setChecked(prefsData->pdfPrefs.bleedMarks);
 	printRegistrationMarksCheckBox->setChecked(prefsData->pdfPrefs.registrationMarks);
 	printColorBarsCheckBox->setChecked(prefsData->pdfPrefs.colorMarks);
@@ -674,6 +677,7 @@
 	prefsData->pdfPrefs.UseSpotColors = !convertSpotsToProcessCheckBox->isChecked();
 	prefsData->pdfPrefs.doMultiFile = false;
 	prefsData->pdfPrefs.cropMarks  = printCropMarksCheckBox->isChecked();
+	prefsData->pdfPrefs.cropMarkSize = printCropMarkSizeSpinBox->value() / unitRatio;
 	prefsData->pdfPrefs.bleedMarks = printBleedMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.registrationMarks = printRegistrationMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.colorMarks = printColorBarsCheckBox->isChecked();
Index: scribus/ui/tabpdfoptions.h
===================================================================
--- scribus/ui/tabpdfoptions.h	(révision 17391)
+++ scribus/ui/tabpdfoptions.h	(copie de travail)
@@ -119,6 +119,7 @@
 
 public slots:
 	void doDocBleeds();
+        void doCropMark();
 	void ToggleEncr();
 	void EnablePDFX(int a);
 	void DoDownsample();
@@ -204,6 +205,7 @@
 	QCheckBox* colorMarks;
 	QCheckBox* docInfoMarks;
 	ScrSpinBox* markOffset;
+        ScrSpinBox* cropMarkSize;
 	QGroupBox* CBox;
 	QGridLayout* CBoxLayout;
 	QGroupBox* ColorGroup;
Index: scribus/ui/prefs_printerbase.ui
===================================================================
--- scribus/ui/prefs_printerbase.ui	(révision 17391)
+++ scribus/ui/prefs_printerbase.ui	(copie de travail)
@@ -451,11 +451,46 @@
         </widget>
        </item>
        <item>
-        <widget class="QCheckBox" name="cropMarksCheckBox">
-         <property name="text">
-          <string>Crop Marks</string>
-         </property>
-        </widget>
+        <layout class="QHBoxLayout" name="horizontalLayout_10">
+         <property name="topMargin">
+          <number>0</number>
+         </property><item>
+          <widget class="QCheckBox" name="cropMarksCheckBox">
+           <property name="text">
+            <string>Crop Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="cropMarkSizeSpinBox">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="value">
+            <number>20</number>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_5">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
        </item>
        <item>
         <widget class="QCheckBox" name="bleedMarksCheckBox">
@@ -594,5 +629,22 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>cropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>55</x>
+     <y>485</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>128</x>
+     <y>485</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
Index: scribus/ui/printdialogbase.ui
===================================================================
--- scribus/ui/printdialogbase.ui	(révision 17391)
+++ scribus/ui/printdialogbase.ui	(copie de travail)
@@ -437,17 +437,35 @@
        <string>Marks</string>
       </attribute>
       <layout class="QGridLayout">
-       <item row="0" column="0">
-        <widget class="QCheckBox" name="cropMarks">
+       <item row="6" column="1">
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QLabel" name="MarkTxt1">
+           <property name="text">
+            <string>Offset:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="markOffset">
+           <property name="toolTip">
+            <string>Indicate the distance offset for the registration marks</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="6" column="0">
+        <widget class="QCheckBox" name="colorMarks">
          <property name="toolTip">
-          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
+          <string>Add color calibration bars</string>
          </property>
          <property name="text">
-          <string>Crop Marks</string>
+          <string>Color Bars</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="1">
+       <item row="5" column="1">
         <widget class="QCheckBox" name="registrationMarks">
          <property name="toolTip">
           <string>Add registration marks which are added to each separation</string>
@@ -457,7 +475,7 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
+       <item row="5" column="0">
         <widget class="QCheckBox" name="bleedMarks">
          <property name="toolTip">
           <string>This creates bleed marks which are indicated by  _ . _ and show the bleed limit</string>
@@ -467,36 +485,18 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="1">
-        <widget class="QCheckBox" name="colorMarks">
+       <item row="2" column="0">
+        <widget class="QCheckBox" name="cropMarks">
          <property name="toolTip">
-          <string>Add color calibration bars</string>
+          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
          </property>
          <property name="text">
-          <string>Color Bars</string>
+          <string>Crop Marks</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="0">
-        <layout class="QHBoxLayout">
-         <item>
-          <widget class="QLabel" name="MarkTxt1">
-           <property name="text">
-            <string>Offset:</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="ScrSpinBox" name="markOffset">
-           <property name="toolTip">
-            <string>Indicate the distance offset for the registration marks</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="2" column="1">
-        <spacer>
+       <item row="6" column="2">
+        <spacer name="horizontalSpacer">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
@@ -508,6 +508,22 @@
          </property>
         </spacer>
        </item>
+       <item row="2" column="1">
+        <widget class="ScrSpinBox" name="cropMarkSize">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="minimum">
+          <number>1</number>
+         </property>
+         <property name="maximum">
+          <number>100</number>
+         </property>
+         <property name="value">
+          <number>20</number>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_4">
@@ -707,5 +723,21 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>cropMarks</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSize</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>58</x>
+     <y>358</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>358</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
Index: scribus/ui/printdialog.cpp
===================================================================
--- scribus/ui/printdialog.cpp	(révision 17391)
+++ scribus/ui/printdialog.cpp	(copie de travail)
@@ -409,6 +409,7 @@
 	m_doc->Print_Options.bleeds.Right  = BleedRight->value() / m_doc->unitRatio();
 	m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
 	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
+	m_doc->Print_Options.cropMarkSize = cropMarkSize->value() / m_doc->unitRatio();
 	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
 	m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
 	m_doc->Print_Options.registrationMarks = registrationMarks->isChecked();
@@ -466,6 +467,7 @@
 	options.useDocBleeds  = true;
 	options.bleeds=*m_doc->bleeds();
 	options.markOffset = prefs->getDouble("markOffset",0.0);
+        options.cropMarkSize = prefs->getDouble("cropMarkSize",20.0);
 	options.cropMarks  = prefs->getBool("cropMarks", false);
 	options.bleedMarks = prefs->getBool("bleedMarks", false);
 	options.registrationMarks = prefs->getBool("registrationMarks", false);
@@ -546,7 +548,9 @@
 	BleedRight->setEnabled(!docBleeds->isChecked());
 	BleedLeft->setEnabled(!docBleeds->isChecked());
 	markOffset->setValue(m_doc->Print_Options.markOffset*unitRatio);
+	cropMarkSize->setValue(m_doc->Print_Options.cropMarkSize*unitRatio);
 	cropMarks->setChecked(m_doc->Print_Options.cropMarks);
+	cropMarkSize->setEnabled(m_doc->Print_Options.cropMarks);
 	bleedMarks->setChecked(m_doc->Print_Options.bleedMarks);
 	registrationMarks->setChecked(m_doc->Print_Options.registrationMarks);
 	colorMarks->setChecked(m_doc->Print_Options.colorMarks);
Index: scribus/ui/pdfopts.cpp
===================================================================
--- scribus/ui/pdfopts.cpp	(révision 17391)
+++ scribus/ui/pdfopts.cpp	(copie de travail)
@@ -272,6 +272,7 @@
 		Opts.bleeds.Bottom = Options->BleedBottom->value()/docUnitRatio;
 	}
 	Opts.markOffset = Options->markOffset->value()/docUnitRatio;
+	Opts.cropMarkSize = Options->cropMarkSize->value()/docUnitRatio;
 	Opts.cropMarks = Options->cropMarks->isChecked();
 	Opts.bleedMarks = Options->bleedMarks->isChecked();
 	Opts.registrationMarks = Options->registrationMarks->isChecked();
Index: scribus/ui/preview.cpp
===================================================================
--- scribus/ui/preview.cpp	(révision 17391)
+++ scribus/ui/preview.cpp	(copie de travail)
@@ -599,6 +599,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
@@ -711,6 +712,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
Index: scribus/ui/tabpdfoptions.cpp
===================================================================
--- scribus/ui/tabpdfoptions.cpp	(révision 17391)
+++ scribus/ui/tabpdfoptions.cpp	(copie de travail)
@@ -800,14 +800,18 @@
 	MarkGroupLayout->setSpacing( 5 );
 	MarkGroupLayout->setMargin( 10 );
 	MarkGroupLayout->setAlignment( Qt::AlignTop );
-	cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( cropMarks, 0, 0 );
+        colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
+        MarkGroupLayout->addWidget( colorMarks, 0, 0 );
 	bleedMarks = new QCheckBox( tr( "Bleed Marks" ), MarkGroup );
 	MarkGroupLayout->addWidget( bleedMarks, 1, 0 );
 	registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
-	colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
-	MarkGroupLayout->addWidget( colorMarks, 0, 1, 1, 2 );
+        MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
+        cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
+        MarkGroupLayout->addWidget( cropMarks, 0, 1 );
+        cropMarkSize = new ScrSpinBox( MarkGroup, unitIndex );
+        MarkGroupLayout->addWidget( cropMarkSize, 0, 2 );
+        cropMarkSize->setMinimum(1);
+        cropMarkSize->setMaximum(100);
 	docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup );
 	MarkGroupLayout->addWidget( docInfoMarks, 1, 1, 1, 2 );
 	MarkTxt1 = new QLabel( MarkGroup );
@@ -908,6 +912,7 @@
 		connect(InfoString, SIGNAL(textChanged(const QString &)), this, SLOT(checkInfo()));
 		connect(InfoString, SIGNAL(editingFinished()), this, SLOT(checkInfo()));
 		connect(docBleeds, SIGNAL(clicked()), this, SLOT(doDocBleeds()));
+                connect(cropMarks, SIGNAL(clicked()), this, SLOT(doCropMark()));
 		EmbedFonts->setToolTip( "<qt>" + tr( "Embed fonts into the PDF. Embedding the fonts will preserve the layout and appearance of your document." ) + "</qt>");
 		CheckBox10->setToolTip( "<qt>" + tr( "Enables presentation effects when using Adobe&#174; Reader&#174; and other PDF viewers which support this in full screen mode." ) + "</qt>");
 		PagePrev->setToolTip( "<qt>" + tr( "Show page previews of each page listed above." ) + "</qt>");
@@ -992,6 +997,7 @@
 	ClipMarg->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab 
 	cropMarks->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        cropMarkSize->setToolTip( "<qt>" + tr( "Indicate the size of crops'marks" ) + "</qt>" );
 	bleedMarks->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	registrationMarks->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	colorMarks->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -1381,7 +1387,9 @@
 		doDocBleeds();
 	}
 	markOffset->setValue(Opts.markOffset*unitRatio);
+	cropMarkSize->setValue(Opts.cropMarkSize*unitRatio);
 	cropMarks->setChecked(Opts.cropMarks);
+	doCropMark();
 	bleedMarks->setChecked(Opts.bleedMarks);
 	registrationMarks->setChecked(Opts.registrationMarks);
 	colorMarks->setChecked(Opts.colorMarks);
@@ -1459,6 +1467,7 @@
 	pdfOptions.UseSpotColors = !useSpot->isChecked();
 	pdfOptions.doMultiFile = false;
 	pdfOptions.cropMarks  = cropMarks->isChecked();
+	pdfOptions.cropMarkSize = cropMarkSize->value() / unitRatio;
 	pdfOptions.bleedMarks = bleedMarks->isChecked();
 	pdfOptions.registrationMarks = registrationMarks->isChecked();
 	pdfOptions.colorMarks = colorMarks->isChecked();
@@ -1563,6 +1572,11 @@
 		BleedLeft->setEnabled(true);
 	}
 }
+ 
+void TabPDFOptions::doCropMark()
+{
+        cropMarkSize->setEnabled(cropMarks->isChecked());
+}
 
 void TabPDFOptions::checkInfo()
 {
Index: scribus/ui/prefs_printer.cpp
===================================================================
--- scribus/ui/prefs_printer.cpp	(révision 17391)
+++ scribus/ui/prefs_printer.cpp	(copie de travail)
@@ -91,7 +91,9 @@
 			   prefs->getDouble("BleedLeft",0.0)*unitRatio);
 	bleedsWidget->setup(bleeds, 0, 0, false, false);
 	markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio);
-	bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarkSizeSpinBox->setValue(prefs->getDouble("cropMarkSize",20.0));
+        cropMarkSizeSpinBox->setEnabled(prefs->getBool("cropMarks", false));
 	bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
 	registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
 	colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
@@ -128,6 +130,7 @@
 	prefs->set("BleedLeft", bleeds.Left / unitRatio);
 	prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
 	prefs->set("cropMarks", cropMarksCheckBox->isChecked());
+	prefs->set("cropMarkSize", cropMarkSizeSpinBox->value() / unitRatio);
 	prefs->set("bleedMarks", bleedMarksCheckBox->isChecked());
 	prefs->set("registrationMarks", registrationMarksCheckBox->isChecked());
 	prefs->set("colorMarks", colorBarsCheckBox->isChecked());
Index: scribus/ui/prefs_pdfexportbase.ui
===================================================================
--- scribus/ui/prefs_pdfexportbase.ui	(révision 17391)
+++ scribus/ui/prefs_pdfexportbase.ui	(copie de travail)
@@ -261,8 +261,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>456</height>
+            <width>317</width>
+            <height>409</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_19">
@@ -685,8 +685,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>638</height>
+            <width>240</width>
+            <height>541</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_8">
@@ -1012,8 +1012,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>470</height>
+            <width>624</width>
+            <height>446</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_18">
@@ -1039,7 +1039,24 @@
            </item>
            <item>
             <layout class="QFormLayout" name="formLayout_7">
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::ExpandingFieldsGrow</enum>
+             </property>
+             <item row="2" column="0" colspan="2">
+              <widget class="QCheckBox" name="printBleedMarksCheckBox">
+               <property name="text">
+                <string>Bleed Marks</string>
+               </property>
+              </widget>
+             </item>
              <item row="3" column="0" colspan="2">
+              <widget class="QCheckBox" name="printColorBarsCheckBox">
+               <property name="text">
+                <string>Color Bars</string>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="0" colspan="2">
               <widget class="QCheckBox" name="printPageInfoCheckBox">
                <property name="text">
                 <string>Page Information</string>
@@ -1053,36 +1070,48 @@
                </property>
               </widget>
              </item>
-             <item row="5" column="1">
-              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
-             </item>
-             <item row="5" column="0">
+             <item row="6" column="0">
               <widget class="QLabel" name="label_17">
                <property name="text">
                 <string>Registration Mark Offset:</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="0" colspan="2">
-              <widget class="QCheckBox" name="printCropMarksCheckBox">
-               <property name="text">
-                <string>Crop Marks</string>
-               </property>
-              </widget>
+             <item row="6" column="1">
+              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
              </item>
-             <item row="1" column="0" colspan="2">
-              <widget class="QCheckBox" name="printBleedMarksCheckBox">
-               <property name="text">
-                <string>Bleed Marks</string>
+             <item row="1" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_13">
+               <property name="rightMargin">
+                <number>0</number>
                </property>
-              </widget>
-             </item>
-             <item row="2" column="0" colspan="2">
-              <widget class="QCheckBox" name="printColorBarsCheckBox">
-               <property name="text">
-                <string>Color Bars</string>
+               <property name="bottomMargin">
+                <number>0</number>
                </property>
-              </widget>
+               <item>
+                <widget class="QCheckBox" name="printCropMarksCheckBox">
+                 <property name="text">
+                  <string>Crop Marks</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="ScrSpinBox" name="printCropMarkSizeSpinBox">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                 <property name="value">
+                  <number>20</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
              </item>
             </layout>
            </item>
@@ -1783,7 +1812,24 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>printCropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>printCropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>134</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
  <buttongroups>
   <buttongroup name="rangeButtonGroup"/>
  </buttongroups>
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(révision 17391)
+++ scribus/scribus.cpp	(copie de travail)
@@ -7896,6 +7896,7 @@
 	options.setDevParam = false;
 	options.doClip = true;
 	options.cropMarks = false;
+        options.cropMarkSize = 20.0;
 	options.bleedMarks = false;
 	options.registrationMarks = false;
 	options.colorMarks = false;
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(copie de travail)
@@ -1000,6 +1000,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -1059,6 +1060,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(copie de travail)
@@ -2853,6 +2853,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -2940,6 +2941,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(copie de travail)
@@ -627,6 +627,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -686,6 +687,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(copie de travail)
@@ -1509,6 +1509,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -1595,6 +1596,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(révision 17391)
+++ scribus/pslib.cpp	(copie de travail)
@@ -670,31 +670,31 @@
 		{
 		// Bottom Left
 			PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" 20 li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" " + ToStr(Options.cropMarkSize) + " li\n");
 			PutStream("st\n");
 		// Top Left
 			PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Bottom Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Top Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		}
 		if (Options.bleedMarks)
croplength.diff (42,156 bytes)   

jghali

2012-03-24 19:01

administrator   ~0027858

The sample pdf shows the issue : in our context offset means distance between mark and bleed area, the pdf would be correct if 'offset' was the distance between mark and border of page.

Tip : fixing that issue needs modifying around two lines :)

Chelen

2012-03-24 22:37

reporter   ~0027859

In fact, I tried to export pdf with scribus 1.4.1svn and it work the same than in this case. If you change bleed length, it doesn't change bleed mark position and the value is the length between crop marks and bleed marks.

In this news patch, bleeds' values are the distance between the border of the page and the mark. And, bleed marks are resized to be at this same distance.

There is an other problem but I think it is user's business, if bleed is to small, color mark and some others exceed bleed length.

Chelen

2012-03-24 22:37

reporter  

cropmarklength.diff (50,011 bytes)   
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(révision 17391)
+++ scribus/pdflib_core.cpp	(copie de travail)
@@ -2732,8 +2732,12 @@
 {
 	uint PgNr =  ActPageP->pageNr();
 	double markOffs = 0.0;
-	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
-		markOffs = 20.0 + Options.markOffset;
+	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks)){
+		if(!Options.useDocBleeds)
+			markOffs = Options.markOffset;
+		else
+			markOffs = 20.0 + Options.markOffset;
+	}
 	double bleedRight, bleedLeft;
 	getBleeds(ActPageP, bleedLeft, bleedRight);
 	double maxBoxX = ActPageP->width()+bleedLeft+bleedRight+markOffs*2.0;
@@ -2748,31 +2752,31 @@
 		{
 		// Bottom Left
 			PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" 20 l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Left
 			PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+			PutPage(FToStr(Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
 			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Bottom Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" 0 m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		// Top Right
 			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+                        PutPage(FToStr(maxBoxX-Options.cropMarkSize)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+ 			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
+                        PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-Options.cropMarkSize) +" l\n");
 			PutPage("S\n");
 		}
 		if (Options.bleedMarks)
@@ -2780,32 +2784,32 @@
 			PutPage("q\n");
 			PutPage("[3 1 1 1] 0 d\n");
 		// Bottom Left
-			PutPage("0 "+FToStr(markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs)+" l\n");
+			PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs)+" 0 m\n");
-			PutPage(FToStr(markOffs)+" 20 l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(markOffs+Options.bleeds.Bottom) +" l\n");
 			PutPage("S\n");
 		// Top Left
-			PutPage("0 "+FToStr(maxBoxY-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
+			PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+ FToStr(maxBoxY-Options.bleeds.Top-markOffs) +" l\n");
 			PutPage("S\n");
 		// Bottom Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs)+" l\n");
+			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" 0 m\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markOffs+Options.bleeds.Bottom) +" l\n");
 			PutPage("S\n");
 		// Top Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
+			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutPage(FToStr(maxBoxX-markOffs-bleedRight)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-Options.bleeds.Top-markOffs) +" l\n");
 			PutPage("S\n");
 			PutPage("Q\n");
 		}
@@ -3157,8 +3161,12 @@
 	bleedDisplacementX = 0.0;
 	bleedDisplacementY = 0.0;
 	PutPage("q\n"); // Save
-	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
-		markOffs = 20.0 + Options.markOffset;
+	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks)){
+		if(!Options.useDocBleeds)
+			markOffs = Options.markOffset;
+		else
+			markOffs = 20.0 + Options.markOffset;
+	}
 	// #8773 - incorrect page position if MPageNam.isEmpty()
 	/*if (!pag->MPageNam.isEmpty())
 	{*/
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp	(révision 17391)
+++ scribus/prefsmanager.cpp	(copie de travail)
@@ -455,6 +455,7 @@
 	appPrefs.pdfPrefs.bleeds.Bottom = 0;
 	appPrefs.pdfPrefs.useDocBleeds = true;
 	appPrefs.pdfPrefs.cropMarks = false;
+        appPrefs.pdfPrefs.cropMarkSize = 20;
 	appPrefs.pdfPrefs.bleedMarks = false;
 	appPrefs.pdfPrefs.registrationMarks = false;
 	appPrefs.pdfPrefs.colorMarks = false;
@@ -1741,6 +1742,7 @@
 	pdf.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Bottom));
 	pdf.setAttribute("UseDocBleeds", static_cast<int>(appPrefs.pdfPrefs.useDocBleeds));
 	pdf.setAttribute("CropMarks", static_cast<int>(appPrefs.pdfPrefs.cropMarks));
+        pdf.setAttribute("CropMarkSize", appPrefs.pdfPrefs.cropMarkSize);
 	pdf.setAttribute("BleedMarks", static_cast<int>(appPrefs.pdfPrefs.bleedMarks));
 	pdf.setAttribute("RegistrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
 	pdf.setAttribute("ColorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
@@ -2476,6 +2478,7 @@
 			appPrefs.pdfPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
 			appPrefs.pdfPrefs.useDocBleeds = static_cast<bool>(dc.attribute("UseDocBleeds", "1").toInt());
 			appPrefs.pdfPrefs.cropMarks = static_cast<bool>(dc.attribute("CropMarks", "0").toInt());
+                        appPrefs.pdfPrefs.cropMarkSize = ScCLocale::toDoubleC(dc.attribute("CropMarkSize"), 20.0);
 			appPrefs.pdfPrefs.bleedMarks = static_cast<bool>(dc.attribute("BleedMarks", "0").toInt());
 			appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("RegistrationMarks", "0").toInt());
 			appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("ColorMarks", "0").toInt());
Index: scribus/scpageoutput.h
===================================================================
--- scribus/scpageoutput.h	(révision 17391)
+++ scribus/scpageoutput.h	(copie de travail)
@@ -42,6 +42,7 @@
 	double BleedLeft;
 	double BleedRight;
 	double BleedBottom;
+        double cropMarkSize;
 	bool   cropMarks;
 	bool   bleedMarks;
 	bool   registrationMarks;
@@ -88,7 +89,7 @@
 
 	virtual void drawArrow(ScPainterExBase* painter, PageItem* item, QTransform &arrowTrans, int arrowIndex);
 	virtual void drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options );
-	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset );
+	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize);
 	virtual void drawRegistrationCross( ScPainterExBase* painter );
 
 	ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);
Index: scribus/scribusstructs.h
===================================================================
--- scribus/scribusstructs.h	(révision 17391)
+++ scribus/scribusstructs.h	(copie de travail)
@@ -225,6 +225,7 @@
 	bool setDevParam;
 	bool useDocBleeds;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/scpageoutput.cpp
===================================================================
--- scribus/scpageoutput.cpp	(révision 17391)
+++ scribus/scpageoutput.cpp	(copie de travail)
@@ -44,6 +44,7 @@
 	BleedRight = 0.0;
 	BleedBottom = 0.0;
 	cropMarks = false;
+        cropMarkSize = 20.0;
 	bleedMarks = false;
 	registrationMarks = false;
 	colorMarks = false;
@@ -58,6 +59,7 @@
 	BleedRight = opt.bleeds.Right;
 	BleedBottom = opt.bleeds.Bottom;
 	cropMarks = opt.cropMarks;
+        cropMarkSize = opt.cropMarkSize;
 	bleedMarks = opt.bleedMarks;
 	registrationMarks = opt.registrationMarks;
 	colorMarks = opt.colorMarks;
@@ -1943,14 +1945,14 @@
 		FPoint start, end;
 		double left = offsetX, right = offsetX + width;
 		double bottom = offsetY + height, top = offsetY;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , options.cropMarkSize);
 	}
 	if (options.bleedMarks)
 	{
 		FPoint start, end;
 		double left = offsetX - bleedLeft, right = offsetX + width + bleedRight;
 		double bottom = offsetY + height + bleedBottom, top = offsetY - bleedTop;;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs , 20.0);
 	}
 	if (options.registrationMarks)
 	{
@@ -2032,7 +2034,7 @@
 	painter->restore();
 }
 
-void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset )
+void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize)
 {
 	FPoint start, end;
 	double left   = box.left(), right = box.right();
@@ -2041,31 +2043,31 @@
 	double bleedBottom = bleedBox.bottom(), bleedTop = bleedBox.top();
 	// Top Left
 	start.setXY( bleedLeft - offset, top );
-	end.setXY  ( bleedLeft - offset - 20, top );
+	end.setXY  ( bleedLeft - offset - markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedTop - offset );
-	end.setXY  ( left, bleedTop - offset - 20);
+	end.setXY  ( left, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Top Right
 	start.setXY( bleedRight + offset, top );
-	end.setXY  ( bleedRight + offset + 20, top );
+	end.setXY  ( bleedRight + offset + markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedTop - offset );
-	end.setXY  ( right, bleedTop - offset - 20);
+	end.setXY  ( right, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Bottom Left
 	start.setXY( bleedLeft - offset, bottom );
-	end.setXY  ( bleedLeft - offset - 20, bottom  );
+	end.setXY  ( bleedLeft - offset - markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedBottom + offset );
-	end.setXY  ( left, bleedBottom + offset + 20);
+	end.setXY  ( left, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 	// Bottom Right
 	start.setXY( bleedRight + offset, bottom );
-	end.setXY  ( bleedRight + offset + 20, bottom  );
+	end.setXY  ( bleedRight + offset + markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedBottom + offset );
-	end.setXY  ( right, bleedBottom + offset + 20);
+	end.setXY  ( right, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 }
 
Index: scribus/pdfoptions.h
===================================================================
--- scribus/pdfoptions.h	(révision 17391)
+++ scribus/pdfoptions.h	(copie de travail)
@@ -149,6 +149,7 @@
 	bool hideMenuBar;
 	bool fitWindow;
 	bool cropMarks;
+        double cropMarkSize;
 	bool bleedMarks;
 	bool registrationMarks;
 	bool colorMarks;
Index: scribus/ui/prefs_pdfexport.cpp
===================================================================
--- scribus/ui/prefs_pdfexport.cpp	(révision 17391)
+++ scribus/ui/prefs_pdfexport.cpp	(copie de travail)
@@ -85,6 +85,7 @@
 	clipToPrinterMarginsCheckBox->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab
 	printCropMarksCheckBox->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        printCropMarkSizeSpinBox->setToolTip( "<qt>" + tr( "Length of crop marks" ) + "</qt>" );
 	printBleedMarksCheckBox->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	printRegistrationMarksCheckBox->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	printColorBarsCheckBox->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -548,7 +549,9 @@
 		useDocumentBleedsCheckBox->hide();
 
 	registrationMarkOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
+	printCropMarkSizeSpinBox->setValue(prefsData->pdfPrefs.cropMarkSize*unitRatio);
 	printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
+	printCropMarkSizeSpinBox->setEnabled(prefsData->pdfPrefs.cropMarks);
 	printBleedMarksCheckBox->setChecked(prefsData->pdfPrefs.bleedMarks);
 	printRegistrationMarksCheckBox->setChecked(prefsData->pdfPrefs.registrationMarks);
 	printColorBarsCheckBox->setChecked(prefsData->pdfPrefs.colorMarks);
@@ -674,6 +677,7 @@
 	prefsData->pdfPrefs.UseSpotColors = !convertSpotsToProcessCheckBox->isChecked();
 	prefsData->pdfPrefs.doMultiFile = false;
 	prefsData->pdfPrefs.cropMarks  = printCropMarksCheckBox->isChecked();
+	prefsData->pdfPrefs.cropMarkSize = printCropMarkSizeSpinBox->value() / unitRatio;
 	prefsData->pdfPrefs.bleedMarks = printBleedMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.registrationMarks = printRegistrationMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.colorMarks = printColorBarsCheckBox->isChecked();
Index: scribus/ui/tabpdfoptions.h
===================================================================
--- scribus/ui/tabpdfoptions.h	(révision 17391)
+++ scribus/ui/tabpdfoptions.h	(copie de travail)
@@ -119,6 +119,7 @@
 
 public slots:
 	void doDocBleeds();
+        void doCropMark();
 	void ToggleEncr();
 	void EnablePDFX(int a);
 	void DoDownsample();
@@ -204,6 +205,7 @@
 	QCheckBox* colorMarks;
 	QCheckBox* docInfoMarks;
 	ScrSpinBox* markOffset;
+        ScrSpinBox* cropMarkSize;
 	QGroupBox* CBox;
 	QGridLayout* CBoxLayout;
 	QGroupBox* ColorGroup;
Index: scribus/ui/prefs_printerbase.ui
===================================================================
--- scribus/ui/prefs_printerbase.ui	(révision 17391)
+++ scribus/ui/prefs_printerbase.ui	(copie de travail)
@@ -451,11 +451,46 @@
         </widget>
        </item>
        <item>
-        <widget class="QCheckBox" name="cropMarksCheckBox">
-         <property name="text">
-          <string>Crop Marks</string>
-         </property>
-        </widget>
+        <layout class="QHBoxLayout" name="horizontalLayout_10">
+         <property name="topMargin">
+          <number>0</number>
+         </property><item>
+          <widget class="QCheckBox" name="cropMarksCheckBox">
+           <property name="text">
+            <string>Crop Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="cropMarkSizeSpinBox">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="value">
+            <number>20</number>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_5">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
        </item>
        <item>
         <widget class="QCheckBox" name="bleedMarksCheckBox">
@@ -594,5 +629,22 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>cropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>55</x>
+     <y>485</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>128</x>
+     <y>485</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
Index: scribus/ui/printdialogbase.ui
===================================================================
--- scribus/ui/printdialogbase.ui	(révision 17391)
+++ scribus/ui/printdialogbase.ui	(copie de travail)
@@ -437,17 +437,35 @@
        <string>Marks</string>
       </attribute>
       <layout class="QGridLayout">
-       <item row="0" column="0">
-        <widget class="QCheckBox" name="cropMarks">
+       <item row="6" column="1">
+        <layout class="QHBoxLayout">
+         <item>
+          <widget class="QLabel" name="MarkTxt1">
+           <property name="text">
+            <string>Offset:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="markOffset">
+           <property name="toolTip">
+            <string>Indicate the distance offset for the registration marks</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="6" column="0">
+        <widget class="QCheckBox" name="colorMarks">
          <property name="toolTip">
-          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
+          <string>Add color calibration bars</string>
          </property>
          <property name="text">
-          <string>Crop Marks</string>
+          <string>Color Bars</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="1">
+       <item row="5" column="1">
         <widget class="QCheckBox" name="registrationMarks">
          <property name="toolTip">
           <string>Add registration marks which are added to each separation</string>
@@ -457,7 +475,7 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
+       <item row="5" column="0">
         <widget class="QCheckBox" name="bleedMarks">
          <property name="toolTip">
           <string>This creates bleed marks which are indicated by  _ . _ and show the bleed limit</string>
@@ -467,36 +485,18 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="1">
-        <widget class="QCheckBox" name="colorMarks">
+       <item row="2" column="0">
+        <widget class="QCheckBox" name="cropMarks">
          <property name="toolTip">
-          <string>Add color calibration bars</string>
+          <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
          </property>
          <property name="text">
-          <string>Color Bars</string>
+          <string>Crop Marks</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="0">
-        <layout class="QHBoxLayout">
-         <item>
-          <widget class="QLabel" name="MarkTxt1">
-           <property name="text">
-            <string>Offset:</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="ScrSpinBox" name="markOffset">
-           <property name="toolTip">
-            <string>Indicate the distance offset for the registration marks</string>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="2" column="1">
-        <spacer>
+       <item row="6" column="2">
+        <spacer name="horizontalSpacer">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
@@ -508,6 +508,22 @@
          </property>
         </spacer>
        </item>
+       <item row="2" column="1">
+        <widget class="ScrSpinBox" name="cropMarkSize">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="minimum">
+          <number>1</number>
+         </property>
+         <property name="maximum">
+          <number>100</number>
+         </property>
+         <property name="value">
+          <number>20</number>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_4">
@@ -707,5 +723,21 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>cropMarks</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>cropMarkSize</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>58</x>
+     <y>358</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>358</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
Index: scribus/ui/printdialog.cpp
===================================================================
--- scribus/ui/printdialog.cpp	(révision 17391)
+++ scribus/ui/printdialog.cpp	(copie de travail)
@@ -409,6 +409,7 @@
 	m_doc->Print_Options.bleeds.Right  = BleedRight->value() / m_doc->unitRatio();
 	m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
 	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
+	m_doc->Print_Options.cropMarkSize = cropMarkSize->value() / m_doc->unitRatio();
 	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
 	m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
 	m_doc->Print_Options.registrationMarks = registrationMarks->isChecked();
@@ -466,6 +467,7 @@
 	options.useDocBleeds  = true;
 	options.bleeds=*m_doc->bleeds();
 	options.markOffset = prefs->getDouble("markOffset",0.0);
+        options.cropMarkSize = prefs->getDouble("cropMarkSize",20.0);
 	options.cropMarks  = prefs->getBool("cropMarks", false);
 	options.bleedMarks = prefs->getBool("bleedMarks", false);
 	options.registrationMarks = prefs->getBool("registrationMarks", false);
@@ -546,7 +548,9 @@
 	BleedRight->setEnabled(!docBleeds->isChecked());
 	BleedLeft->setEnabled(!docBleeds->isChecked());
 	markOffset->setValue(m_doc->Print_Options.markOffset*unitRatio);
+	cropMarkSize->setValue(m_doc->Print_Options.cropMarkSize*unitRatio);
 	cropMarks->setChecked(m_doc->Print_Options.cropMarks);
+	cropMarkSize->setEnabled(m_doc->Print_Options.cropMarks);
 	bleedMarks->setChecked(m_doc->Print_Options.bleedMarks);
 	registrationMarks->setChecked(m_doc->Print_Options.registrationMarks);
 	colorMarks->setChecked(m_doc->Print_Options.colorMarks);
Index: scribus/ui/pdfopts.cpp
===================================================================
--- scribus/ui/pdfopts.cpp	(révision 17391)
+++ scribus/ui/pdfopts.cpp	(copie de travail)
@@ -272,6 +272,7 @@
 		Opts.bleeds.Bottom = Options->BleedBottom->value()/docUnitRatio;
 	}
 	Opts.markOffset = Options->markOffset->value()/docUnitRatio;
+	Opts.cropMarkSize = Options->cropMarkSize->value()/docUnitRatio;
 	Opts.cropMarks = Options->cropMarks->isChecked();
 	Opts.bleedMarks = Options->bleedMarks->isChecked();
 	Opts.registrationMarks = Options->registrationMarks->isChecked();
Index: scribus/ui/preview.cpp
===================================================================
--- scribus/ui/preview.cpp	(révision 17391)
+++ scribus/ui/preview.cpp	(copie de travail)
@@ -599,6 +599,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
@@ -711,6 +712,7 @@
 		options.setDevParam = false;
 		options.doClip = ClipMarg->isChecked();
 		options.cropMarks = false;
+                options.cropMarkSize = 20.0;
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
Index: scribus/ui/tabpdfoptions.cpp
===================================================================
--- scribus/ui/tabpdfoptions.cpp	(révision 17391)
+++ scribus/ui/tabpdfoptions.cpp	(copie de travail)
@@ -800,14 +800,18 @@
 	MarkGroupLayout->setSpacing( 5 );
 	MarkGroupLayout->setMargin( 10 );
 	MarkGroupLayout->setAlignment( Qt::AlignTop );
-	cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( cropMarks, 0, 0 );
+        colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
+        MarkGroupLayout->addWidget( colorMarks, 0, 0 );
 	bleedMarks = new QCheckBox( tr( "Bleed Marks" ), MarkGroup );
 	MarkGroupLayout->addWidget( bleedMarks, 1, 0 );
 	registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup );
-	MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
-	colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
-	MarkGroupLayout->addWidget( colorMarks, 0, 1, 1, 2 );
+        MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
+        cropMarks = new QCheckBox( tr( "Crop Marks" ), MarkGroup );
+        MarkGroupLayout->addWidget( cropMarks, 0, 1 );
+        cropMarkSize = new ScrSpinBox( MarkGroup, unitIndex );
+        MarkGroupLayout->addWidget( cropMarkSize, 0, 2 );
+        cropMarkSize->setMinimum(1);
+        cropMarkSize->setMaximum(100);
 	docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup );
 	MarkGroupLayout->addWidget( docInfoMarks, 1, 1, 1, 2 );
 	MarkTxt1 = new QLabel( MarkGroup );
@@ -908,6 +912,7 @@
 		connect(InfoString, SIGNAL(textChanged(const QString &)), this, SLOT(checkInfo()));
 		connect(InfoString, SIGNAL(editingFinished()), this, SLOT(checkInfo()));
 		connect(docBleeds, SIGNAL(clicked()), this, SLOT(doDocBleeds()));
+                connect(cropMarks, SIGNAL(clicked()), this, SLOT(doCropMark()));
 		EmbedFonts->setToolTip( "<qt>" + tr( "Embed fonts into the PDF. Embedding the fonts will preserve the layout and appearance of your document." ) + "</qt>");
 		CheckBox10->setToolTip( "<qt>" + tr( "Enables presentation effects when using Adobe&#174; Reader&#174; and other PDF viewers which support this in full screen mode." ) + "</qt>");
 		PagePrev->setToolTip( "<qt>" + tr( "Show page previews of each page listed above." ) + "</qt>");
@@ -992,6 +997,7 @@
 	ClipMarg->setToolTip( "<qt>" + tr( "Do not show objects outside the margins in the exported file" ) + "</qt>" );
 	//PrePress tab 
 	cropMarks->setToolTip( "<qt>" + tr( "Creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing" ) + "</qt>" );
+        cropMarkSize->setToolTip( "<qt>" + tr( "Indicate the size of crops'marks" ) + "</qt>" );
 	bleedMarks->setToolTip( "<qt>" + tr( "This creates bleed marks which are indicated by  _ . _ and show the bleed limit" ) + "</qt>" );
 	registrationMarks->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	colorMarks->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
@@ -1381,7 +1387,9 @@
 		doDocBleeds();
 	}
 	markOffset->setValue(Opts.markOffset*unitRatio);
+	cropMarkSize->setValue(Opts.cropMarkSize*unitRatio);
 	cropMarks->setChecked(Opts.cropMarks);
+	doCropMark();
 	bleedMarks->setChecked(Opts.bleedMarks);
 	registrationMarks->setChecked(Opts.registrationMarks);
 	colorMarks->setChecked(Opts.colorMarks);
@@ -1459,6 +1467,7 @@
 	pdfOptions.UseSpotColors = !useSpot->isChecked();
 	pdfOptions.doMultiFile = false;
 	pdfOptions.cropMarks  = cropMarks->isChecked();
+	pdfOptions.cropMarkSize = cropMarkSize->value() / unitRatio;
 	pdfOptions.bleedMarks = bleedMarks->isChecked();
 	pdfOptions.registrationMarks = registrationMarks->isChecked();
 	pdfOptions.colorMarks = colorMarks->isChecked();
@@ -1563,6 +1572,11 @@
 		BleedLeft->setEnabled(true);
 	}
 }
+ 
+void TabPDFOptions::doCropMark()
+{
+        cropMarkSize->setEnabled(cropMarks->isChecked());
+}
 
 void TabPDFOptions::checkInfo()
 {
Index: scribus/ui/prefs_printer.cpp
===================================================================
--- scribus/ui/prefs_printer.cpp	(révision 17391)
+++ scribus/ui/prefs_printer.cpp	(copie de travail)
@@ -91,7 +91,9 @@
 			   prefs->getDouble("BleedLeft",0.0)*unitRatio);
 	bleedsWidget->setup(bleeds, 0, 0, false, false);
 	markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio);
-	bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+        cropMarkSizeSpinBox->setValue(prefs->getDouble("cropMarkSize",20.0));
+        cropMarkSizeSpinBox->setEnabled(prefs->getBool("cropMarks", false));
 	bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
 	registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
 	colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
@@ -128,6 +130,7 @@
 	prefs->set("BleedLeft", bleeds.Left / unitRatio);
 	prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
 	prefs->set("cropMarks", cropMarksCheckBox->isChecked());
+	prefs->set("cropMarkSize", cropMarkSizeSpinBox->value() / unitRatio);
 	prefs->set("bleedMarks", bleedMarksCheckBox->isChecked());
 	prefs->set("registrationMarks", registrationMarksCheckBox->isChecked());
 	prefs->set("colorMarks", colorBarsCheckBox->isChecked());
Index: scribus/ui/prefs_pdfexportbase.ui
===================================================================
--- scribus/ui/prefs_pdfexportbase.ui	(révision 17391)
+++ scribus/ui/prefs_pdfexportbase.ui	(copie de travail)
@@ -261,8 +261,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>456</height>
+            <width>317</width>
+            <height>409</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_19">
@@ -685,8 +685,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>638</height>
+            <width>240</width>
+            <height>541</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_8">
@@ -1012,8 +1012,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>470</height>
+            <width>624</width>
+            <height>446</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_18">
@@ -1039,7 +1039,24 @@
            </item>
            <item>
             <layout class="QFormLayout" name="formLayout_7">
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::ExpandingFieldsGrow</enum>
+             </property>
+             <item row="2" column="0" colspan="2">
+              <widget class="QCheckBox" name="printBleedMarksCheckBox">
+               <property name="text">
+                <string>Bleed Marks</string>
+               </property>
+              </widget>
+             </item>
              <item row="3" column="0" colspan="2">
+              <widget class="QCheckBox" name="printColorBarsCheckBox">
+               <property name="text">
+                <string>Color Bars</string>
+               </property>
+              </widget>
+             </item>
+             <item row="5" column="0" colspan="2">
               <widget class="QCheckBox" name="printPageInfoCheckBox">
                <property name="text">
                 <string>Page Information</string>
@@ -1053,36 +1070,48 @@
                </property>
               </widget>
              </item>
-             <item row="5" column="1">
-              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
-             </item>
-             <item row="5" column="0">
+             <item row="6" column="0">
               <widget class="QLabel" name="label_17">
                <property name="text">
                 <string>Registration Mark Offset:</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="0" colspan="2">
-              <widget class="QCheckBox" name="printCropMarksCheckBox">
-               <property name="text">
-                <string>Crop Marks</string>
-               </property>
-              </widget>
+             <item row="6" column="1">
+              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
              </item>
-             <item row="1" column="0" colspan="2">
-              <widget class="QCheckBox" name="printBleedMarksCheckBox">
-               <property name="text">
-                <string>Bleed Marks</string>
+             <item row="1" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_13">
+               <property name="rightMargin">
+                <number>0</number>
                </property>
-              </widget>
-             </item>
-             <item row="2" column="0" colspan="2">
-              <widget class="QCheckBox" name="printColorBarsCheckBox">
-               <property name="text">
-                <string>Color Bars</string>
+               <property name="bottomMargin">
+                <number>0</number>
                </property>
-              </widget>
+               <item>
+                <widget class="QCheckBox" name="printCropMarksCheckBox">
+                 <property name="text">
+                  <string>Crop Marks</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="ScrSpinBox" name="printCropMarkSizeSpinBox">
+                 <property name="enabled">
+                  <bool>false</bool>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                 <property name="value">
+                  <number>20</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
              </item>
             </layout>
            </item>
@@ -1783,7 +1812,24 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>printCropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>printCropMarkSizeSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>134</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
  <buttongroups>
   <buttongroup name="rangeButtonGroup"/>
  </buttongroups>
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(révision 17391)
+++ scribus/scribus.cpp	(copie de travail)
@@ -7896,6 +7896,7 @@
 	options.setDevParam = false;
 	options.doClip = true;
 	options.cropMarks = false;
+        options.cropMarkSize = 20.0;
 	options.bleedMarks = false;
 	options.registrationMarks = false;
 	options.colorMarks = false;
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(copie de travail)
@@ -1000,6 +1000,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -1059,6 +1060,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(copie de travail)
@@ -2853,6 +2853,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -2940,6 +2941,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(copie de travail)
@@ -627,6 +627,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+        docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -686,6 +687,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+        docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(révision 17391)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(copie de travail)
@@ -1509,6 +1509,7 @@
 	doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
 	doc->pdfOptions().useDocBleeds  = attrs.valueAsBool("useDocBleeds", true);
 	doc->pdfOptions().cropMarks     = attrs.valueAsBool("cropMarks", false);
+        doc->pdfOptions().cropMarkSize  = attrs.valueAsDouble("cropMarkSize", 20.0);
 	doc->pdfOptions().bleedMarks    = attrs.valueAsBool("bleedMarks", false);
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
@@ -1595,6 +1596,7 @@
 	doc->Print_Options.setDevParam  = attrs.valueAsBool("setDevParam");
 	doc->Print_Options.useDocBleeds = attrs.valueAsBool("useDocBleeds");
 	doc->Print_Options.cropMarks    = attrs.valueAsBool("cropMarks");
+        doc->Print_Options.cropMarkSize  = attrs.valueAsDouble("cropMarkSize");
 	doc->Print_Options.bleedMarks   = attrs.valueAsBool("bleedMarks");
 	doc->Print_Options.registrationMarks = attrs.valueAsBool("registrationMarks");
 	doc->Print_Options.colorMarks   = attrs.valueAsBool("colorMarks");
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(révision 17391)
+++ scribus/pslib.cpp	(copie de travail)
@@ -592,8 +592,12 @@
 	double bleedRight = 0.0;
 	double bleedLeft = 0.0;
 	double markOffs = 0.0;
-	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
-		markOffs = 20.0 + Options.markOffset;
+	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks)){
+		if(!Options.useDocBleeds)
+			markOffs = Options.markOffset;
+		else
+			markOffs = 20.0 + Options.markOffset;
+	}
 	GetBleeds(pg, bleedLeft, bleedRight);
 	double maxBoxX = pg->width()+bleedLeft+bleedRight+markOffs*2.0;
 	double maxBoxY = pg->height()+Options.bleeds.Bottom+Options.bleeds.Top+markOffs*2.0;
@@ -649,8 +653,12 @@
 {
 	PutStream("%%PageTrailer\nrestore\n");
 	double markOffs = 0.0;
-	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
-		markOffs = 20.0 + Options.markOffset;
+	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks)){
+		if(!Options.useDocBleeds)
+			markOffs = Options.markOffset;
+		else
+			markOffs = 20.0 + Options.markOffset;
+	}
 	double bleedRight, bleedLeft;
 	GetBleeds(ActPage, bleedLeft, bleedRight);
 	double maxBoxX = ActPage->width()+bleedLeft+bleedRight+markOffs*2.0;
@@ -670,64 +678,64 @@
 		{
 		// Bottom Left
 			PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" 20 li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" " + ToStr(Options.cropMarkSize) + " li\n");
 			PutStream("st\n");
 		// Top Left
 			PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Bottom Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		// Top Right
 			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-Options.cropMarkSize)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-Options.cropMarkSize)+" li\n");
 			PutStream("st\n");
 		}
 		if (Options.bleedMarks)
 		{
 			PutStream("gs\n");
 			PutStream("[3 1 1 1] 0 setdash\n");
-		// Bottom Left
-			PutStream("0 "+ToStr(markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs)+" li\n");
+			// Bottom Left
+			PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs)+" 0 m\n");
-			PutStream(ToStr(markOffs)+" 20 l\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ ToStr(markOffs+Options.bleeds.Bottom) +" l\n");
 			PutStream("st\n");
 		// Top Left
-			PutStream("0 "+ToStr(maxBoxY-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
+			PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
-			PutStream("st\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ ToStr(maxBoxY-Options.bleeds.Top-markOffs) +" l\n");
+			PutStream("S\n");
 		// Bottom Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" 0 m\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markOffs+Options.bleeds.Bottom) +" l\n");
 			PutStream("st\n");
 		// Top Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutStream(ToStr(maxBoxX-markOffs-bleedRight)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-Options.bleeds.Top-markOffs) +" l\n");
 			PutStream("st\n");
 			PutStream("gr\n");
 		}
cropmarklength.diff (50,011 bytes)   

jghali

2012-03-27 20:38

administrator   ~0027869

Sorry for the delay, I committed your patch (after some refactoring). Thanks!

Issue History

Date Modified Username Field Change
2009-02-14 12:36 BAlpha New Issue
2009-02-14 12:52 jghali Note Added: 0021139
2009-02-14 15:33 BAlpha Note Added: 0021140
2009-03-15 02:02 christoph_s Status new => acknowledged
2009-03-15 02:02 christoph_s Target Version => 1.3.6
2012-03-12 19:11 louisdesjardins Note Added: 0027791
2012-03-21 18:12 Chelen File Added: cropmark.diff
2012-03-21 18:16 Chelen Note Added: 0027841
2012-03-24 12:04 jghali Note Added: 0027855
2012-03-24 12:30 jghali Note Edited: 0027855
2012-03-24 12:31 jghali Note Edited: 0027855
2012-03-24 18:35 Chelen Note Added: 0027857
2012-03-24 18:35 Chelen File Added: Document-1.pdf
2012-03-24 18:36 Chelen File Added: croplength.diff
2012-03-24 19:01 jghali Note Added: 0027858
2012-03-24 22:37 Chelen Note Added: 0027859
2012-03-24 22:37 Chelen File Added: cropmarklength.diff
2012-03-27 20:38 jghali Note Added: 0027869
2012-03-27 20:54 jghali Status acknowledged => resolved
2012-03-27 20:54 jghali Fixed in Version => 1.5.0svn
2012-03-27 20:54 jghali Resolution open => fixed
2012-03-27 20:54 jghali Assigned To => jghali
2012-04-29 10:54 cbradney Status resolved => closed