summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fpdfview.h
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-07-14 13:22:47 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-07-14 13:22:47 -0700
commit9114e831cc8ae619ce541719887c5d7c2fc4e6d1 (patch)
tree4940928e138a7896f938b8d41bd2055fec51c1e3 /fpdfsdk/include/fpdfview.h
parent8daab317ff959905e926b861a7d2aa876fd10429 (diff)
downloadpdfium-9114e831cc8ae619ce541719887c5d7c2fc4e6d1.tar.xz
Add support to extract viewer preference
This change adds the support to extract "NumCopies", "PrintPageRange", "Duplex" viewer preferences for printing. BUG=169120 R=bo_xu@foxitsoftware.com, vitalybuka@chromium.org Review URL: https://codereview.chromium.org/345123002
Diffstat (limited to 'fpdfsdk/include/fpdfview.h')
-rw-r--r--fpdfsdk/include/fpdfview.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/fpdfsdk/include/fpdfview.h b/fpdfsdk/include/fpdfview.h
index f4f13750bc..1b7ae2e251 100644
--- a/fpdfsdk/include/fpdfview.h
+++ b/fpdfsdk/include/fpdfview.h
@@ -34,6 +34,7 @@ typedef void* FPDF_BOOKMARK;
typedef void* FPDF_DEST;
typedef void* FPDF_ACTION;
typedef void* FPDF_LINK;
+typedef void* FPDF_PAGERANGE;
// Basic data types
typedef int FPDF_BOOL;
@@ -42,6 +43,14 @@ typedef unsigned long FPDF_DWORD;
typedef float FS_FLOAT;
+// Duplex types
+typedef enum _FPDF_DUPLEXTYPE_ {
+ DuplexUndefined = 0,
+ Simplex,
+ DuplexFlipShortEdge,
+ DuplexFlipLongEdge
+} FPDF_DUPLEXTYPE;
+
// String types
typedef unsigned short FPDF_WCHAR;
typedef unsigned char const* FPDF_LPCBYTE;
@@ -556,6 +565,33 @@ DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap);
//
DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document);
+// Function: FPDF_VIEWERREF_GetNumCopies
+// Returns the number of copies to be printed.
+// Parameters:
+// document - Handle to the loaded document.
+// Return value:
+// The number of copies to be printed.
+//
+DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document);
+
+// Function: FPDF_VIEWERREF_GetPrintPageRange
+// Page numbers to initialize print dialog box when file is printed.
+// Parameters:
+// document - Handle to the loaded document.
+// Return value:
+// The print page range to be used for printing.
+//
+DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document);
+
+// Function: FPDF_VIEWERREF_GetDuplex
+// Returns the paper handling option to be used when printing from print dialog.
+// Parameters:
+// document - Handle to the loaded document.
+// Return value:
+// The paper handling option to be used when printing.
+//
+DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document);
+
// Function: FPDF_GetNamedDestByName
// get a special dest handle by the index.
// Parameters: