diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-08 19:20:57 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-08 19:20:57 +0000 |
commit | 9c6204fc6c23ab35ec234781df182da570f6faef (patch) | |
tree | 14170cb0685189648b99d6ca786029382d3384f9 /public | |
parent | 5de481e71bcde25d31452b23a017bb783163a204 (diff) | |
download | pdfium-9c6204fc6c23ab35ec234781df182da570f6faef.tar.xz |
Add APIs to work with a FPDF_PAGERANGE.
After getting a FPDF_PAGERANGE from FPDF_VIEWERREF_GetPrintPageRange(),
one can now use FPDF_VIEWERREF_GetPrintPageRangeCount() to get the
number of elements in the FPDF_PAGERANGE. One can then use
FPDF_VIEWERREF_GetPrintPageRangeElement() to read the elements.
Change-Id: I33eeff9026d01991ae1424e05b67f163245a35f9
Reviewed-on: https://pdfium-review.googlesource.com/32173
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdfview.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/public/fpdfview.h b/public/fpdfview.h index f8d6026292..7758facc39 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h @@ -10,6 +10,8 @@ #ifndef PUBLIC_FPDFVIEW_H_ #define PUBLIC_FPDFVIEW_H_ +#include <stddef.h> + #if defined(_WIN32) && !defined(__WINDOWS__) #include <windows.h> #endif @@ -1014,6 +1016,28 @@ FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document); FPDF_EXPORT FPDF_PAGERANGE FPDF_CALLCONV FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document); +// Function: FPDF_VIEWERREF_GetPrintPageRangeCount +// Returns the number of elements in a FPDF_PAGERANGE. +// Experimental API. +// Parameters: +// pagerange - Handle to the page range. +// Return value: +// The number of elements in the page range. Returns 0 on error. +FPDF_EXPORT size_t FPDF_CALLCONV +FPDF_VIEWERREF_GetPrintPageRangeCount(FPDF_PAGERANGE pagerange); + +// Function: FPDF_VIEWERREF_GetPrintPageRangeElement +// Returns an element from a FPDF_PAGERANGE. +// Experimental API. +// Parameters: +// pagerange - Handle to the page range. +// index - Index of the element. +// Return value: +// The value of the element in the page range at a given index. +// Returns -1 on error. +FPDF_EXPORT int FPDF_CALLCONV +FPDF_VIEWERREF_GetPrintPageRangeElement(FPDF_PAGERANGE pagerange, size_t index); + // Function: FPDF_VIEWERREF_GetDuplex // Returns the paper handling option to be used when printing from // the print dialog. |