r18792 by jghali - #12013 : cannot export PDF/X-1a from scripter

scribus-commit scribus-commit at lists.scribus.net
Fri Jan 31 07:11:39 UTC 2014


Author: jghali
Date: Fri Jan 31 07:11:38 2014
New Revision: 18792

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18792
Log:
#12013 : cannot export PDF/X-1a from scripter

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18792&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Fri Jan 31 07:11:38 2014
@@ -1119,7 +1119,7 @@
 	ScCore->primaryMainWindow()->doc->pdfOptions().UseLPI = self->uselpi;
 	ScCore->primaryMainWindow()->doc->pdfOptions().UseSpotColors = self->usespot;
 	ScCore->primaryMainWindow()->doc->pdfOptions().doMultiFile = self->domulti;
-	self->version = minmaxi(self->version, 12, 14);
+	self->version = minmaxi(self->version, 10, 14);
 	// FIXME: Sanity check version
 	ScCore->primaryMainWindow()->doc->pdfOptions().Version = (PDFOptions::PDFVersion)self->version;
 	if (self->encrypt)
@@ -1160,7 +1160,9 @@
 			ScCore->primaryMainWindow()->doc->pdfOptions().SolidProf = PyString_AsString(self->solidpr);
 			ScCore->primaryMainWindow()->doc->pdfOptions().ImageProf = PyString_AsString(self->imagepr);
 			ScCore->primaryMainWindow()->doc->pdfOptions().PrintProf = PyString_AsString(self->printprofc);
-			if (ScCore->primaryMainWindow()->doc->pdfOptions().Version == PDFOptions::PDFVersion_X3)
+			if (ScCore->primaryMainWindow()->doc->pdfOptions().Version == PDFOptions::PDFVersion_X1a ||
+				ScCore->primaryMainWindow()->doc->pdfOptions().Version == PDFOptions::PDFVersion_X3 ||
+				ScCore->primaryMainWindow()->doc->pdfOptions().Version == PDFOptions::PDFVersion_X4)
 			{
 				ScColorProfile profile;
 				profile = ScCore->defaultEngine.openProfileFromFile(ScCore->PrinterProfiles[ScCore->primaryMainWindow()->doc->pdfOptions().PrintProf]);
@@ -1189,7 +1191,6 @@
 			ScCore->primaryMainWindow()->doc->pdfOptions().UseProfiles = false;
 			ScCore->primaryMainWindow()->doc->pdfOptions().UseProfiles2 = false;
 		}
-
 	}
 	QMap<int,QPixmap> thumbs;
 	for (uint ap = 0; ap < pageNs.size(); ++ap)




More information about the scribus-commit mailing list