Browse Source

removed support for PostScript which is not supported in QT5

Ashish Kulkarni 11 years ago
parent
commit
2409e28810

+ 0 - 3
include/wkhtmltox/pdfsettings.hh

@@ -133,9 +133,6 @@ struct DLL_PUBLIC PdfGlobal {
 	//! Margin related settings
 	Margin margin;
 
-	//! Specify the output format we should use
-	QString outputFormat;
-
 	QString viewportSize;
 
 	int imageDPI;

+ 0 - 1
src/lib/pdf_c_bindings.cc

@@ -124,7 +124,6 @@
  * - \b margin.bottom Size of the bottom margin, e.g. "2cm"
  * - \b margin.left Size of the left margin, e.g. "2cm"
  * - \b margin.right Size of the right margin, e.g. "2cm"
- * - \b outputFormat The format of the output document, must be ether "", "pdf" or "ps".
  * - \b imageDPI The maximal DPI to use for images in the pdf document.
  * - \b imageQuality The jpeg compression factor to use when producing the pdf document, e.g. "92".
  * - \b useNativeFormatPrinter Should we use QPrinter::NativeFormat when creating the pdf file? Must be either "true" or "false". (Mac OS X only).

+ 3 - 3
src/lib/pdfconverter.cc

@@ -245,7 +245,7 @@ qreal PdfConverterPrivate::calculateHeaderHeight(PageObject & object, QWebPage &
     typedef QPair<QWebElement, QString> p_t;
 
     TempFile   tempObj;
-    QString    tempFile = tempObj.create(settings.outputFormat == "ps"?".ps":".pdf");
+    QString    tempFile = tempObj.create(".pdf");
 
     QPainter * testPainter = new QPainter();
     QPrinter * testPrinter = createPrinter(tempFile);
@@ -347,10 +347,10 @@ void PdfConverterPrivate::pagesLoaded(bool ok) {
 			 lout = "/dev/stdout";
 		 else
 #endif
-			 lout = tempOut.create(settings.outputFormat == "ps"?".ps":".pdf");
+			 lout = tempOut.create(".pdf");
 	}
 	if (settings.out.isEmpty())
-	  lout = tempOut.create(settings.outputFormat == "ps"?".ps":".pdf");
+	  lout = tempOut.create(".pdf");
 
 	printer = new QPrinter(settings.resolution);
 	if (settings.dpi != -1) printer->setResolution(settings.dpi);

+ 0 - 1
src/lib/pdfsettings.cc

@@ -127,7 +127,6 @@ struct DLL_LOCAL ReflectImpl<PdfGlobal>: public ReflectClass {
 		WKHTMLTOPDF_REFLECT(documentTitle);
 		WKHTMLTOPDF_REFLECT(useCompression);
         WKHTMLTOPDF_REFLECT(margin);
-        WKHTMLTOPDF_REFLECT(outputFormat);
         WKHTMLTOPDF_REFLECT(imageDPI);
         WKHTMLTOPDF_REFLECT(imageQuality);
         WKHTMLTOPDF_REFLECT(useNativeFormatPrinter);

+ 0 - 3
src/lib/pdfsettings.hh

@@ -136,9 +136,6 @@ struct DLL_PUBLIC PdfGlobal {
 	//! Margin related settings
 	Margin margin;
 
-	//! Specify the output format we should use
-	QString outputFormat;
-
 	QString viewportSize;
 
 	int imageDPI;

+ 0 - 2
src/pdf/pdfarguments.cc

@@ -194,8 +194,6 @@ PdfCommandLineParser::PdfCommandLineParser(PdfGlobal & s, QList<PdfObject> & ps)
 
 	extended(true);
  	qthack(false);
-	addarg("output-format",0, "Specify an output format to use pdf or ps, instead of looking at the extention of the output filename", new QStrSetter(s.outputFormat, "format"));
-
 	addarg("margin-bottom",'B',"Set the page bottom margin", new UnitRealSetter(s.margin.bottom,"unitreal"));
  	addarg("margin-left",'L',"Set the page left margin", new UnitRealSetter(s.margin.left,"unitreal"));
  	addarg("margin-right",'R',"Set the page right margin", new UnitRealSetter(s.margin.right,"unitreal"));