diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2015-01-10 22:52:59 -0800 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2015-01-15 18:47:16 -0800 |
commit | 4d62b6b16bf5df3911948bdb5dd336b365ec76e0 (patch) | |
tree | 86a2e65ce65fd950ee95835c37e260e755e2b358 /fpdfsdk/include/fpdfview.h | |
parent | 60882dca3d11fd93d76dcdc73a2d0effd987cb78 (diff) | |
download | pdfium-4d62b6b16bf5df3911948bdb5dd336b365ec76e0.tar.xz |
XFA: merge patch from CL 834703002, add APIs for getting bookmarks and named destinations.
Also uses "((CPDFXFA_Document*)document)->GetPDFDoc();" in a various places
Add APIs for getting bookmarks and named destinations.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/834703002
Diffstat (limited to 'fpdfsdk/include/fpdfview.h')
-rw-r--r-- | fpdfsdk/include/fpdfview.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fpdfsdk/include/fpdfview.h b/fpdfsdk/include/fpdfview.h index 34c3f522a4..2ae1d1f5b9 100644 --- a/fpdfsdk/include/fpdfview.h +++ b/fpdfsdk/include/fpdfview.h @@ -720,6 +720,14 @@ DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT // DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document); +// Function: FPDF_CountNamedDests +// Get the count of named destinations in the PDF document. +// Parameters: +// document - Handle to a document +// Return value: +// The count of named destinations. +DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document); + // Function: FPDF_GetNamedDestByName // get a special dest handle by the index. // Parameters: @@ -730,6 +738,23 @@ DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen // DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_BYTESTRING name); +// Function: FPDF_GetNamedDest +// Get the specified named destinations of the PDF document by index. +// Parameters: +// document - Handle to a document +// index - The index of named destination. +// buffer - The buffer to obtain destination name, used as wchar_t*. +// buflen - The length of the buffer in byte. +// Return value: +// The destination handle of a named destination, NULL when retrieving the length. +// Comments: +// Call this function twice to get the name of the named destination: +// 1) First time pass in |buffer| as NULL and get buflen. +// 2) Second time pass in allocated |buffer| and buflen to retrieve |buffer|, which should be used as wchar_t*. +// If buflen is not sufficiently large, it will be returned as -1. +// +DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, unsigned long& buflen); + // Function: FPDF_BStr_Init // Helper function to initialize a byte string. DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str); |