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

Side by Side Diff: public/fpdf_doc.h

Issue 2521843003: Add API for getting page labels. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« fpdfsdk/fpdfdoc.cpp ('K') | « fpdfsdk/fpdfview_c_api_test.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef PUBLIC_FPDF_DOC_H_ 7 #ifndef PUBLIC_FPDF_DOC_H_
8 #define PUBLIC_FPDF_DOC_H_ 8 #define PUBLIC_FPDF_DOC_H_
9 9
10 // NOLINTNEXTLINE(build/include) 10 // NOLINTNEXTLINE(build/include)
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // quadIndex - the specified quad point index. 274 // quadIndex - the specified quad point index.
275 // quadPoints - receives the quadrilateral points. 275 // quadPoints - receives the quadrilateral points.
276 // 276 //
277 // Returns true on success. 277 // Returns true on success.
278 DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, 278 DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot,
279 int quadIndex, 279 int quadIndex,
280 FS_QUADPOINTSF* quadPoints); 280 FS_QUADPOINTSF* quadPoints);
281 281
282 // Get meta-data |tag| content from |document|. 282 // Get meta-data |tag| content from |document|.
283 // 283 //
284 // doc - handle to the document 284 // document - handle to the document.
285 // tag - the tag to retrieve. The tag can be one of: 285 // tag - the tag to retrieve. The tag can be one of:
286 // Title, Author, Subject, Keywords, Creator, Producer, 286 // Title, Author, Subject, Keywords, Creator, Producer,
287 // CreationDate, or ModDate. 287 // CreationDate, or ModDate.
288 // For detailed explanations of these tags and their respective 288 // For detailed explanations of these tags and their respective
289 // values, please refer to PDF Reference 1.6, section 10.2.1, 289 // values, please refer to PDF Reference 1.6, section 10.2.1,
290 // 'Document Information Dictionary'. 290 // 'Document Information Dictionary'.
291 // buffer - a buffer for the title. May be NULL. 291 // buffer - a buffer for the tag. May be NULL.
292 // buflen - the length of the buffer, in bytes. May be 0. 292 // buflen - the length of the buffer, in bytes. May be 0.
293 // 293 //
294 // Returns the number of bytes in the title, including trailing zeros. 294 // Returns the number of bytes in the tag, including trailing zeros.
295 // 295 //
296 // The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two 296 // The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two
297 // bytes of zeros indicating the end of the string. If |buflen| is less than 297 // bytes of zeros indicating the end of the string. If |buflen| is less than
298 // the returned length, or |buffer| is NULL, |buffer| will not be modified. 298 // the returned length, or |buffer| is NULL, |buffer| will not be modified.
299 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, 299 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document,
300 FPDF_BYTESTRING tag, 300 FPDF_BYTESTRING tag,
301 void* buffer, 301 void* buffer,
302 unsigned long buflen); 302 unsigned long buflen);
303 303
304 // Get the page label for |page_index| from |document|.
305 //
306 // document - handle to the document.
307 // page_index - the index of the page.
dsinclair 2016/11/22 14:14:58 0-based ?
Lei Zhang 2016/11/23 01:53:42 Done.
308 // buffer - a buffer for the page label. May be NULL.
309 // buflen - the length of the buffer, in bytes. May be 0.
310 //
311 // Returns the number of bytes in the page label, including trailing zeros.
312 //
313 // The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two
314 // bytes of zeros indicating the end of the string. If |buflen| is less than
315 // the returned length, or |buffer| is NULL, |buffer| will not be modified.
316 DLLEXPORT unsigned long STDCALL FPDF_GetPagelLabel(FPDF_DOCUMENT document,
317 int page_index,
318 void* buffer,
319 unsigned long buflen);
320
304 #ifdef __cplusplus 321 #ifdef __cplusplus
305 } // extern "C" 322 } // extern "C"
306 #endif // __cplusplus 323 #endif // __cplusplus
307 324
308 #endif // PUBLIC_FPDF_DOC_H_ 325 #endif // PUBLIC_FPDF_DOC_H_
OLDNEW
« fpdfsdk/fpdfdoc.cpp ('K') | « fpdfsdk/fpdfview_c_api_test.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698