summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbpotter <rbpotter@chromium.org>2017-07-13 11:58:01 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 19:59:44 +0000
commit38a01b9ceeddbbc73fb1167d30c5aa6994328949 (patch)
tree66f7ed4f444ed31371d7474c2aff1a5f6fb2b3b3
parent0c99829cc38ed2191a71d16c34278e391411aa1b (diff)
downloadpdfium-38a01b9ceeddbbc73fb1167d30c5aa6994328949.tar.xz
Restore FPDF_SetPrintingPostscriptLevel API
Need to restore this API so builds without the chromium text driver CL do not fail. BUG=chromium:734850 Change-Id: I320e482a54bf1224817efee8b50113169353f9be Reviewed-on: https://pdfium-review.googlesource.com/7830 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
-rw-r--r--fpdfsdk/fpdfview.cpp4
-rw-r--r--public/fpdfview.h12
2 files changed, 16 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 905d3683a0..2e52ad6487 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -456,6 +456,10 @@ DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi) {
}
#endif // PDFIUM_PRINT_TEXT_WITH_GDI
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(int postscript_level) {
+ return postscript_level != 1 && FPDF_SetPrintMode(postscript_level);
+}
+
DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintMode(int mode) {
if (mode < FPDF_PRINTMODE_EMF || mode > FPDF_PRINTMODE_POSTSCRIPT3)
return FALSE;
diff --git a/public/fpdfview.h b/public/fpdfview.h
index df46e9700b..95900f3848 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -245,6 +245,18 @@ FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func);
DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi);
#endif // PDFIUM_PRINT_TEXT_WITH_GDI
+// Function: FPDF_SetPrintPostscriptLevel
+// Set postscript printing level when printing on Windows.
+// Experimental API.
+// Parameters:
+// postscript_level- 0 to disable postscript printing,
+// 2 to print with postscript level 2,
+// 3 to print with postscript level 3.
+// All other values are invalid.
+// Return value:
+// True if successful, false if unsuccessful (typically invalid input).
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(int postscript_level);
+
// Function: FPDF_SetPrintMode
// Set printing mode when printing on Windows.
// Experimental API.