Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 17401 → Rev 17400

/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
807,22 → 807,14
registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup );
MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
MarkGroupLayout->addWidget( colorMarks, 3, 0 );
MarkGroupLayout->addWidget( colorMarks, 0, 1, 1, 2 );
docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup );
MarkGroupLayout->addWidget( docInfoMarks, 0, 1, 1, 2 );
MarkGroupLayout->addWidget( docInfoMarks, 1, 1, 1, 2 );
MarkTxt1 = new QLabel( MarkGroup );
MarkTxt1->setText( tr( "Length:" ) );
MarkTxt1->setText( tr( "Offset:" ) );
MarkGroupLayout->addWidget( MarkTxt1, 2, 1 );
markLength = new ScrSpinBox( MarkGroup, unitIndex );
MarkGroupLayout->addWidget( markLength, 2, 2 );
markLength->setSuffix( unit );
markLength->setMinimum(1 * unitRatio);
markLength->setMaximum(3000 * unitRatio);
MarkTxt2 = new QLabel( MarkGroup );
MarkTxt2->setText( tr( "Offset:" ) );
MarkGroupLayout->addWidget( MarkTxt2, 3, 1 );
markOffset = new ScrSpinBox( MarkGroup, unitIndex );
MarkGroupLayout->addWidget( markOffset, 3, 2 );
MarkGroupLayout->addWidget( markOffset, 2, 2 );
markOffset->setSuffix( unit );
markOffset->setMinimum(0);
markOffset->setMaximum(3000 * unitRatio);
1004,7 → 996,6
registrationMarks->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
colorMarks->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
docInfoMarks->setToolTip( "<qt>" + tr( "Add document information which includes the document title and page numbers" ) + "</qt>" );
markLength->setToolTip( "<qt>" + tr( "Indicate the size of crops'marks" ) + "</qt>" );
markOffset->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
BleedTop->setToolTip( "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
BleedBottom->setToolTip( "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
1389,7 → 1380,6
docBleeds->setChecked(Opts.useDocBleeds);
doDocBleeds();
}
markLength->setValue(Opts.markLength*unitRatio);
markOffset->setValue(Opts.markOffset*unitRatio);
cropMarks->setChecked(Opts.cropMarks);
bleedMarks->setChecked(Opts.bleedMarks);
1473,7 → 1463,6
pdfOptions.registrationMarks = registrationMarks->isChecked();
pdfOptions.colorMarks = colorMarks->isChecked();
pdfOptions.docInfoMarks = docInfoMarks->isChecked();
pdfOptions.markLength = markLength->value() / unitRatio;
pdfOptions.markOffset = markOffset->value() / unitRatio;
pdfOptions.useDocBleeds = docBleeds->isChecked();
pdfOptions.bleeds.Bottom = BleedBottom->value() / unitRatio;
/trunk/Scribus/scribus/ui/printdialog.cpp
53,9 → 53,6
printEngines->addItem( CommonStrings::trPostScript1 );
printEngines->addItem( CommonStrings::trPostScript2 );
printEngines->addItem( CommonStrings::trPostScript3 );
markLength->setNewUnit(unit);
markLength->setMinimum(1*unitRatio);
markLength->setMaximum(3000*unitRatio);
markOffset->setNewUnit(unit);
markOffset->setMinimum(0);
markOffset->setMaximum(3000*unitRatio);
411,7 → 408,6
m_doc->Print_Options.bleeds.Left = BleedLeft->value() / m_doc->unitRatio();
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.markLength = markLength->value() / m_doc->unitRatio();
m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
m_doc->Print_Options.cropMarks = cropMarks->isChecked();
m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
468,9 → 464,8
options.useSpotColors = prefs->getBool("doSpot", true);
options.useICC = m_doc->HasCMS ? prefs->getBool("ICCinUse", false) : false;
options.useDocBleeds = true;
options.bleeds = *m_doc->bleeds();
options.markLength = prefs->getDouble("markLength", 20.0);
options.markOffset = prefs->getDouble("markOffset", 0.0);
options.bleeds=*m_doc->bleeds();
options.markOffset = prefs->getDouble("markOffset",0.0);
options.cropMarks = prefs->getBool("cropMarks", false);
options.bleedMarks = prefs->getBool("bleedMarks", false);
options.registrationMarks = prefs->getBool("registrationMarks", false);
550,7 → 545,6
BleedBottom->setEnabled(!docBleeds->isChecked());
BleedRight->setEnabled(!docBleeds->isChecked());
BleedLeft->setEnabled(!docBleeds->isChecked());
markLength->setValue(m_doc->Print_Options.markLength*unitRatio);
markOffset->setValue(m_doc->Print_Options.markOffset*unitRatio);
cropMarks->setChecked(m_doc->Print_Options.cropMarks);
bleedMarks->setChecked(m_doc->Print_Options.bleedMarks);
/trunk/Scribus/scribus/ui/preview.cpp
602,7 → 602,6
options.bleedMarks = false;
options.registrationMarks = false;
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
options.bleeds.Top = 0.0;
options.bleeds.Left = 0.0;
715,7 → 714,6
options.bleedMarks = false;
options.registrationMarks = false;
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
options.bleeds.Top = 0.0;
options.bleeds.Left = 0.0;
/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
89,8 → 89,7
printRegistrationMarksCheckBox->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
printColorBarsCheckBox->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
printPageInfoCheckBox->setToolTip( "<qt>" + tr( "Add document information which includes the document title and page numbers" ) + "</qt>" );
markLengthSpinBox->setToolTip( "<qt>" + tr( "Length of crop marks" ) + "</qt>" );
markOffsetSpinBox->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
registrationMarkOffsetSpinBox->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
// BleedTop->setToolTip( "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
// BleedBottom->setToolTip( "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
// BleedLeft->setToolTip( "<qt>" + tr( "Distance for bleed from the left of the physical page" ) + "</qt>" );
109,14 → 108,9
void Prefs_PDFExport::unitChange(int unitIndex)
{
unitRatio = unitGetRatioFromIndex(unitIndex);
 
markLengthSpinBox->setNewUnit(unitIndex);
markLengthSpinBox->setMinimum(0);
markLengthSpinBox->setMaximum(3000 * unitRatio);
 
markOffsetSpinBox->setNewUnit(unitIndex);
markOffsetSpinBox->setMinimum(0);
markOffsetSpinBox->setMaximum(3000 * unitRatio);
registrationMarkOffsetSpinBox->setNewUnit(unitIndex);
registrationMarkOffsetSpinBox->setMinimum(0);
registrationMarkOffsetSpinBox->setMaximum(3000 * unitRatio);
}
 
void Prefs_PDFExport::languageChange()
553,8 → 547,7
else
useDocumentBleedsCheckBox->hide();
 
markLengthSpinBox->setValue(prefsData->pdfPrefs.markLength*unitRatio);
markOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
registrationMarkOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
printBleedMarksCheckBox->setChecked(prefsData->pdfPrefs.bleedMarks);
printRegistrationMarksCheckBox->setChecked(prefsData->pdfPrefs.registrationMarks);
685,10 → 678,9
prefsData->pdfPrefs.registrationMarks = printRegistrationMarksCheckBox->isChecked();
prefsData->pdfPrefs.colorMarks = printColorBarsCheckBox->isChecked();
prefsData->pdfPrefs.docInfoMarks = printPageInfoCheckBox->isChecked();
prefsData->pdfPrefs.markLength = markLengthSpinBox->value() / unitRatio;
prefsData->pdfPrefs.markOffset = markOffsetSpinBox->value() / unitRatio;
prefsData->pdfPrefs.markOffset = registrationMarkOffsetSpinBox->value() / unitRatio;
prefsData->pdfPrefs.useDocBleeds = useDocumentBleedsCheckBox->isChecked();
prefsData->pdfPrefs.bleeds = bleedsWidget->margins();
prefsData->pdfPrefs.bleeds=bleedsWidget->margins();
prefsData->pdfPrefs.doClip = clipToPrinterMarginsCheckBox->isChecked();
if (useEncryptionCheckBox->isChecked())
{
/trunk/Scribus/scribus/ui/printdialogbase.ui
7,7 → 7,7
<x>0</x>
<y>0</y>
<width>570</width>
<height>529</height>
<height>520</height>
</rect>
</property>
<property name="windowTitle">
267,7 → 267,7
<item>
<widget class="QTabWidget" name="printOptions">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
437,71 → 437,47
<string>Marks</string>
</attribute>
<layout class="QGridLayout">
<item row="5" column="0">
<widget class="QCheckBox" name="bleedMarks">
<item row="0" column="0">
<widget class="QCheckBox" name="cropMarks">
<property name="toolTip">
<string>This creates bleed marks which are indicated by _ . _ and show the bleed limit</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>Bleed Marks</string>
<string>Crop Marks</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="cropMarks">
<item row="0" column="1">
<widget class="QCheckBox" name="registrationMarks">
<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 registration marks which are added to each separation</string>
</property>
<property name="text">
<string>Crop Marks</string>
<string>Registration Marks</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="colorMarks">
<item row="1" column="0">
<widget class="QCheckBox" name="bleedMarks">
<property name="toolTip">
<string>Add color calibration bars</string>
<string>This creates bleed marks which are indicated by _ . _ and show the bleed limit</string>
</property>
<property name="text">
<string>Color Bars</string>
<string>Bleed Marks</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="registrationMarks">
<item row="1" column="1">
<widget class="QCheckBox" name="colorMarks">
<property name="toolTip">
<string>Add registration marks which are added to each separation</string>
<string>Add color calibration bars</string>
</property>
<property name="text">
<string>Registration Marks</string>
<string>Color Bars</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="MarkTxt2">
<property name="text">
<string>Length:</string>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="markLength">
<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>
<item row="5" column="1">
<item row="2" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="MarkTxt1">
519,15 → 495,15
</item>
</layout>
</item>
<item row="8" column="0">
<spacer name="verticalSpacer">
<item row="2" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
731,21 → 707,5
</hint>
</hints>
</connection>
<connection>
<sender>cropMarks</sender>
<signal>clicked(bool)</signal>
<receiver>markLength</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>
/trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui
7,7 → 7,7
<x>0</x>
<y>0</y>
<width>648</width>
<height>550</height>
<height>525</height>
</rect>
</property>
<property name="windowTitle">
261,8 → 261,8
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>455</height>
<width>563</width>
<height>456</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_19">
685,8 → 685,8
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>606</height>
<width>563</width>
<height>638</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
1012,8 → 1012,8
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>436</height>
<width>563</width>
<height>470</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
1038,90 → 1038,52
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QLabel" name="label_43">
<property name="text">
<string>Mark Length:</string>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="markLengthSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
</layout>
<layout class="QFormLayout" name="formLayout_7">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="printPageInfoCheckBox">
<property name="text">
<string>Page Information</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="printBleedMarksCheckBox">
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="printRegistrationMarksCheckBox">
<property name="text">
<string>Bleed Marks</string>
<string>Registration Marks</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="printColorBarsCheckBox">
<item row="5" column="1">
<widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Color Bars</string>
<string>Registration Mark Offset:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="printRegistrationMarksCheckBox">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="printCropMarksCheckBox">
<property name="text">
<string>Registration Marks</string>
<string>Crop Marks</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="printPageInfoCheckBox">
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="printBleedMarksCheckBox">
<property name="text">
<string>Page Information</string>
<string>Bleed Marks</string>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="rightMargin">
<number>0</number>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="printColorBarsCheckBox">
<property name="text">
<string>Color Bars</string>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="printCropMarksCheckBox">
<property name="text">
<string>Crop Marks</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>Mark Offset:</string>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="markOffsetSpinBox"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
1821,24 → 1783,7
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>printCropMarksCheckBox</sender>
<signal>clicked(bool)</signal>
<receiver>markLengthSpinBox</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>
<connections/>
<buttongroups>
<buttongroup name="rangeButtonGroup"/>
</buttongroups>
/trunk/Scribus/scribus/ui/pdfopts.cpp
271,8 → 271,7
Opts.bleeds.Right = Options->BleedRight->value()/docUnitRatio;
Opts.bleeds.Bottom = Options->BleedBottom->value()/docUnitRatio;
}
Opts.markLength = Options->markLength->value() / docUnitRatio;
Opts.markOffset = Options->markOffset->value() / docUnitRatio;
Opts.markOffset = Options->markOffset->value()/docUnitRatio;
Opts.cropMarks = Options->cropMarks->isChecked();
Opts.bleedMarks = Options->bleedMarks->isChecked();
Opts.registrationMarks = Options->registrationMarks->isChecked();
/trunk/Scribus/scribus/ui/prefs_printer.cpp
90,9 → 90,8
prefs->getDouble("BleedRight",0.0)*unitRatio,
prefs->getDouble("BleedLeft",0.0)*unitRatio);
bleedsWidget->setup(bleeds, 0, 0, false, false);
markLengthSpinBox->setValue(prefs->getDouble("markLength", 20.0)*unitRatio);
markOffsetSpinBox->setValue(prefs->getDouble("markOffset", 0.0)*unitRatio);
cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio);
bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
123,11 → 122,10
prefs->set("ICCinUse", applyICCProfilesCheckBox->isChecked());
double unitRatio = unitGetRatioFromIndex(prefsData->docSetupPrefs.docUnitIndex);
MarginStruct bleeds(bleedsWidget->margins());
prefs->set("BleedTop", bleeds.Left / unitRatio);
prefs->set("BleedTop", bleeds.Left / unitRatio);
prefs->set("BleedBottom", bleeds.Bottom / unitRatio);
prefs->set("BleedRight", bleeds.Right / unitRatio);
prefs->set("BleedLeft", bleeds.Left / unitRatio);
prefs->set("markLength", markLengthSpinBox->value() / unitRatio);
prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
prefs->set("cropMarks", cropMarksCheckBox->isChecked());
prefs->set("bleedMarks", bleedMarksCheckBox->isChecked());
/trunk/Scribus/scribus/ui/prefs_printerbase.ui
46,9 → 46,9
<property name="geometry">
<rect>
<x>0</x>
<y>-334</y>
<width>714</width>
<height>958</height>
<y>-351</y>
<width>716</width>
<height>1035</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
451,73 → 451,58
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="cropMarksCheckBox">
<widget class="QCheckBox" name="cropMarksCheckBox">
<property name="text">
<string>Crop Marks</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="bleedMarksCheckBox">
<property name="text">
<string>Bleed Marks</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="registrationMarksCheckBox">
<property name="text">
<string>Registration Marks</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="colorBarsCheckBox">
<property name="text">
<string>Color Bars</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>Crop Marks</string>
<string>Offset:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="bleedMarksCheckBox">
<property name="text">
<string>Bleed Marks</string>
</property>
</widget>
<item>
<widget class="ScrSpinBox" name="markOffsetSpinBox"/>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="registrationMarksCheckBox">
<property name="text">
<string>Registration Marks</string>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="colorBarsCheckBox">
<property name="text">
<string>Color Bars</string>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>Offset:</string>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="markOffsetSpinBox"/>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Length:</string>
</property>
</widget>
</item>
<item>
<widget class="ScrSpinBox" name="markLengthSpinBox">
<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>
<item>
609,22 → 594,5
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>cropMarksCheckBox</sender>
<signal>clicked(bool)</signal>
<receiver>markLengthSpinBox</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>
<connections/>
</ui>
/trunk/Scribus/scribus/ui/tabpdfoptions.h
203,7 → 203,6
QCheckBox* registrationMarks;
QCheckBox* colorMarks;
QCheckBox* docInfoMarks;
ScrSpinBox* markLength;
ScrSpinBox* markOffset;
QGroupBox* CBox;
QGridLayout* CBoxLayout;
263,7 → 262,6
QLabel* BleedTxt3;
QLabel* BleedTxt4;
QLabel* MarkTxt1;
QLabel* MarkTxt2;
QCheckBox *docBleeds;
QGroupBox* RangeGroup;
QVBoxLayout* RangeGroupLayout;
/trunk/Scribus/scribus/scribus.cpp
7899,7 → 7899,6
options.bleedMarks = false;
options.registrationMarks = false;
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
options.bleeds.Top = 0.0;
options.bleeds.Left = 0.0;
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
1006,7 → 1006,6
docu.writeAttribute("includePDFMarks", static_cast<int>(m_Doc->Print_Options.includePDFMarks));
docu.writeAttribute("PSLevel", (m_Doc->Print_Options.prnEngine < WindowsGDI) ? m_Doc->Print_Options.prnEngine : PostScript3);
docu.writeAttribute("PDLanguage" , m_Doc->Print_Options.prnEngine);
docu.writeAttribute("markLength" , m_Doc->Print_Options.markLength);
docu.writeAttribute("markOffset" , m_Doc->Print_Options.markOffset);
docu.writeAttribute("BleedTop" , m_Doc->Print_Options.bleeds.Top);
docu.writeAttribute("BleedLeft" , m_Doc->Print_Options.bleeds.Left);
1064,7 → 1063,6
docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
docu.writeAttribute("docInfoMarks", static_cast<int>(m_Doc->pdfOptions().docInfoMarks));
docu.writeAttribute("markLength", m_Doc->pdfOptions().markLength);
docu.writeAttribute("markOffset", m_Doc->pdfOptions().markOffset);
docu.writeAttribute("ImagePr", static_cast<int>(m_Doc->pdfOptions().EmbeddedI));
docu.writeAttribute("PassOwner", m_Doc->pdfOptions().PassOwner);
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
2857,7 → 2857,6
doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
doc->pdfOptions().colorMarks = attrs.valueAsBool("colorMarks", false);
doc->pdfOptions().docInfoMarks = attrs.valueAsBool("docInfoMarks", false);
doc->pdfOptions().markLength = attrs.valueAsDouble("markLength", 20.0);
doc->pdfOptions().markOffset = attrs.valueAsDouble("markOffset", 0.0);
doc->pdfOptions().EmbeddedI = attrs.valueAsBool("ImagePr", false);
doc->pdfOptions().PassOwner = attrs.valueAsString("PassOwner", "");
2949,7 → 2948,6
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
else
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
doc->Print_Options.bleeds.Top = attrs.valueAsDouble("BleedTop");
doc->Print_Options.bleeds.Left = attrs.valueAsDouble("BleedLeft");
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
1513,7 → 1513,6
doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
doc->pdfOptions().colorMarks = attrs.valueAsBool("colorMarks", false);
doc->pdfOptions().docInfoMarks = attrs.valueAsBool("docInfoMarks", false);
doc->pdfOptions().markLength = attrs.valueAsDouble("markLength", 0.0);
doc->pdfOptions().markOffset = attrs.valueAsDouble("markOffset", 0.0);
doc->pdfOptions().EmbeddedI = attrs.valueAsBool("ImagePr", false);
doc->pdfOptions().PassOwner = attrs.valueAsString("PassOwner", "");
1604,7 → 1603,6
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
else
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
doc->Print_Options.bleeds.Top = attrs.valueAsDouble("BleedTop");
doc->Print_Options.bleeds.Left = attrs.valueAsDouble("BleedLeft");
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
627,7 → 627,6
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));
687,7 → 686,6
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));
/trunk/Scribus/scribus/prefsmanager.cpp
459,7 → 459,6
appPrefs.pdfPrefs.registrationMarks = false;
appPrefs.pdfPrefs.colorMarks = false;
appPrefs.pdfPrefs.docInfoMarks = false;
appPrefs.pdfPrefs.markLength = 20;
appPrefs.pdfPrefs.markOffset = 0;
appPrefs.pdfPrefs.EmbeddedI = false;
appPrefs.pdfPrefs.Encrypt = false;
1746,7 → 1745,6
pdf.setAttribute("RegistrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
pdf.setAttribute("ColorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
pdf.setAttribute("DocInfoMarks", static_cast<int>(appPrefs.pdfPrefs.docInfoMarks));
pdf.setAttribute("MarkLength", appPrefs.pdfPrefs.markLength);
pdf.setAttribute("MarkOffset", appPrefs.pdfPrefs.markOffset);
pdf.setAttribute("ImagePr", static_cast<int>(appPrefs.pdfPrefs.EmbeddedI));
pdf.setAttribute("PassOwner", appPrefs.pdfPrefs.PassOwner);
2486,7 → 2484,6
appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("RegistrationMarks", "0").toInt());
appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("ColorMarks", "0").toInt());
appPrefs.pdfPrefs.docInfoMarks = static_cast<bool>(dc.attribute("DocInfoMarks", "0").toInt());
appPrefs.pdfPrefs.markLength = ScCLocale::toDoubleC(dc.attribute("MarkLength"), 20.0);
appPrefs.pdfPrefs.markOffset = ScCLocale::toDoubleC(dc.attribute("MarkOffset"), 0.0);
appPrefs.pdfPrefs.EmbeddedI = static_cast<bool>(dc.attribute("ImagePr", "0").toInt());
appPrefs.pdfPrefs.PassOwner = dc.attribute("PassOwner", "");
/trunk/Scribus/scribus/pdflib_core.cpp
2733,10 → 2733,7
uint PgNr = ActPageP->pageNr();
double markOffs = 0.0;
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
markOffs = Options.markLength + Options.markOffset;
if ((Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
markOffs = qMax(markOffs, Options.markOffset + 20.0);
double markDelta = markOffs - (Options.markLength + Options.markOffset);
markOffs = 20.0 + Options.markOffset;
double bleedRight, bleedLeft;
getBleeds(ActPageP, bleedLeft, bleedRight);
double maxBoxX = ActPageP->width()+bleedLeft+bleedRight+markOffs*2.0;
2750,32 → 2747,32
if (Options.cropMarks)
{
// Bottom Left
PutPage(FToStr(markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutPage(FToStr(20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta)+" m\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta+Options.markLength)+" l\n");
PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
PutPage(FToStr(markOffs+bleedLeft)+" 20 l\n");
PutPage("S\n");
// Top Left
PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-20.0)+" l\n");
PutPage("S\n");
// Bottom Right
PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
PutPage("S\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta+Options.markLength) +" l\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(0.0)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(20.0)+" l\n");
PutPage("S\n");
// Top Right
PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
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("S\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
PutPage("S\n");
}
if (Options.bleedMarks)
2783,55 → 2780,54
PutPage("q\n");
PutPage("[3 1 1 1] 0 d\n");
// Bottom Left
PutPage(FToStr(markDelta)+" "+FToStr(markOffs)+" m\n");
PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs)+" l\n");
PutPage("0 "+FToStr(markOffs)+" m\n");
PutPage(FToStr(20.0)+" "+FToStr(markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs)+" "+FToStr(markDelta)+" m\n");
PutPage(FToStr(markOffs)+" "+FToStr(markDelta+Options.markLength)+" l\n");
PutPage(FToStr(markOffs)+" 0 m\n");
PutPage(FToStr(markOffs)+" 20 l\n");
PutPage("S\n");
// Top Left
PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-markOffs)+" m\n");
PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-markOffs)+" l\n");
PutPage("0 "+FToStr(maxBoxY-markOffs)+" m\n");
PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-markDelta-Options.markLength)+" l\n");
PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY)+" m\n");
PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
PutPage("S\n");
// Bottom Right
PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs)+" m\n");
PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs)+" l\n");
PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs)+" m\n");
PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(markDelta)+" m\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(markDelta+Options.markLength)+" l\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(0.0)+" m\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(20.0)+" l\n");
PutPage("S\n");
// Top Right
PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-markOffs)+" m\n");
PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-markOffs)+" l\n");
PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-markOffs)+" m\n");
PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-markDelta-Options.markLength)+" l\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY)+" m\n");
PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
PutPage("S\n");
PutPage("Q\n");
}
if (Options.registrationMarks)
{
double regDelta = markOffs - Options.markOffset;
QString regCross = "0 7 m\n14 7 l\nh\n7 0 m\n7 14 l\nh\n13 7 m\n13 10.31383 10.31383 13 7 13 c\n3.68629 13 1 10.31383 1 7 c\n1 3.68629 3.68629 1 7 1 c\n";
regCross += "10.31383 1 13 3.68629 13 7 c\nh\n10.5 7 m\n10.5 8.93307 8.93307 10.5 7 10.5 c\n5.067 10.5 3.5 8.93307 3.5 7 c\n";
regCross += "3.5 5.067 5.067 3.5 7 3.5 c\n8.93307 3.5 10.5 5.067 10.5 7 c\nh\nS\n";
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(regDelta - 17)+" cm\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" 3 cm\n");
PutPage(regCross);
PutPage("Q\n");
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(regDelta - 17)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
PutPage("1 0 0 1 3 "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
PutPage(regCross);
PutPage("Q\n");
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(maxBoxY - regDelta + 3.0)+" cm\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(maxBoxY - 17.0)+" cm\n");
PutPage(regCross);
PutPage("Q\n");
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX - regDelta + 3.0)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX - 17.0)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
PutPage(regCross);
PutPage("Q\n");
}
2838,7 → 2834,7
if (Options.colorMarks)
{
double startX = markOffs+bleedLeft+6.0;
double startY = maxBoxY - markOffs + Options.markOffset + 2.0;
double startY = maxBoxY - 18.0;
PutPage("0 0 0 1 K\n");
double col = 1.0;
for (int bl = 0; bl < 11; bl++)
2891,8 → 2887,7
FPointArray textPath;
QPainterPath painter1, painter2;
QFont infoFont("Helvetica", 7);
double startX = markOffs + bleedLeft + 10.0;
double startY = markOffs - Options.markOffset - 14;
double startX = markOffs+bleedLeft+10.0;
QString docTitle = doc.documentInfo().title();
if (docTitle.isEmpty())
{
2903,7 → 2898,10
docTitle += " "+ tr("Page:")+" "+ QString::number(PgNr+1);
PutPage("/"+spotMapReg["Register"].ResName+" cs 1 scn\n");
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(startX)+" "+FToStr(startY)+" cm\n");
PutPage("1 0 0 1 "+FToStr(startX)+" 6 cm\n");
// PutPage("BT\n");
// PutPage("/"+StdFonts["/Helvetica"]+" 7 Tf\n");
// PutPage(EncString(docTitle, ObjCounter) + " Tj\nET\n");
painter1.addText( QPointF(0.0,0.0), infoFont, docTitle );
textPath.fromQPainterPath(painter1);
PutPage(SetClipPathArray(&textPath, true));
2912,7 → 2910,11
QDate d = QDate::currentDate();
QString docDate = tr("Date:")+" "+d.toString(Qt::TextDate);
PutPage("q\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 + 20.0)+" "+FToStr(startY)+" cm\n");
PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 + 20.0)+" 6 cm\n");
// PutPage("BT\n");
// PutPage("/"+StdFonts["/Helvetica"]+" 7 Tf\n");
// QDate d = QDate::currentDate();
// PutPage(EncString( tr("Date:")+" "+d.toString(Qt::TextDate), ObjCounter) + " Tj\nET\n");
painter2.addText( QPointF(0.0,0.0), infoFont, docDate );
textPath.fromQPainterPath(painter2);
PutPage(SetClipPathArray(&textPath, true));
3156,9 → 3158,7
bleedDisplacementY = 0.0;
PutPage("q\n"); // Save
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
markOffs = Options.markLength + Options.markOffset;
if ((Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
markOffs = qMax(markOffs, Options.markOffset + 20.0);
markOffs = 20.0 + Options.markOffset;
// #8773 - incorrect page position if MPageNam.isEmpty()
/*if (!pag->MPageNam.isEmpty())
{*/
/trunk/Scribus/scribus/pslib.cpp
420,7 → 420,7
return ret;
}
 
bool PSLib::PS_begin_doc(ScribusDoc *doc, double x, double y, double width, double height, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr)
bool PSLib::PS_begin_doc(ScribusDoc *doc, double x, double y, double breite, double hoehe, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr)
{
m_Doc = doc;
PutStream(Header);
428,16 → 428,16
PutStream("%%Title: " + Titel + "\n");
PutStream("%%Creator: " + Creator + "\n");
PutStream("%%Pages: " + IToStr(numpage) + "\n");
if(width < height || !psExport)
if(breite < hoehe || !psExport)
{
BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(width)) + " " + IToStr(qRound(height)) + "\n";
BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(width) + " " + ToStr(height) + "\n";
BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
}
else
{
BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(height)) + " " + IToStr(qRound(width)) + "\n";
BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(height) + " " + ToStr(width) + "\n";
BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(hoehe)) + " " + IToStr(qRound(breite)) + "\n";
BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(hoehe) + " " + ToStr(breite) + "\n";
}
// if (!Art)
// {
593,9 → 593,7
double bleedLeft = 0.0;
double markOffs = 0.0;
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
markOffs = Options.markLength + Options.markOffset;
if ((Options.registrationMarks) || (Options.colorMarks))
markOffs = qMax(markOffs, Options.markOffset + 20.0);
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;
652,10 → 650,7
PutStream("%%PageTrailer\nrestore\n");
double markOffs = 0.0;
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
markOffs = Options.markLength + Options.markOffset;
if ((Options.registrationMarks) || (Options.colorMarks))
markOffs = qMax(markOffs, Options.markOffset + 20.0);
double markDelta = markOffs - (Options.markLength + Options.markOffset);
markOffs = 20.0 + Options.markOffset;
double bleedRight, bleedLeft;
GetBleeds(ActPage, bleedLeft, bleedRight);
double maxBoxX = ActPage->width()+bleedLeft+bleedRight+markOffs*2.0;
674,32 → 669,32
if (Options.cropMarks)
{
// Bottom Left
PutStream(ToStr(markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutStream(ToStr(20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta)+" m\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta+Options.markLength)+" li\n");
PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
PutStream(ToStr(markOffs+bleedLeft)+" 20 li\n");
PutStream("st\n");
// Top Left
PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-20.0)+" li\n");
PutStream("st\n");
// Bottom Right
PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
PutStream("st\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta+Options.markLength) +" li\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(0.0)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(20.0)+" li\n");
PutStream("st\n");
// Top Right
PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
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("st\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
PutStream("st\n");
}
if (Options.bleedMarks)
707,55 → 702,54
PutStream("gs\n");
PutStream("[3 1 1 1] 0 setdash\n");
// Bottom Left
PutStream(ToStr(markDelta)+" "+ToStr(markOffs)+" m\n");
PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs)+" li\n");
PutStream("0 "+ToStr(markOffs)+" m\n");
PutStream(ToStr(20.0)+" "+ToStr(markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs)+" "+ToStr(markDelta)+" m\n");
PutStream(ToStr(markOffs)+" "+ToStr(markDelta+Options.markLength)+" li\n");
PutStream(ToStr(markOffs)+" 0 m\n");
PutStream(ToStr(markOffs)+" 20 l\n");
PutStream("st\n");
// Top Left
PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-markOffs)+" m\n");
PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-markOffs)+" li\n");
PutStream("0 "+ToStr(maxBoxY-markOffs)+" m\n");
PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-markDelta-Options.markLength)+" li\n");
PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY)+" m\n");
PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
PutStream("st\n");
// Bottom Right
PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs)+" m\n");
PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs)+" li\n");
PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs)+" m\n");
PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(markDelta)+" m\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(markDelta+Options.markLength)+" li\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(0.0)+" m\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(20.0)+" li\n");
PutStream("st\n");
// Top Right
PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-markOffs)+" m\n");
PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-markOffs)+" li\n");
PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-markOffs)+" m\n");
PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-markDelta-Options.markLength)+" li\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY)+" m\n");
PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
PutStream("st\n");
PutStream("gr\n");
}
if (Options.registrationMarks)
{
double regDelta = markOffs - Options.markOffset;
QString regCross = "0 7 m\n14 7 li\n7 0 m\n7 14 li\n13 7 m\n13 10.31383 10.31383 13 7 13 cu\n3.68629 13 1 10.31383 1 7 cu\n1 3.68629 3.68629 1 7 1 cu\n";
regCross += "10.31383 1 13 3.68629 13 7 cu\ncl\n10.5 7 m\n10.5 8.93307 8.93307 10.5 7 10.5 cu\n5.067 10.5 3.5 8.93307 3.5 7 cu\n";
regCross += "3.5 5.067 5.067 3.5 7 3.5 cu\n8.93307 3.5 10.5 5.067 10.5 7 cu\ncl\nst\n";
PutStream("gs\n");
PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(regDelta - 17)+" tr\n");
PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" 3 tr\n");
PutStream(regCross);
PutStream("gr\n");
PutStream("gs\n");
PutStream(ToStr(regDelta - 17)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
PutStream("3 "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
PutStream(regCross);
PutStream("gr\n");
PutStream("gs\n");
PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(maxBoxY - regDelta + 3.0)+" tr\n");
PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(maxBoxY - 17.0)+" tr\n");
PutStream(regCross);
PutStream("gr\n");
PutStream("gs\n");
PutStream(ToStr(maxBoxX - regDelta + 3.0)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
PutStream(ToStr(maxBoxX - 17.0)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
PutStream(regCross);
PutStream("gr\n");
}
762,7 → 756,7
if (Options.colorMarks)
{
double startX = markOffs+bleedLeft+6.0;
double startY = maxBoxY - markOffs + Options.markOffset + 2.0;
double startY = maxBoxY - 18.0;
PutStream("0 0 0 1 cmyk\n");
double col = 1.0;
for (int bl = 0; bl < 11; bl++)
/trunk/Scribus/scribus/scpageoutput.h
37,7 → 37,6
public:
MarksOptions(void);
MarksOptions(struct PrintOptions& opt);
double markLength;
double markOffset;
double BleedTop;
double BleedLeft;
89,7 → 88,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 , double markSize);
virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset );
virtual void drawRegistrationCross( ScPainterExBase* painter );
 
ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);
/trunk/Scribus/scribus/scpageoutput.cpp
38,7 → 38,6
 
MarksOptions::MarksOptions(void)
{
markLength = 20.0;
markOffset = 0.0;
BleedTop = 0.0;
BleedLeft = 0.0;
53,7 → 52,6
 
MarksOptions::MarksOptions(struct PrintOptions& opt)
{
markLength = opt.markLength;
markOffset = opt.markOffset;
BleedTop = opt.bleeds.Top;
BleedLeft = opt.bleeds.Left;
1909,8 → 1907,7
 
void ScPageOutput::drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options )
{
double markLength = options.markLength;
double markOffs = options.markOffset;
double markOffs = options.markOffset;
double bleedLeft = 0.0, bleedRight = 0.0;
double bleedBottom = options.BleedBottom;
double bleedTop = options.BleedTop;
1946,7 → 1943,7
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, markLength);
drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
}
if (options.bleedMarks)
{
1953,7 → 1950,7
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, markLength);
drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
}
if (options.registrationMarks)
{
2035,7 → 2032,7
painter->restore();
}
 
void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize)
void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset )
{
FPoint start, end;
double left = box.left(), right = box.right();
2044,31 → 2041,31
double bleedBottom = bleedBox.bottom(), bleedTop = bleedBox.top();
// Top Left
start.setXY( bleedLeft - offset, top );
end.setXY ( bleedLeft - offset - markSize, top );
end.setXY ( bleedLeft - offset - 20, top );
painter->drawLine(start, end);
start.setXY( left, bleedTop - offset );
end.setXY ( left, bleedTop - offset - markSize);
end.setXY ( left, bleedTop - offset - 20);
painter->drawLine(start, end);
// Top Right
start.setXY( bleedRight + offset, top );
end.setXY ( bleedRight + offset + markSize, top );
end.setXY ( bleedRight + offset + 20, top );
painter->drawLine(start, end);
start.setXY( right, bleedTop - offset );
end.setXY ( right, bleedTop - offset - markSize);
end.setXY ( right, bleedTop - offset - 20);
painter->drawLine(start, end);
// Bottom Left
start.setXY( bleedLeft - offset, bottom );
end.setXY ( bleedLeft - offset - markSize, bottom );
end.setXY ( bleedLeft - offset - 20, bottom );
painter->drawLine(start, end);
start.setXY( left, bleedBottom + offset );
end.setXY ( left, bleedBottom + offset + markSize);
end.setXY ( left, bleedBottom + offset + 20);
painter->drawLine(start, end);
// Bottom Right
start.setXY( bleedRight + offset, bottom );
end.setXY ( bleedRight + offset + markSize, bottom );
end.setXY ( bleedRight + offset + 20, bottom );
painter->drawLine(start, end);
start.setXY( right, bleedBottom + offset );
end.setXY ( right, bleedBottom + offset + markSize);
end.setXY ( right, bleedBottom + offset + 20);
painter->drawLine(start, end);
}
 
/trunk/Scribus/scribus/scribusstructs.h
231,7 → 231,6
bool includePDFMarks;
int copies;
PrintEngine prnEngine;
double markLength;
double markOffset;
MarginStruct bleeds;
std::vector<int> pageNumbers;
387,3 → 386,5
 
#endif
 
 
 
/trunk/Scribus/scribus/pslib.h
81,7 → 81,7
 
virtual bool PS_set_file(QString fn);
virtual void PS_set_Info(QString art, QString was);
virtual bool PS_begin_doc(ScribusDoc *doc, double x, double y, double width, double height, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr);
virtual bool PS_begin_doc(ScribusDoc *doc, double x, double y, double breite, double hoehe, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr);
virtual void PS_begin_page(ScPage* pg, MarginStruct* Ma, bool Clipping);
virtual void PS_end_page();
virtual void PS_curve(double x1, double y1, double x2, double y2, double x3, double y3);
/trunk/Scribus/scribus/pdfoptions.h
154,7 → 154,6
bool colorMarks;
bool docInfoMarks;
bool useDocBleeds;
double markLength;
double markOffset;
QString openAction;
};