summaryrefslogtreecommitdiff
path: root/public/fpdf_doc.h
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-11-23 05:52:39 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-23 05:52:39 -0800
commit733e068e077bb59597180bc9b8ff934dd125ffdc (patch)
treea174a02225f1c42933605d516324dc8d0bdd42b8 /public/fpdf_doc.h
parent1a7534a1a477323f7b8497e359f6af6e9bd54cd5 (diff)
downloadpdfium-733e068e077bb59597180bc9b8ff934dd125ffdc.tar.xz
Add API for getting page labels.
BUG=pdfium:479 Review-Url: https://codereview.chromium.org/2521843003
Diffstat (limited to 'public/fpdf_doc.h')
-rw-r--r--public/fpdf_doc.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h
index 9d2229c0c1..b245d46900 100644
--- a/public/fpdf_doc.h
+++ b/public/fpdf_doc.h
@@ -281,26 +281,43 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
// Get meta-data |tag| content from |document|.
//
-// doc - handle to the document
-// tag - the tag to retrieve. The tag can be one of:
-// Title, Author, Subject, Keywords, Creator, Producer,
-// CreationDate, or ModDate.
-// For detailed explanations of these tags and their respective
-// values, please refer to PDF Reference 1.6, section 10.2.1,
-// 'Document Information Dictionary'.
-// buffer - a buffer for the title. May be NULL.
-// buflen - the length of the buffer, in bytes. May be 0.
+// document - handle to the document.
+// tag - the tag to retrieve. The tag can be one of:
+// Title, Author, Subject, Keywords, Creator, Producer,
+// CreationDate, or ModDate.
+// For detailed explanations of these tags and their respective
+// values, please refer to PDF Reference 1.6, section 10.2.1,
+// 'Document Information Dictionary'.
+// buffer - a buffer for the tag. May be NULL.
+// buflen - the length of the buffer, in bytes. May be 0.
//
-// Returns the number of bytes in the title, including trailing zeros.
+// Returns the number of bytes in the tag, including trailing zeros.
//
// The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two
// bytes of zeros indicating the end of the string. If |buflen| is less than
// the returned length, or |buffer| is NULL, |buffer| will not be modified.
-DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc,
+DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document,
FPDF_BYTESTRING tag,
void* buffer,
unsigned long buflen);
+// Get the page label for |page_index| from |document|.
+//
+// document - handle to the document.
+// page_index - the 0-based index of the page.
+// buffer - a buffer for the page label. May be NULL.
+// buflen - the length of the buffer, in bytes. May be 0.
+//
+// Returns the number of bytes in the page label, including trailing zeros.
+//
+// The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two
+// bytes of zeros indicating the end of the string. If |buflen| is less than
+// the returned length, or |buffer| is NULL, |buffer| will not be modified.
+DLLEXPORT unsigned long STDCALL FPDF_GetPagelLabel(FPDF_DOCUMENT document,
+ int page_index,
+ void* buffer,
+ unsigned long buflen);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus