summaryrefslogtreecommitdiff
path: root/public/fpdfview.h
diff options
context:
space:
mode:
authorrbpotter <rbpotter@chromium.org>2017-01-12 10:31:43 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-12 10:31:43 -0800
commitdb7647083d0a5cd2221b94faa15c149214d21725 (patch)
tree427c0beeb82796e8e550e672195061186d7db076 /public/fpdfview.h
parente7fb8eb3e9f220a5f0c852f0238ab8d536a8bc9d (diff)
downloadpdfium-db7647083d0a5cd2221b94faa15c149214d21725.tar.xz
Add postscript path
This patch adds the additional functions required to make postscript printing functional. The most significant additions are are two added compression functions and a new API for setting the postscript level. Not currently called from Chromium, Chromium patch to come. BUG= Review-Url: https://codereview.chromium.org/2612243005
Diffstat (limited to 'public/fpdfview.h')
-rw-r--r--public/fpdfview.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 403f4e46ec..7378d5f9b1 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -213,7 +213,8 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary();
DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
FPDF_BOOL enable);
-#if defined(_WIN32) && defined(PDFIUM_PRINT_TEXT_WITH_GDI)
+#if defined(_WIN32)
+#if defined(PDFIUM_PRINT_TEXT_WITH_GDI)
// Pointer to a helper function to make |font| with |text| of |text_length|
// accessible when printing text with GDI. This is useful in sandboxed
// environments where PDFium's access to GDI may be restricted.
@@ -239,7 +240,20 @@ FPDF_SetTypefaceAccessibleFunc(PDFiumEnsureTypefaceCharactersAccessible func);
// Return value:
// None.
DLLEXPORT void STDCALL FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi);
-#endif
+#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 unsucessful (typically invalid input).
+DLLEXPORT FPDF_BOOL STDCALL FPDF_SetPrintPostscriptLevel(FPDF_BOOL use_gdi);
+#endif // defined(_WIN32)
// Function: FPDF_LoadDocument
// Open and load a PDF document.