From d9dad3a1915973d113f1f8685474a5a8c1f4faac Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 6 Apr 2017 14:44:02 -0400 Subject: Add title (/T) extraction for PDF tagged structures This CL adds the ability to extract the title from a tagged structure element if one exists. Bug: pdfium:672 Change-Id: I22e2a8371db4f08b8a70dd77002f1befab97f530 Reviewed-on: https://pdfium-review.googlesource.com/3819 Reviewed-by: Lei Zhang Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- public/fpdf_structtree.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'public/fpdf_structtree.h') diff --git a/public/fpdf_structtree.h b/public/fpdf_structtree.h index 6f85d4222e..9cf46cc306 100644 --- a/public/fpdf_structtree.h +++ b/public/fpdf_structtree.h @@ -93,6 +93,26 @@ FPDF_StructElement_GetType(FPDF_STRUCTELEMENT struct_element, void* buffer, unsigned long buflen); +// Function: FPDF_StructElement_GetTitle +// Get the title (/T) for a given element. +// Parameters: +// struct_element - Handle to the struct element. +// buffer - A buffer for output. May be NULL. +// buflen - The length of the buffer, in bytes. May be 0. +// Return value: +// The number of bytes in the title, including the terminating NUL +// character. The number of bytes is returned regardless of the +// |buffer| and |buflen| parameters. +// Comments: +// Regardless of the platform, the |buffer| is always in UTF-16LE +// encoding. The string is terminated by a UTF16 NUL character. If +// |buflen| is less than the required length, or |buffer| is NULL, +// |buffer| will not be modified. +DLLEXPORT unsigned long STDCALL +FPDF_StructElement_GetTitle(FPDF_STRUCTELEMENT struct_element, + void* buffer, + unsigned long buflen); + // Function: FPDF_StructElement_CountChildren // Count the number of children for the structure element. // Parameters: -- cgit v1.2.3