r24010 by jghali - Preparation for PDF-based printing support: move print preview generation code out of print preview dialog

scribus-commit scribus-commit at lists.scribus.net
Sat Sep 12 20:59:12 UTC 2020


Author: jghali
Date: Sat Sep 12 20:59:12 2020
New Revision: 24010

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24010
Log:
Preparation for PDF-based printing support: move print preview generation code out of print preview dialog

Added:
    trunk/Scribus/scribus/printpreviewcreator.cpp
    trunk/Scribus/scribus/printpreviewcreator.h
    trunk/Scribus/scribus/printpreviewcreator_gdi.cpp
    trunk/Scribus/scribus/printpreviewcreator_gdi.h
    trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
    trunk/Scribus/scribus/printpreviewcreator_pdf.h
    trunk/Scribus/scribus/printpreviewcreator_ps.cpp
    trunk/Scribus/scribus/printpreviewcreator_ps.h
    trunk/Scribus/scribus/printpreviewcreatorfactory.cpp
    trunk/Scribus/scribus/printpreviewcreatorfactory.h
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
    trunk/Scribus/scribus/scprintengine_gdi.cpp
    trunk/Scribus/scribus/scprintengine_pdf.h
    trunk/Scribus/scribus/scprintengine_ps.cpp
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
    trunk/Scribus/scribus/ui/outputpreview_ps.cpp
    trunk/Scribus/scribus/ui/outputpreview_ps.h
    trunk/Scribus/scribus/ui/printdialog.cpp
    trunk/Scribus/scribus/ui/printpreview.cpp
    trunk/Scribus/scribus/ui/printpreview.h
    trunk/Scribus/scribus/util_printer.cpp
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
    trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
    trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sat Sep 12 20:59:12 2020
@@ -707,6 +707,10 @@
 	prefsmanager.cpp
 	prefsreader.cpp
 	prefstable.cpp
+	printpreviewcreator.cpp
+	printpreviewcreator_pdf.cpp
+	printpreviewcreator_ps.cpp
+	printpreviewcreatorfactory.cpp
 	pslib.cpp
 	qtiocompressor.cpp
 	rawimage.cpp
@@ -1106,6 +1110,7 @@
 if(WIN32)
 	set(SCRIBUS_MOC_WIN32_ONLY_CLASSES scprintengine_gdi.h)
 	set(SCRIBUS_WIN32_ONLY_SOURCES
+		printpreviewcreator_gdi.cpp
 		scpainterex_cairo.cpp
 		scprintengine_gdi.cpp
 		)

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Sat Sep 12 20:59:12 2020
@@ -1111,8 +1111,8 @@
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
 	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("PSLevel", (int) ((m_Doc->Print_Options.prnEngine < PrintEngine::WindowsGDI) ? m_Doc->Print_Options.prnEngine : PrintEngine::PostScript3));
+	docu.writeAttribute("PrintEngine" , (int) 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());

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	Sat Sep 12 20:59:12 2020
@@ -469,7 +469,7 @@
 		return nullptr;
 	}
 
-	if (options.prnEngine == PostScript1 || options.prnEngine == PostScript2)
+	if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
 	{
 		if (ScCore->haveGS())
 		{
@@ -477,7 +477,7 @@
 			QStringList opts;
 			opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(currentDoc->pageWidth())) );
 			opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(currentDoc->pageHeight())) );
-			convertPS2PS(fna, fna+".tmp", opts, options.prnEngine);
+			convertPS2PS(fna, fna + ".tmp", opts, (int) options.prnEngine);
 			moveFile( fna + ".tmp", fna );
 		}
 		else

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp	Sat Sep 12 20:59:12 2020
@@ -469,7 +469,7 @@
 		return nullptr;
 	}
 
-	if (options.prnEngine == PostScript1 || options.prnEngine == PostScript2)
+	if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
 	{
 		if (ScCore->haveGS())
 		{
@@ -477,7 +477,7 @@
 			QStringList opts;
 			opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(currentDoc->pageWidth())) );
 			opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(currentDoc->pageHeight())) );
-			convertPS2PS(fna, fna+".tmp", opts, options.prnEngine);
+			convertPS2PS(fna, fna + ".tmp", opts, (int) options.prnEngine);
 			moveFile( fna + ".tmp", fna );
 		}
 		else

Modified: trunk/Scribus/scribus/scprintengine_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/scprintengine_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_gdi.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_gdi.cpp	Sat Sep 12 20:59:12 2020
@@ -216,7 +216,7 @@
 	// Test printer for PostScript support and
 	// choose appropriate page printing function
 	bool psPrint  = isPostscriptPrinter(printerDC);
-	bool useGDI   = (!psPrint || m_forceGDI || (options.prnEngine == WindowsGDI));
+	bool useGDI   = (!psPrint || m_forceGDI || (options.prnEngine == PrintEngine::WindowsGDI));
 	printPageFunc = (useGDI) ? &ScPrintEngine_GDI::printPage_GDI : &ScPrintEngine_GDI::printPage_PS;
 
 	// Setup document infos structure
@@ -442,7 +442,7 @@
 	delete dd;
 	if (ret != 0) return false;
 
-	if (options.prnEngine == PostScript1 || options.prnEngine == PostScript2)
+	if (options.prnEngine == PrintEngine::PostScript1 || options.prnEngine == PrintEngine::PostScript2)
 	{
 		QString tmp;
 		QStringList opts;
@@ -451,7 +451,7 @@
 		opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(m_doc.pageHeight())));
 		if (QFile::exists(tempFilePath2))
 			QFile::remove(tempFilePath2);
-		ret = convertPS2PS(tempFilePath, tempFilePath2, opts, options.prnEngine);
+		ret = convertPS2PS(tempFilePath, tempFilePath2, opts, (int) options.prnEngine);
 		if (ret == 0)
 		{
 			QFile::remove(tempFilePath);

Modified: trunk/Scribus/scribus/scprintengine_pdf.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/scprintengine_pdf.h
==============================================================================
--- trunk/Scribus/scribus/scprintengine_pdf.h	(original)
+++ trunk/Scribus/scribus/scprintengine_pdf.h	Sat Sep 12 20:59:12 2020
@@ -12,6 +12,8 @@
 
 class ScPrintEngine_PDF : public ScPrintEngine
 {
+	friend class PrintPreviewCreator_PDF;
+
 public:
 	ScPrintEngine_PDF(ScribusDoc& doc);
 	~ScPrintEngine_PDF() {}

Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp	Sat Sep 12 20:59:12 2020
@@ -42,14 +42,14 @@
 		m_errorMessage = dd->errorMessage();
 		return false;
 	}
-	if (options.prnEngine != PostScript3 && ScCore->haveGS())
+	if (options.prnEngine != PrintEngine::PostScript3 && ScCore->haveGS())
 	{
 		// use gs to convert our PS to a lower version
 		QString tmp;
 		QStringList opts;
 		opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(m_doc.pageWidth())) );
 		opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(m_doc.pageHeight())) );
-		convertPS2PS(filename, filename + ".tmp", opts, options.prnEngine);
+		convertPS2PS(filename, filename + ".tmp", opts, (int) options.prnEngine);
 		moveFile(filename + ".tmp", filename);
 	}
 	if (options.toFile)

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h	(original)
+++ trunk/Scribus/scribus/scribusstructs.h	Sat Sep 12 20:59:12 2020
@@ -212,12 +212,13 @@
 	int menuPos;
 };
 
-enum PrintEngine
+enum class PrintEngine
 {
 	PostScript1 = 1,
 	PostScript2 = 2,
 	PostScript3 = 3,
-	WindowsGDI  = 4
+	WindowsGDI  = 4,
+	PDF         = 5
 };
 typedef QMap<QString, PrintEngine> PrintEngineMap;
 
@@ -241,7 +242,7 @@
 	bool colorMarks { false };
 	bool includePDFMarks { true };
 	int  copies { 1 };
-	PrintEngine prnEngine { PostScript3 };
+	PrintEngine prnEngine { PrintEngine::PostScript3 };
 	double markLength { 20.0 };
 	double markOffset { 0.0 };
 	MarginStruct bleeds;

Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.cpp	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.cpp	Sat Sep 12 20:59:12 2020
@@ -59,7 +59,7 @@
 		QStringList spots = usedSpots.keys();
 
 		m_inkMax = (spots.count() + 4) * 255;
-		m_optionsUi->coverThresholdValue->setMaximum(m_inkMax * 100.0);
+		m_optionsUi->coverThresholdValue->setMaximum((spots.count() + 4) * 100.0);
 
 		m_optionsUi->inkTable->setColumnCount(2);
 		m_optionsUi->inkTable->setRowCount(4 + spots.count());
@@ -205,6 +205,8 @@
 
 	connect(m_optionsUi->antiAliasing, SIGNAL(clicked()), this, SLOT(redisplay()));
 	connect(m_optionsUi->showTransparency, SIGNAL(clicked()), this, SLOT(redisplay()));
+
+	connect(m_optionsUi->coverThresholdValue, SIGNAL(valueChanged(double)), this, SLOT(toggleCMYK_Colour()));
 }
 
 OutputPreview_PDF::~OutputPreview_PDF()

Modified: trunk/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.cpp	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.cpp	Sat Sep 12 20:59:12 2020
@@ -66,7 +66,7 @@
 		QStringList spots = usedSpots.keys();
 
 		m_inkMax = (spots.count() + 4) * 255;
-		m_optionsUi->coverThresholdValue->setMaximum(m_inkMax * 100.0);
+		m_optionsUi->coverThresholdValue->setMaximum((spots.count() + 4) * 100.0);
 
 		m_optionsUi->inkTable->setColumnCount(2);
 		m_optionsUi->inkTable->setRowCount(4 + spots.count());
@@ -189,7 +189,7 @@
 
 	if (m_printOptions.firstUse)
 		PrinterUtil::getDefaultPrintOptions(m_printOptions, m_doc->bleedsVal());
-	m_printOptions.prnEngine = PostScript3;
+	m_printOptions.prnEngine = PrintEngine::PostScript3;
 	m_printOptions.outputSeparations = false;
 	m_printOptions.separationName = "All";
 	m_printOptions.allSeparations = QStringList();
@@ -227,6 +227,8 @@
 
 	connect(m_optionsUi->antiAliasing, SIGNAL(clicked()), this, SLOT(redisplay()));
 	connect(m_optionsUi->showTransparency, SIGNAL(clicked()), this, SLOT(redisplay()));
+
+	connect(m_optionsUi->coverThresholdValue, SIGNAL(valueChanged(double)), this, SLOT(toggleCMYK_Colour()));
 }
 
 OutputPreview_PS::~OutputPreview_PS()
@@ -575,7 +577,7 @@
 	delete psLib;
 
 	// TODO : Postscript level < 3
-	if (success && (m_printOptions.prnEngine != PostScript3))
+	if (success && (m_printOptions.prnEngine != PrintEngine::PostScript3))
 	{
 		// use gs to convert our PS to a lower version
 		QStringList opts;
@@ -588,7 +590,7 @@
 		opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(QString::number(pageHeight)) );
 
 		QString outFileName = ScPaths::tempFileDir() + "/"  + m_tempBaseName + ".ps" + QString::number((int) m_printOptions.prnEngine);
-		success = (convertPS2PS(psFileName, outFileName, opts, m_printOptions.prnEngine) == 0);
+		success = (convertPS2PS(psFileName, outFileName, opts, (int) m_printOptions.prnEngine) == 0);
 		if (!success)
 			return false;
 		success &= QFile::remove(psFileName);

Modified: trunk/Scribus/scribus/ui/outputpreview_ps.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/outputpreview_ps.h
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.h	(original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.h	Sat Sep 12 20:59:12 2020
@@ -54,7 +54,7 @@
 	bool m_haveTiffSep { false };
 	int  m_gsVersion { 0 };
 
-	// PDF export options
+	// PS export options
 	int  m_psLevel;
 	int  m_colorOutputMode { 0 };
 	bool m_cmykPreviewMode { false };

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp	Sat Sep 12 20:59:12 2020
@@ -310,7 +310,7 @@
 
 void PrintDialog::selectEngine(const QString& eng)
 {
-	prefs->set("CurrentPrnEngine", m_printEngineMap[printEngines->currentText()]);
+	prefs->set("CurrentPrnEngine", (int) m_printEngineMap[printEngines->currentText()]);
 	bool psSupported = outputToFile();
 	psSupported |= (eng == CommonStrings::trPostScript1);
 	psSupported |= (eng == CommonStrings::trPostScript2);
@@ -365,7 +365,7 @@
 	refreshPrintEngineBox();
 
 	prefs->set("CurrentPrn", prn);
-	prefs->set("CurrentPrnEngine", m_printEngineMap[printEngines->currentText()]);
+	prefs->set("CurrentPrnEngine", (int) m_printEngineMap[printEngines->currentText()]);
 	
 	bool ps1Supported = m_printEngineMap.contains(CommonStrings::trPostScript1);
 	bool ps2Supported = m_printEngineMap.contains(CommonStrings::trPostScript2);
@@ -727,7 +727,7 @@
 		printEngines->setCurrentIndex(itemIndex);
 	else if (printEngines->count() > 0)
 	{
-		pdlString = m_printEngineMap.key(PostScript3, "");
+		pdlString = m_printEngineMap.key(PrintEngine::PostScript3, "");
 		itemIndex = printEngines->findText(pdlString);
 		if (itemIndex >= 0)
 			printEngines->setCurrentIndex(itemIndex);

Modified: trunk/Scribus/scribus/ui/printpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/printpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.cpp	(original)
+++ trunk/Scribus/scribus/ui/printpreview.cpp	Sat Sep 12 20:59:12 2020
@@ -55,6 +55,8 @@
 #include "prefsfile.h"
 #include "prefsmanager.h"
 #include "prefstable.h"
+#include "printpreviewcreator.h"
+#include "printpreviewcreatorfactory.h"
 #include "pslib.h"
 #include "sccolor.h"
 #include "sccolorengine.h"
@@ -92,6 +94,8 @@
 	havePngAlpha = ScCore->havePNGAlpha();
 	haveTiffSep  = postscriptPreview ? ScCore->haveTIFFSep() : false;
 	getNumericGSVersion(m_gsVersion);
+
+	m_previewCreator = PrintPreviewCreatorFactory::create(docu, postscriptPreview ? PrintEngine::PostScript3 : PrintEngine::WindowsGDI);
 
 	PLayout = new QVBoxLayout(this);
 	PLayout->setMargin(0);
@@ -134,8 +138,7 @@
 		doc->getUsedColors(usedSpots, true);
 		QStringList spots = usedSpots.keys();
 
-		inkTable = new QTableWidget(spots.count()+4, 2, devTitle );
-		m_inkMax = (spots.count() + 4) * 255;
+		inkTable = new QTableWidget(spots.count() + 4, 2, devTitle );
 		inkTable->setHorizontalHeaderItem(0, new QTableWidgetItem(IconManager::instance().loadIcon("16/show-object.png"), ""));
 		inkTable->setHorizontalHeaderItem(1, new QTableWidgetItem( tr("Separation Name")));
 		QHeaderView *header = inkTable->horizontalHeader();
@@ -292,7 +295,7 @@
 	setValues();
 	previewLabel = new QLabel(this);
 	previewLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-	previewLabel->setPixmap(CreatePreview(doc->currentPage()->pageNr(), 72));
+	previewLabel->setPixmap(createPreview(doc->currentPage()->pageNr(), 72));
 	previewLabel->resize(previewLabel->pixmap()->size());
 	previewArea->setWidget(previewLabel);
 	int w = previewLabel->width() + tbWidth + 50;
@@ -340,6 +343,12 @@
 		for (uint i = 0; i < d.count(); i++)
 			QFile::remove(tempFileDir + "/" + d[i]);
 	}
+
+	if (m_previewCreator)
+	{
+		delete m_previewCreator;
+		m_previewCreator = nullptr;
+	}
 }
 
 void PrintPreview::setValues()
@@ -375,14 +384,14 @@
 	int n = num-1;
 	if (n == m_currentPage)
 		return;
-	QPixmap previewPix = CreatePreview(n, qRound(72 * scaleFactor));
+	QPixmap previewPix = createPreview(n, qRound(72 * scaleFactor));
 	previewLabel->setPixmap(previewPix);
 	previewLabel->resize(previewPix.size());
 }
 
 void PrintPreview::redisplay()
 {
-	QPixmap previewPix = CreatePreview(m_currentPage, qRound(72 * scaleFactor));
+	QPixmap previewPix = createPreview(m_currentPage, qRound(72 * scaleFactor));
 	previewLabel->setPixmap(previewPix);
 	previewLabel->resize(previewPix.size());
 }
@@ -410,7 +419,7 @@
 			coverThresholdValue->setEnabled(false);
 	}
 	if (enableCMYK->isChecked())
-		previewLabel->setPixmap(CreatePreview(m_currentPage, qRound(72 * scaleFactor)));
+		previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
 	previewLabel->resize(previewLabel->pixmap()->size());
 }
 
@@ -424,7 +433,7 @@
 	((QCheckBox*)(inkTable->cellWidget(row, 0)))->setChecked(true);
 
 	if (enableCMYK->isChecked())
-		previewLabel->setPixmap(CreatePreview(m_currentPage, qRound(72 * scaleFactor)));
+		previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
 	previewLabel->resize(previewLabel->pixmap()->size());
 }
 
@@ -437,7 +446,7 @@
 		sepIt.value()->setChecked(true);
 
 	if (enableCMYK->isChecked())
-		previewLabel->setPixmap(CreatePreview(m_currentPage, qRound(72 * scaleFactor)));
+		previewLabel->setPixmap(createPreview(m_currentPage, qRound(72 * scaleFactor)));
 	previewLabel->resize(previewLabel->pixmap()->size());
 }
 
@@ -473,37 +482,17 @@
 	redisplay();
 }
 
-int PrintPreview::RenderPreview(int pageIndex, int res)
+QPixmap PrintPreview::createPreview(int pageIndex, int res)
 {
 	int ret = -1;
-	QString cmd1;
-#if defined _WIN32
-	if (!postscriptPreview)
-	{
-		QImage image;
-		ScPage* page;
-		ScPrintEngine_GDI winPrint(*doc);
-		PrintOptions options;
-		page = doc->Pages->at(pageIndex);
-		options.copies = 1;
-		options.doGCR = false;
-		options.mirrorH = mirrorHor->isChecked();
-		options.mirrorV = mirrorVert->isChecked();
-		options.outputSeparations = false;
-		options.pageNumbers.push_back(pageIndex);
-		options.prnEngine = WindowsGDI;
-		options.separationName = "All";
-		options.toFile = false;
-		options.useColor = !useGray->isChecked();
-		options.useSpotColors = false;
-		bool done = winPrint.gdiPrintPreview(page, &image, options, res / 72.0);
-		if (done)
-			image.save( ScPaths::tempFileDir() + "/sc.png", "PNG" );
-		return (done ? 0 : 1);
-	}
-#endif
-	// Recreate Postscript-File only when the actual Page has changed
-	if ((pageIndex != m_currentPage)  || (enableGCR->isChecked() != m_useGCR)  || (useGray->isChecked() != m_useGray)
+	QPixmap pixmap;
+	double b = doc->Pages->at(pageIndex)->width() * res / 72.0;
+	double h = doc->Pages->at(pageIndex)->height() * res / 72.0;
+
+	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
+
+	// Recreate Postscript-File only when necessary
+	if ((pageIndex != m_currentPage)  || (enableGCR->isChecked() != m_useGCR) || (useGray->isChecked() != m_useGray)
 		|| (mirrorHor->isChecked() != m_mirrorH) || (mirrorVert->isChecked() != m_mirrorV) || (clipMargins->isChecked() != m_clipToMargins)
 		|| (spotColors->isChecked() != m_convertSpots))
 	{
@@ -527,611 +516,32 @@
 		options.markLength = 20.0;
 		options.markOffset = 0.0;
 		options.bleeds.set(0, 0, 0, 0);
-		PSLib *dd = new PSLib(doc, options, PSLib::OutputPS, &doc->PageColors);
-		if (!dd)
-			return ret;
-		ret = dd->createPS(ScPaths::tempFileDir() + "/tmp.ps");
-		delete dd;
-		if (ret != 0) return 1;
-	}
-	QStringList args;
-	QString tmp, tmp2, tmp3;
-	double b = doc->Pages->at(pageIndex)->width() * res / 72.0;
-	double h = doc->Pages->at(pageIndex)->height() * res / 72.0;
-	if (doc->Pages->at(pageIndex)->orientation() == 1)
-		std::swap(b, h);
-	args.append( "-q" );
-	args.append( "-dNOPAUSE" );
-	args.append( "-dPARANOIDSAFER" );
-	args.append( QString("-r%1").arg(tmp.setNum(res)) );
-	args.append( QString("-g%1x%2").arg(tmp2.setNum(qRound(b)), tmp3.setNum(qRound(h))) );
-	if (enableCMYK->isChecked())
-	{
-		if (haveTiffSep)
-			args.append( "-sDEVICE=tiffsep" );
-		else
-			return 1;
-	}
-	else
-	{
-		if (showTransparency->isChecked() && havePngAlpha)
-			args.append("-sDEVICE=pngalpha");
-		else
-			args.append("-sDEVICE=tiff24nc");	
-	}
-	if (antiAliasing->isChecked())
-	{
-		args.append( "-dTextAlphaBits=4" );
-		args.append( "-dGraphicsAlphaBits=4" );
-	}
-	if ((doc->HasCMS) && (m_gsVersion >= 900))
-	{
-		args.append("-sDefaultCMYKProfile=" + QDir::toNativeSeparators(doc->DocPrinterProf.profilePath()));
-		if (enableCMYK->isChecked())
-			args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(doc->DocPrinterProf.profilePath()));
-		else
-			args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(doc->DocDisplayProf.profilePath()));
-	}
-	else if (ScCore->haveCMS() && (m_gsVersion >= 900))
-	{
-		args.append("-sDefaultCMYKProfile=" + QDir::toNativeSeparators(ScCore->defaultCMYKProfile.profilePath()));
-		if (enableCMYK->isChecked())
-			args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(ScCore->defaultCMYKProfile.profilePath()));
-		else
-			args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(ScCore->defaultRGBProfile.profilePath()));
-	}
-	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = prefsManager.prefsFile->getContext("Fonts");
-	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
-	const char sep = ScPaths::envPathSeparator;
-	if (extraFonts->getRowCount() >= 1)
-		cmd1 = QString("-sFONTPATH=%1").arg(QDir::toNativeSeparators(extraFonts->get(0,0)));
-	for (int i = 1; i < extraFonts->getRowCount(); ++i)
-		cmd1 += QString("%1%2").arg(sep).arg(QDir::toNativeSeparators(extraFonts->get(i,0)));
-	if (!cmd1.isEmpty())
-		args.append( cmd1 );
-	// then add any final args and call gs
-	if (enableCMYK->isChecked())
-		args.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sc.tif")) );
-	else if ((showTransparency->isChecked() && havePngAlpha) || !postscriptPreview)
-		args.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sc.png")) );
-	else
-		args.append(QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sc.tif")));
-	args.append( QDir::toNativeSeparators(ScPaths::tempFileDir() + "/tmp.ps") );
-	args.append( "-c" );
-	args.append( "showpage" );
-	args.append( "-c" );
-	args.append( "quit" );
-	ret = System(getShortPathName(prefsManager.ghostscriptExecutable()), args);
-	return ret;
-}
-
-int PrintPreview::RenderPreviewSep(int pageIndex, int res)
-{
-	int ret = -1;
-	QString cmd;
-	QStringList args, args1, args2, args3;
-	// Recreate Postscript-File only when the actual Page has changed
-	if ((pageIndex != m_currentPage)  || (enableGCR->isChecked() != m_useGCR) || (useGray->isChecked() != m_useGray)
-		|| (mirrorHor->isChecked() != m_mirrorH) || (mirrorVert->isChecked() != m_mirrorV) || (clipMargins->isChecked() != m_clipToMargins)
-		|| (spotColors->isChecked() != m_convertSpots))
-	{
-		PrintOptions options;
-		options.pageNumbers.push_back(pageIndex + 1);
-		options.outputSeparations = false;
-		options.separationName = "All";
-		options.allSeparations = QStringList();
-		options.useSpotColors = !spotColors->isChecked();
-		options.useColor = !useGray->isChecked();
-		options.mirrorH = mirrorHor->isChecked();
-		options.mirrorV = mirrorVert->isChecked();
-		options.doGCR = enableGCR->isChecked();
-		options.setDevParam = false;
-		options.doClip = clipMargins->isChecked();
-		options.cropMarks = false;
-		options.bleedMarks = false;
-		options.registrationMarks = false;
-		options.colorMarks = false;
-		options.includePDFMarks = false;
-		options.markLength = 20.0;
-		options.markOffset = 0.0;
-		options.bleeds.set(0, 0, 0, 0);
-		PSLib *dd = new PSLib(doc, options, PSLib::OutputPS, &doc->PageColors);
-		if (!dd)
-			return -1;
-		ret = dd->createPS(ScPaths::tempFileDir() + "/tmp.ps");
-		delete dd;
-		if (ret != 0) return 1;
-	}
-	QString tmp, tmp2, tmp3;
-	double b = doc->Pages->at(pageIndex)->width() * res / 72.0;
-	double h = doc->Pages->at(pageIndex)->height() * res / 72.0;
-	if (doc->Pages->at(pageIndex)->orientation() == 1)
-		std::swap(b, h);
-
-	args1.append( "-q" );
-	args1.append( "-dNOPAUSE" );
-	args1.append( "-dPARANOIDSAFER" );
-	args1.append( QString("-r%1").arg(tmp.setNum(res)) );
-	args1.append( QString("-g%1x%2").arg(tmp2.setNum(qRound(b)), tmp3.setNum(qRound(h))) );
-	if (antiAliasing->isChecked())
-	{
-		args1.append("-dTextAlphaBits=4");
-		args1.append("-dGraphicsAlphaBits=4");
-	}
-	if ((doc->HasCMS) && (m_gsVersion >= 900))
-	{
-		args1.append("-sDefaultCMYKProfile=" + QDir::toNativeSeparators(doc->DocPrinterProf.profilePath()));
-		args1.append("-sOutputICCProfile=" + QDir::toNativeSeparators(doc->DocPrinterProf.profilePath()));
-	}
-	else if (ScCore->haveCMS() && (m_gsVersion >= 900))
-	{
-		args.append("-sDefaultCMYKProfile=" + QDir::toNativeSeparators(ScCore->defaultCMYKProfile.profilePath()));
-		args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(ScCore->defaultCMYKProfile.profilePath()));
-	}
-	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = prefsManager.prefsFile->getContext("Fonts");
-	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
-	const char sep = ScPaths::envPathSeparator;
-	if (extraFonts->getRowCount() >= 1)
-		cmd = QString("-sFONTPATH=%1").arg(QDir::toNativeSeparators(extraFonts->get(0,0)));
-	for (int i = 1; i < extraFonts->getRowCount(); ++i)
-		cmd += QString("%1%2").arg(sep).arg(QDir::toNativeSeparators(extraFonts->get(i,0)));
-	if (!cmd.isEmpty())
-		args1.append(cmd);
-	args1.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sc.tif")) );
-
-	args2.append( QDir::toNativeSeparators(ScPaths::tempFileDir() + "/tmp.ps") );
-	args2.append("-c");
-	args2.append("quit");
-
-	ColorList usedSpots;
-	doc->getUsedColors(usedSpots, true);
-	QStringList spots = usedSpots.keys();
-	args3.append( "-sDEVICE=tiffsep" );
-
-//	args3.append( "-c" );
-	cmd = "<< /SeparationColorNames ";
-	QString allSeps ="[ /Cyan /Magenta /Yellow /Black ";
-	for (int sp = 0; sp < spots.count(); ++sp)
-	{
-		allSeps += "(" + spots[sp] + ") ";
-	}
-	allSeps += "]";
-	cmd += allSeps + " /SeparationOrder [ /Cyan /Magenta /Yellow /Black] >> setpagedevice";
-	QFile fx(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sep.ps"));
-	if (fx.open(QIODevice::WriteOnly))
-	{
-		QTextStream tsx(&fx);
-		tsx << cmd;
-		fx.close();
-	}
-//	args3.append("-f");
-//	args3.append(QDir::toNativeSeparators(ScPaths::getTempFileDir() + "/sep.ps"));
-//	args3.append(cmd);
-
-//	args3.append("-f");
-	QString gsExe(getShortPathName(prefsManager.ghostscriptExecutable()));
-	ret = System(gsExe, args1 + args3 + args2, ScPaths::tempFileDir() + "/sc.tif.txt" );
-
-	QFile sepInfo(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sc.tif.txt"));
-	sepsToFileNum.clear();
-	if (sepInfo.open(QIODevice::ReadOnly))
-	{
-		QString Sname;
-		QTextStream tsC(&sepInfo);
-		int counter = 0;
-		while (!tsC.atEnd())
+		m_previewCreator->setPrintOptions(options);
+	}
+
+	m_previewCreator->setPreviewResolution(res);
+	m_previewCreator->setAntialisingEnabled(antiAliasing->isChecked());
+	m_previewCreator->setShowTransparency(showTransparency->isChecked());
+	
+	SeparationPreviewCreator* sepPreviewCreator = dynamic_cast<SeparationPreviewCreator*>(m_previewCreator);
+	if (sepPreviewCreator)
+	{
+		sepPreviewCreator->setSeparationPreviewEnabled(enableCMYK->isChecked());
+		sepPreviewCreator->setShowInkCoverage(enableInkCover->isChecked());
+		sepPreviewCreator->setInkCoverageThreshold(coverThresholdValue->value());
+
+		QStringList separationNames = sepPreviewCreator->separationNames();
+		for (int i = 0; i < separationNames.count(); ++i)
 		{
-			Sname = tsC.readLine();
-			QString tt = Sname.remove("%%SeparationName:").trimmed();
-			if (!tt.isEmpty())
-			{
-				sepsToFileNum.insert(tt, counter);
-				counter++;
-			}
+			const QString& separationName = separationNames.at(i);
+			const QCheckBox* checkBox = flagsVisible.value(separationName, nullptr);
+			if (checkBox)
+				sepPreviewCreator->setSeparationVisible(separationName, checkBox->isChecked());
 		}
 	}
-	sepInfo.close();
-	QString currSeps = "";
-	uint spc = 0;
-	for (int sp = 0; sp < spots.count(); ++sp)
-	{
-		currSeps += "("+spots[sp]+") ";
-		spc++;
-		if (sp > 6)
-		{
-			args3.clear();
-			args3.append("-sDEVICE=tiffsep");
-			QFile fx(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sep.ps"));
-			if (fx.open(QIODevice::WriteOnly))
-			{
-				QTextStream tsx(&fx);
-				tsx << QString("<< /SeparationColorNames " + allSeps + " /SeparationOrder [ " + currSeps + " ] >> setpagedevice");
-				fx.close();
-			}
-			args3.append("-f");
-			args3.append(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sep.ps"));
-	//		args3.append("-c");
-	//		args3.append("<< /SeparationColorNames "+allSeps+" /SeparationOrder [ "+currSeps+" ] >> setpagedevice");
-	//		args3.append("-f");
-			ret = System(gsExe, args1 + args3 + args2);
-			currSeps = "";
-			spc = 0;
-		}
-	}
-	if (spc != 0)
-	{
-		args3.clear();
-		args3.append("-sDEVICE=tiffsep");
-		QFile fx(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sep.ps"));
-		if (fx.open(QIODevice::WriteOnly))
-		{
-			QTextStream tsx(&fx);
-			tsx << QString("<< /SeparationColorNames " + allSeps+" /SeparationOrder [ " + currSeps + " ] >> setpagedevice");
-			fx.close();
-		}
-		args3.append("-f");
-		args3.append(QDir::toNativeSeparators(ScPaths::tempFileDir() + "/sep.ps"));
-	//	args3.append("-c");
-	//	args3.append("<< /SeparationColorNames "+allSeps+" /SeparationOrder [ "+currSeps+" ] >> setpagedevice");
-	//	args3.append("-f");
-		ret = System(gsExe, args1 + args3 + args2);
-	}
-	return ret;
-}
-
-// this should move to scimage.cpp!
-void PrintPreview::blendImages(QImage &target, ScImage &scsource, ScColor col)
-{
-	QImage source = scsource.qImage(); // FIXME: this will not work once qImage always returns ARGB!
-	
-	//FIXME: if source and target have different sizesomething went wrong.
-	// eg. loadPicture() failed and returned a 1x1 image
-	CMYKColor cmykValues;
-	int h = qMin(target.height(), source.height());
-	int w = qMin(target.width(), source.width());
-	int cyan, c, m, yc, k, cc, mm, yy, kk;
-	ScColorEngine::getCMYKValues(col, doc, cmykValues);
-	cmykValues.getValues(c, m, yc, k);
-	for (int y = 0; y < h; ++y )
-	{
-		QRgb *p = (QRgb *) target.scanLine(y);
-		QRgb *pq = (QRgb *) source.scanLine(y);
-		for (int x = 0; x < w; ++x )
-		{
-			cyan = 255 - qRed(*pq);
-			if (cyan != 0)
-			{
-				(c == 0) ? cc = qRed(*p) : cc = qMin(c * cyan / 255 + qRed(*p), 255);
-				(m == 0) ? mm = qGreen(*p) : mm = qMin(m * cyan / 255 + qGreen(*p), 255);
-				(yc == 0) ? yy = qBlue(*p) : yy = qMin(yc * cyan / 255 + qBlue(*p), 255);
-				(k == 0) ? kk = qAlpha(*p) : kk = qMin(k * cyan / 255 + qAlpha(*p), 255);
-				*p = qRgba(cc, mm, yy, kk);
-			}
-			p++;
-			pq++;
-		}
-	}
-}
-
-void PrintPreview::blendImagesSumUp(QImage &target, ScImage &scsource)
-{
-	QImage source = scsource.qImage(); // FIXME: this will not work once qImage always returns ARGB!
-	//FIXME: if source and target have different sizesomething went wrong.
-	// eg. loadPicture() failed and returned a 1x1 image
-	int h = qMin(target.height(), source.height());
-	int w = qMin(target.width(), source.width());
-	int cyan;
-	for (int y = 0; y < h; ++y )
-	{
-		uint *p = (QRgb *) target.scanLine(y);
-		QRgb *pq = (QRgb *) source.scanLine(y);
-		for (int x = 0; x < w; ++x )
-		{
-			cyan = 255 - qRed(*pq);
-			if (cyan != 0)
-			{
-				*p += cyan;
-			}
-			p++;
-			pq++;
-		}
-	}
-}
-
-QPixmap PrintPreview::CreatePreview(int pageIndex, int res)
-{
-	int ret = -1;
-	QPixmap pixmap;
-	double b = doc->Pages->at(pageIndex)->width() * res / 72.0;
-	double h = doc->Pages->at(pageIndex)->height() * res / 72.0;
-
-	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
-
-	if ((pageIndex != m_currentPage) || (enableCMYK->isChecked() != m_colorMode) || (m_scaleMode != scaleBox->currentIndex())
-	        || (antiAliasing->isChecked() != m_useAntialiasing) || (((showTransparency->isChecked() != m_showTransparency) || (enableGCR->isChecked() != m_useGCR))
-			&& (!enableCMYK->isChecked()))
-			 || (useGray->isChecked() != m_useGray) || (mirrorHor->isChecked() != m_mirrorH) || (mirrorVert->isChecked() != m_mirrorV)
-			 || (clipMargins->isChecked() != m_clipToMargins) || (spotColors->isChecked() != m_convertSpots))
-	{
-		if (!enableCMYK->isChecked() || (!haveTiffSep))
-		{
-			ret = RenderPreview(pageIndex, res);
-			if (ret > 0)
-			{
-				imageLoadError(pixmap, pageIndex);
-				return pixmap;
-			}
-		}
-	}
-	QImage image;
-	if (enableCMYK->isChecked())
-	{
-		bool loaderror;
-		int cyan, magenta, yellow, black;
-		if (haveTiffSep)
-		{
-			if ((pageIndex != m_currentPage) || (enableCMYK->isChecked() != m_colorMode) || (m_scaleMode != scaleBox->currentIndex())
-	       	 || (antiAliasing->isChecked() != m_useAntialiasing) || (showTransparency->isChecked() != m_showTransparency) || (enableGCR->isChecked() != m_useGCR)
-	       	 || (useGray->isChecked() != m_useGray)  || (mirrorHor->isChecked() != m_mirrorH)|| (mirrorVert->isChecked() != m_mirrorV)
-	       	 || (clipMargins->isChecked() != m_clipToMargins) || (spotColors->isChecked() != m_convertSpots))
-			{
-				ret = RenderPreviewSep(pageIndex, res);
-				if (ret > 0)
-				{
-					imageLoadError(pixmap, pageIndex);
-					return pixmap;
-				}
-			}
-			ScImage im;
-			bool mode;
-			int w = qRound(b);
-			int h2 = qRound(h);
-			if (doc->Pages->at(pageIndex)->orientation() == 1)
-				std::swap(w, h2);
-			image = QImage(w, h2, QImage::Format_ARGB32);
-			image.fill(qRgba(0, 0, 0, 0));
-
-			CMSettings cms(doc, "", Intent_Perceptual);
-			cms.allowColorManagement(false);
-			if (flagsVisible["Cyan"]->isChecked())
-			{
-				if (m_gsVersion < 854)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.tif.Cyan.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else if (m_gsVersion <= 905)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.Cyan.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc(Cyan).tif", 1, cms, ScImage::RGBData, 72, &mode);
-				if (!loaderror)
-				{
-					imageLoadError(pixmap, pageIndex);
-					return pixmap;
-				}
-				if (enableInkCover->isChecked())
-					blendImagesSumUp(image, im);
-				else
-					blendImages(image, im, ScColor(255, 0, 0, 0));
-			}
-			if (flagsVisible["Magenta"]->isChecked())
-			{
-				if (m_gsVersion < 854)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.tif.Magenta.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else if (m_gsVersion <= 905)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.Magenta.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc(Magenta).tif", 1, cms, ScImage::RGBData, 72, &mode);
-				if (!loaderror)
-				{
-					imageLoadError(pixmap, pageIndex);
-					return pixmap;
-				}
-				if (enableInkCover->isChecked())
-					blendImagesSumUp(image, im);
-				else
-					blendImages(image, im, ScColor(0, 255, 0, 0));
-			}
-			if (flagsVisible["Yellow"]->isChecked())
-			{
-				if (m_gsVersion < 854)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.tif.Yellow.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else if (m_gsVersion <= 905)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.Yellow.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc(Yellow).tif", 1, cms, ScImage::RGBData, 72, &mode);
-				if (!loaderror)
-				{
-					imageLoadError(pixmap, pageIndex);
-					return pixmap;
-				}
-				if (enableInkCover->isChecked())
-					blendImagesSumUp(image, im);
-				else
-					blendImages(image, im, ScColor(0, 0, 255, 0));
-			}
-			if (!sepsToFileNum.isEmpty())
-			{
-				QMap<QString, int>::Iterator sepit;
-				for (sepit = sepsToFileNum.begin(); sepit != sepsToFileNum.end(); ++sepit)
-				{
-					const QCheckBox* checkBox = flagsVisible.value(sepit.key(), nullptr);
-					if (checkBox && checkBox->isChecked())
-					{
-						QString fnam;
-						if (m_gsVersion < 854)
-							fnam = QString(ScPaths::tempFileDir() + "/sc.tif.s%1.tif").arg(sepit.value());
-						else if (m_gsVersion <= 905)
-							fnam = QString(ScPaths::tempFileDir() + "/sc.s%1.tif").arg(sepit.value());
-						else
-							fnam = QString(ScPaths::tempFileDir() + "/sc(%1).tif").arg(sepit.key());
-						if (!im.loadPicture(fnam, 1, cms, ScImage::RGBData, 72, &mode))
-						{
-							imageLoadError(pixmap, pageIndex);
-							return pixmap;
-						}
-						if (enableInkCover->isChecked())
-							blendImagesSumUp(image, im);
-						else
-							blendImages(image, im, doc->PageColors[sepit.key()]);
-					}
-				}
-			}
-			if (flagsVisible["Black"]->isChecked())
-			{
-				CMSettings cms(doc, "", Intent_Perceptual);
-				cms.allowColorManagement(false);
-				if (m_gsVersion < 854)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.tif.Black.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else if (m_gsVersion <= 905)
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc.Black.tif", 1, cms, ScImage::RGBData, 72, &mode);
-				else
-					loaderror = im.loadPicture(ScPaths::tempFileDir() + "/sc(Black).tif", 1, cms, ScImage::RGBData, 72, &mode);
-				if (!loaderror)
-				{
-					imageLoadError(pixmap, pageIndex);
-					return pixmap;
-				}
-				if (enableInkCover->isChecked())
-					blendImagesSumUp(image, im);
-				else
-					blendImages(image, im, ScColor(0, 0, 0, 255));
-			}
-			if (enableInkCover->isChecked())
-			{
-				uint limitVal = (coverThresholdValue->value() * 255) / 100;
-				for (int yi = 0; yi < h2; ++yi)
-				{
-					QRgb *q = (QRgb*) image.scanLine(yi);
-					for (int xi = 0; xi < w; ++xi)
-					{
-						uint greyVal = *q;
-						if (greyVal != 0)
-						{
-							if (limitVal == 0)
-							{
-								QColor tmpC;
-								tmpC.setHsv((greyVal * 359) / m_inkMax, 255, 255);
-								*q = tmpC.rgba();
-							}
-							else
-							{
-								int col = qMin(255 - static_cast<int>(((greyVal * 128) / m_inkMax) * 2), 255);
-								if ((*q > 0) && (*q < limitVal))
-									*q = qRgba(col, col, col, 255);
-								else
-									*q = qRgba(col, 0, 0, 255);
-							}
-						}
-						else
-						{
-							if (!showTransparency->isChecked())
-								*q = qRgba(255, 255, 255, 255);
-						}
-						q++;
-					}
-				}
-			}
-			else
-			{
-				if (doc->HasCMS || ScCore->haveCMS())
-				{
-					QRgb alphaFF = qRgba(0,0,0,255);
-					QRgb alphaOO = qRgba(255,255,255,0);
-					ScColorMgmtEngine engine = doc->colorEngine;
-					ScColorProfile cmykProfile = doc->HasCMS ? doc->DocPrinterProf : ScCore->defaultCMYKProfile;
-					ScColorProfile rgbProfile  = doc->HasCMS ? doc->DocDisplayProf : ScCore->defaultRGBProfile;
-					ScColorTransform transCMYK = engine.createTransform(cmykProfile, Format_YMCK_8, rgbProfile, Format_BGRA_8, Intent_Relative_Colorimetric, 0);
-					for (int yi = 0; yi < h2; ++yi)
-					{
-						uchar* ptr = image.scanLine( yi );
-						transCMYK.apply(ptr, ptr, image.width());
-						QRgb *q = (QRgb *) ptr;
-						for (int xi = 0; xi < image.width(); xi++, q++)
-						{
-							if (showTransparency->isChecked())
-							{
-								cyan = qRed(*q);
-								magenta = qGreen(*q);
-								yellow = qBlue(*q);
-								if	((cyan == 255) && (magenta == 255) && (yellow == 255))
-									*q = alphaOO;
-								else
-									*q |= alphaFF;
-							}
-							else
-								*q |= alphaFF;
-						}
-					}
-				}
-				else
-				{
-					for (int yi = 0; yi < h2; ++yi)
-					{
-						QRgb *q = (QRgb*) image.scanLine(yi);
-						for (int xi = 0; xi < w; ++xi)
-						{
-							cyan = qRed(*q);
-							magenta = qGreen(*q);
-							yellow = qBlue(*q);
-							black = qAlpha(*q);
-							if ((cyan != 0) || (magenta != 0) || (yellow != 0 ) || (black != 0))
-								*q = qRgba(255 - qMin(255, cyan+black), 255 - qMin(255, magenta+black), 255 - qMin(255, yellow+black), 255);
-							else
-							{
-								if (!showTransparency->isChecked())
-									*q = qRgba(255, 255, 255, 255);
-							}
-							q++;
-						}
-					}
-				}
-			}
-		}
-	}
-	else
-	{
-		QString previewFile;
-		if ((showTransparency->isChecked() && havePngAlpha) || !postscriptPreview)
-			previewFile = ScPaths::tempFileDir() + "/sc.png";
-		else
-			previewFile = ScPaths::tempFileDir() + "/sc.tif";
-		if (!image.load(previewFile))
-		{
-			imageLoadError(pixmap, pageIndex);
-			return pixmap;
-		}
-		image = image.convertToFormat(QImage::Format_ARGB32);
-		if ((showTransparency->isChecked()) && (havePngAlpha))
-		{
-			int wi = image.width();
-			int hi = image.height();
-			for (int yi = 0; yi < hi; ++yi)
-			{
-				QRgb *s = (QRgb*) image.scanLine(yi);
-				for (int xi = 0; xi < wi; ++xi)
-				{
-					if ((*s) == 0xffffffff)
-						(*s) &= 0x00ffffff;
-					s++;
-				}
-			}
-		}
-	}
-	const ScPage* page = doc->Pages->at(pageIndex);
-	if ((page->orientation() == 1) && (image.width() < image.height()))
-		image = image.transformed( QMatrix(0, 1, -1, 0, 0, 0) );
-	if (showTransparency->isChecked())
-	{
-		pixmap = QPixmap(image.width(), image.height());
-		QPainter p;
-		QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill.png"));
-		p.begin(&pixmap);
-		p.fillRect(0, 0, image.width(), image.height(), b);
-		p.drawImage(0, 0, image);
-		p.end();
-	}
-	else
-		pixmap = QPixmap::fromImage(image);
+
+	pixmap = m_previewCreator->createPreview(pageIndex);
+
 	qApp->restoreOverrideCursor();
 	getUserSelection(pageIndex);
 	return pixmap;
@@ -1146,7 +556,7 @@
 		return true;
 	else if (printerName.isEmpty())
 		return PrinterUtil::isPostscriptPrinter( ScPrintEngine_GDI::getDefaultPrinter() );
-	else if (engine >= PostScript1 && engine <= PostScript3)
+	else if (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3)
 		return PrinterUtil::isPostscriptPrinter( printerName );
 	return false;
 #else
@@ -1171,13 +581,6 @@
 	m_useGray = useGray->isChecked();
 }
 
-void PrintPreview::imageLoadError(QPixmap &pixmap, int page)
-{
-	pixmap = QPixmap(1,1);
-	qApp->restoreOverrideCursor();
-	getUserSelection(page);
-}
-
 void PrintPreview::resizeEvent(QResizeEvent * event)
 {
 	QDialog::resizeEvent(event);

Modified: trunk/Scribus/scribus/ui/printpreview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/ui/printpreview.h
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.h	(original)
+++ trunk/Scribus/scribus/ui/printpreview.h	Sat Sep 12 20:59:12 2020
@@ -25,6 +25,7 @@
 #include "scribusstructs.h"
 
 class PageSelector;
+class PrintPreviewCreator;
 class ScribusDoc;
 class ScribusView;
 class ScImage;
@@ -58,17 +59,6 @@
 
 	double inkCoverageThreshold() const { return coverThresholdValue->value(); }
 
-	/*!
-	\author Franz Schmid
-	\brief Renders the Preview to a file on Disk
-	\param pageIndex int page number
-	\param res int resolution
-	\retval int Flag indicating error
-	*/
-	int RenderPreview(int pageIndex, int res);
-	int RenderPreviewSep(int pageIndex, int res);
-	void blendImages(QImage &target, ScImage &source, ScColor col);
-	void blendImagesSumUp(QImage &target, ScImage &scsource);
 	static bool usePostscriptPreview(const QString& printerName, PrintEngine engine);
 	/*!
 	\author Franz Schmid
@@ -77,7 +67,7 @@
 	\param res int resolution
 	\retval pixmap QPixmap print preview
 	*/
-	QPixmap CreatePreview(int pageIndex, int res);
+	QPixmap createPreview(int pageIndex, int res);
 
 public slots:
 	/*!
@@ -119,14 +109,14 @@
 	bool havePngAlpha { false };
 	bool haveTiffSep { false };
 	bool postscriptPreview { true };
-	QMap<QString, int> sepsToFileNum;
 	QMap<QString, QCheckBox*> flagsVisible;
 	QTableWidget* inkTable { nullptr };
+
+	PrintPreviewCreator* m_previewCreator { nullptr };
 
 	int m_currentPage { -1 };
 	int m_scaleMode { 1 };
 	int m_gsVersion { 0 };
-	int m_inkMax { 1020 }; // 4 * 255
 	bool m_colorMode { false };
 	bool m_useAntialiasing { false };
 	bool m_showTransparency { false };
@@ -174,7 +164,6 @@
 
 	void setValues();
 	void getUserSelection(int);
-	void imageLoadError(QPixmap &, int);
 
 	//! \brief repaint sample on the dialog change
 	void resizeEvent(QResizeEvent * event) override;

Modified: trunk/Scribus/scribus/util_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/scribus/util_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/util_printer.cpp	(original)
+++ trunk/Scribus/scribus/util_printer.cpp	Sat Sep 12 20:59:12 2020
@@ -42,7 +42,7 @@
 	if ((selectedSep < 0) || (selectedSep > 4))
 		selectedSep = 0;
 	options.separationName = spots.at(selectedSep);
-	options.prnEngine = (PrintEngine) prnPrefs->getInt("PSLevel", PostScript3);
+	options.prnEngine = (PrintEngine) prnPrefs->getInt("PSLevel", (int) PrintEngine::PostScript3);
 	options.mirrorH = prnPrefs->getBool("MirrorH", false);
 	options.mirrorV = prnPrefs->getBool("MirrorV", false);
 	options.setDevParam = prnPrefs->getBool("doDev", false);
@@ -152,12 +152,12 @@
 	if (!toFile)
 	{
 #if defined(_WIN32)
-		return WindowsGDI;
+		return PrintEngine::WindowsGDI;
 #else
-		return PostScript3;
-#endif
-	}
-	return PostScript3;
+		return PrintEngine::PostScript3;
+#endif
+	}
+	return PrintEngine::PostScript3;
 }
 
 PrintEngineMap PrinterUtil::getPrintEngineSupport(const QString& printerName, bool toFile)
@@ -167,14 +167,14 @@
 	{
 		if (ScCore->haveGS())
 		{
-			prnMap.insert(CommonStrings::trPostScript1, PostScript1);
-			prnMap.insert(CommonStrings::trPostScript2, PostScript2);
+			prnMap.insert(CommonStrings::trPostScript1, PrintEngine::PostScript1);
+			prnMap.insert(CommonStrings::trPostScript2, PrintEngine::PostScript2);
 		}
-		prnMap.insert(CommonStrings::trPostScript3, PostScript3);
+		prnMap.insert(CommonStrings::trPostScript3, PrintEngine::PostScript3);
 	}
 #if defined(_WIN32)
 	if (!toFile)
-		prnMap.insert(CommonStrings::trWindowsGDI, WindowsGDI);
+		prnMap.insert(CommonStrings::trWindowsGDI, PrintEngine::WindowsGDI);
 #endif
 	return prnMap;
 }
@@ -182,11 +182,11 @@
 bool PrinterUtil::checkPrintEngineSupport(const QString& printerName, PrintEngine engine, bool toFile)
 {
 	bool psSupported = toFile || PrinterUtil::isPostscriptPrinter(printerName);
-	if (psSupported && (engine >= PostScript1 && engine <= PostScript3))
+	if (psSupported && (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3))
 		return true;
-	if (!psSupported && (engine >= PostScript1 && engine <= PostScript3))
-		return false;
-	if (engine == WindowsGDI)
+	if (!psSupported && (engine >= PrintEngine::PostScript1 && engine <= PrintEngine::PostScript3))
+		return false;
+	if (engine == PrintEngine::WindowsGDI)
 	{
 #if defined(_WIN32)
 		return true; //WindowsGDI

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	Sat Sep 12 20:59:12 2020
@@ -346,6 +346,11 @@
     <ClInclude Include="..\..\..\scribus\pdfstructs.h" />
     <ClInclude Include="..\..\..\scribus\pdfversion.h" />
     <ClInclude Include="..\..\..\scribus\pdfwriter.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h" />
     <ClInclude Include="..\..\..\scribus\sccolorstructs.h" />
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h" />
     <ClInclude Include="..\..\..\scribus\styles\cellstyle.h" />
@@ -889,6 +894,11 @@
     <ClCompile Include="..\..\..\scribus\palettes\paletteloader_swatchbook.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfversion.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfwriter.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp" />
     <ClCompile Include="..\..\..\scribus\qtiocompressor.cpp" />
     <ClCompile Include="..\..\..\scribus\imagedataloaders\scimgdataloader_ora.cpp" />
     <ClCompile Include="..\..\..\scribus\sccolorstructs.cpp" />

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	Sat Sep 12 20:59:12 2020
@@ -809,6 +809,21 @@
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2519,6 +2534,21 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\scprintengine_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>

Modified: trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj	Sat Sep 12 20:59:12 2020
@@ -346,6 +346,11 @@
     <ClInclude Include="..\..\..\scribus\pdfstructs.h" />
     <ClInclude Include="..\..\..\scribus\pdfversion.h" />
     <ClInclude Include="..\..\..\scribus\pdfwriter.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h" />
     <ClInclude Include="..\..\..\scribus\sccolorstructs.h" />
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h" />
     <ClInclude Include="..\..\..\scribus\styles\cellstyle.h" />
@@ -889,6 +894,11 @@
     <ClCompile Include="..\..\..\scribus\palettes\paletteloader_swatchbook.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfversion.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfwriter.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp" />
     <ClCompile Include="..\..\..\scribus\qtiocompressor.cpp" />
     <ClCompile Include="..\..\..\scribus\imagedataloaders\scimgdataloader_ora.cpp" />
     <ClCompile Include="..\..\..\scribus\sccolorstructs.cpp" />

Modified: trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2017/scribus-main/Scribus.vcxproj.filters	Sat Sep 12 20:59:12 2020
@@ -809,6 +809,21 @@
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2519,6 +2534,21 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\scprintengine_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>

Modified: trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj	Sat Sep 12 20:59:12 2020
@@ -347,6 +347,11 @@
     <ClInclude Include="..\..\..\scribus\pdfstructs.h" />
     <ClInclude Include="..\..\..\scribus\pdfversion.h" />
     <ClInclude Include="..\..\..\scribus\pdfwriter.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h" />
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h" />
     <ClInclude Include="..\..\..\scribus\sccolorstructs.h" />
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h" />
     <ClInclude Include="..\..\..\scribus\styles\cellstyle.h" />
@@ -890,6 +895,11 @@
     <ClCompile Include="..\..\..\scribus\palettes\paletteloader_swatchbook.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfversion.cpp" />
     <ClCompile Include="..\..\..\scribus\pdfwriter.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp" />
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp" />
     <ClCompile Include="..\..\..\scribus\qtiocompressor.cpp" />
     <ClCompile Include="..\..\..\scribus\imagedataloaders\scimgdataloader_ora.cpp" />
     <ClCompile Include="..\..\..\scribus\sccolorstructs.cpp" />

Modified: trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24010&path=/trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2019/scribus-main/Scribus.vcxproj.filters	Sat Sep 12 20:59:12 2020
@@ -809,6 +809,21 @@
     <ClInclude Include="..\..\..\scribus\scprintengine_pdf.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_gdi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_pdf.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreator_ps.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\printpreviewcreatorfactory.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -2519,6 +2534,21 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\scprintengine_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_gdi.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_pdf.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreator_ps.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\printpreviewcreatorfactory.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>




More information about the scribus-commit mailing list