Эх сурвалжийг харах

remove the --use-native-printer option for Mac OS X

This reverts commit fd60bd9cba2a8c6f9dd23a66efc293a2725a6c69,
which was added due to #1536. However, as per information
available in #1545 it appears that a fix is being made at the
Qt end, which means that it will no longer be needed.
Ashish Kulkarni 11 жил өмнө
parent
commit
06a65feda5

+ 0 - 1
CHANGELOG.md

@@ -7,7 +7,6 @@ v0.12.1 (unreleased)
 * **#1507**: **[qt]** fix crash when CSS widows are specified
 * **#1509**: fix TOC support which was broken after upgrade to latest Qt
 * **#1512**: **[qt]** fix crashes when rendering JPEG images on Windows Server 2008 x64
-* **#1536**: produce selectable text on Mac OSX via --native-format-printer
 * **#1544**: use UTF-8 encoding for the HTML generated by the TOC XSL
 * **#1546**: fix problem with non-ASCII characters in output path on Windows
 * **#1585**: delete existing files explicitly in windows installer

+ 0 - 2
include/wkhtmltox/pdfsettings.hh

@@ -138,8 +138,6 @@ struct DLL_PUBLIC PdfGlobal {
 	int imageDPI;
 	int imageQuality;
 
-	bool useNativeFormatPrinter; // use QPrinter::NativeFormat on Mac OS X?
-
 	LoadGlobal load;
 
 	QString get(const char * name);

+ 0 - 1
src/lib/pdf_c_bindings.cc

@@ -121,7 +121,6 @@
  * - \b margin.right Size of the right margin, e.g. "2cm"
  * - \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).
  * - \b load.cookieJar Path of file used to load and store cookies.
  *
  * \section pagePdfObject Pdf object settings

+ 2 - 14
src/lib/pdfconverter.cc

@@ -267,13 +267,7 @@ QPrinter * PdfConverterPrivate::createPrinter(const QString & tempFile) {
     //Tell the printer object to print the file <out>
 
     printer->setOutputFileName(tempFile);
-    printer->setOutputFormat(
-#ifdef Q_OS_MAC
-        settings.useNativeFormatPrinter ? QPrinter::NativeFormat : QPrinter::PdfFormat
-#else
-        QPrinter::PdfFormat
-#endif
-        );
+    printer->setOutputFormat(QPrinter::PdfFormat);
 
     if ((settings.size.height.first != -1) && (settings.size.width.first != -1)) {
         printer->setPaperSize(QSizeF(settings.size.width.first,settings.size.height.first + 100), settings.size.height.second);
@@ -352,13 +346,7 @@ void PdfConverterPrivate::pagesLoaded(bool ok) {
 	//Tell the printer object to print the file <out>
 
 	printer->setOutputFileName(lout);
-	printer->setOutputFormat(
-#ifdef Q_OS_MAC
-		settings.useNativeFormatPrinter ? QPrinter::NativeFormat : QPrinter::PdfFormat
-#else
-		QPrinter::PdfFormat
-#endif
-		);
+	printer->setOutputFormat(QPrinter::PdfFormat);
 
 	//We currently only support margins with the same unit
 	if (settings.margin.left.second != settings.margin.right.second ||

+ 7 - 9
src/lib/pdfsettings.cc

@@ -121,11 +121,10 @@ struct DLL_LOCAL ReflectImpl<PdfGlobal>: public ReflectClass {
 		WKHTMLTOPDF_REFLECT(out);
 		WKHTMLTOPDF_REFLECT(documentTitle);
 		WKHTMLTOPDF_REFLECT(useCompression);
-        WKHTMLTOPDF_REFLECT(margin);
-        WKHTMLTOPDF_REFLECT(imageDPI);
-        WKHTMLTOPDF_REFLECT(imageQuality);
-        WKHTMLTOPDF_REFLECT(useNativeFormatPrinter);
-        WKHTMLTOPDF_REFLECT(load);
+		WKHTMLTOPDF_REFLECT(margin);
+		WKHTMLTOPDF_REFLECT(imageDPI);
+		WKHTMLTOPDF_REFLECT(imageQuality);
+		WKHTMLTOPDF_REFLECT(load);
 	}
 };
 
@@ -381,10 +380,9 @@ PdfGlobal::PdfGlobal():
 	out(""),
 	documentTitle(""),
 	useCompression(true),
-    imageDPI(600),
-    imageQuality(94),
-    useNativeFormatPrinter(false),
-    viewportSize(""){};
+	imageDPI(600),
+	imageQuality(94),
+	viewportSize(""){};
 
 TableOfContent::TableOfContent():
 	useDottedLines(true),

+ 0 - 2
src/lib/pdfsettings.hh

@@ -136,8 +136,6 @@ struct DLL_PUBLIC PdfGlobal {
 	int imageDPI;
 	int imageQuality;
 
-	bool useNativeFormatPrinter; // use QPrinter::NativeFormat on Mac OS X?
-
 	LoadGlobal load;
 
 	QString get(const char * name);

+ 1 - 6
src/pdf/pdfarguments.cc

@@ -212,12 +212,7 @@ PdfCommandLineParser::PdfCommandLineParser(PdfGlobal & s, QList<PdfObject> & ps)
 
 	addarg("image-quality", 0, "When jpeg compressing images use this quality", new IntSetter(s.imageQuality,"integer"));
 	addarg("image-dpi", 0, "When embedding images scale them down to this dpi", new IntSetter(s.imageDPI, "integer"));
-
-    addarg("no-pdf-compression", 0 , "Do not use lossless compression on pdf objects", new ConstSetter<bool>(s.useCompression,false));
-
-#ifdef Q_OS_MAC
-	addarg("native-format-printer", 0 , "Use the native Mac OS X PDF printer to produce a PDF with selectable text. Note: This printer breaks some advanced features of wkhtmltopdf. Use at your own risk.", new ConstSetter<bool>(s.useNativeFormatPrinter,true));
-#endif
+	addarg("no-pdf-compression", 0 , "Do not use lossless compression on pdf objects", new ConstSetter<bool>(s.useCompression,false));
 
 #ifdef Q_OS_UNIX
  	addarg("use-xserver",0,"Use the X server (some plugins and other stuff might not work without X11)", new ConstSetter<bool>(s.useGraphics,true));