summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-25 21:10:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-25 21:10:05 +0000
commit9ed6bd7150a9333cb28d149c98e3d316c3ededdf (patch)
treed8b293aaec7be2acc7645150a194d9625a344758 /public
parentd7f3f1e1b99f1e10bfce83d779303c678965b57c (diff)
downloadpdfium-9ed6bd7150a9333cb28d149c98e3d316c3ededdf.tar.xz
Add PostScript PASSTHROUGH options to FPDF_SetPrintMode().
The existing PostScript modes write data into EMF comments. This satisfies Chromium's use case, but other embedders want to write data out via ExtEscape() in PASSTHROUGH mode. BUG=pdfium:1068 Change-Id: I998035e99fbb84b16dcd244b750b476cecc3bd22 Reviewed-on: https://pdfium-review.googlesource.com/31299 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h2
-rw-r--r--public/fpdfview.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 023d955d00..74c2700733 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -66,6 +66,8 @@
#define FPDF_PRINTMODE_TEXTONLY 1
#define FPDF_PRINTMODE_POSTSCRIPT2 2
#define FPDF_PRINTMODE_POSTSCRIPT3 3
+#define FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH 4
+#define FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH 5
typedef struct FPDF_IMAGEOBJ_METADATA {
// The image width in pixels.
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 2c93e962f3..20f710f3c6 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -274,8 +274,14 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_SetPrintTextWithGDI(FPDF_BOOL use_gdi);
// mode - FPDF_PRINTMODE_EMF to output EMF (default)
// FPDF_PRINTMODE_TEXTONLY to output text only (for charstream
// devices)
-// FPDF_PRINTMODE_POSTSCRIPT2 to output level 2 postscript
-// FPDF_PRINTMODE_POSTSCRIPT3 to output level 3 postscript
+// FPDF_PRINTMODE_POSTSCRIPT2 to output level 2 PostScript into
+// EMF as a series of GDI comments.
+// FPDF_PRINTMODE_POSTSCRIPT3 to output level 3 PostScript into
+// EMF as a series of GDI comments.
+// FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH to output level 2
+// PostScript via ExtEscape() in PASSTHROUGH mode.
+// FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH to output level 3
+// PostScript via ExtEscape() in PASSTHROUGH mode.
// Return value:
// True if successful, false if unsuccessful (typically invalid input).
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SetPrintMode(int mode);