Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: public/fpdfview.h

Issue 2475923003: Implement FPDF_VIEWERREF_GetName() API. (Closed)
Patch Set: Comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/fpdf_doc.h ('k') | testing/resources/viewer_ref.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/fpdfview.h
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 499124d6e8d4c354ad82b763e9c83feca7eb32cc..469053c4e8479debec7affb871d8bf5f796bfdc4 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -914,6 +914,25 @@ FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document);
DLLEXPORT FPDF_DUPLEXTYPE STDCALL
FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document);
+// Function: FPDF_VIEWERREF_GetName
+// Gets the contents for a viewer ref, with a given key. The value must
+// be of type "name".
+// Parameters:
+// document - Handle to the loaded document.
+// key - Name of the key in the viewer pref dictionary.
+// buffer - A string to write the contents of the key to.
+// length - Length of the buffer.
+// Return value:
+// The number of bytes in the contents, including the NULL terminator.
+// Thus if the return value is 0, then that indicates an error, such
+// as when |document| is invalid or |buffer| is NULL. If |length| is
+// less than the returned length, or |buffer| is NULL, |buffer| will
+// not be modified.
+DLLEXPORT unsigned long STDCALL FPDF_VIEWERREF_GetName(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING key,
+ char* buffer,
+ unsigned long length);
+
// Function: FPDF_CountNamedDests
// Get the count of named destinations in the PDF document.
// Parameters:
« no previous file with comments | « public/fpdf_doc.h ('k') | testing/resources/viewer_ref.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698