1e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Copyright 2014 PDFium Authors. All rights reserved.
2e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Use of this source code is governed by a BSD-style license that can be
3e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// found in the LICENSE file.
4e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
5e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
7e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#ifndef PUBLIC_FPDF_DOC_H_
8e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PUBLIC_FPDF_DOC_H_
9e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
10e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#include "fpdfview.h"
11e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
12e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Exported Functions
13e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#ifdef __cplusplus
14e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganovextern "C" {
15e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#endif
16e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
17e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_GetFirstChild
18e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the first child of a bookmark item, or the first top level bookmark item.
19e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
20e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument.
21e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          bookmark    -   Handle to the current bookmark. Can be NULL if you want to get the first top level item.
22e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
23e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the first child or top level bookmark item. NULL if no child or top level bookmark found.
24e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
25e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark);
26e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
27e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_GetNextSibling
28e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get next bookmark item at the same level.
29e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
30e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument.
31e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          bookmark    -   Handle to the current bookmark. Cannot be NULL.
32e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
33e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the next bookmark item at the same level. NULL if this is the last bookmark at this level.
34e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
35e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark);
36e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
37e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_GetTitle
38e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get title of a bookmark.
39e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
40e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          bookmark    -   Handle to the bookmark.
41e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buffer      -   Buffer for the title. Can be NULL.
42e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buflen      -   The length of the buffer in bytes. Can be 0.
43e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
44e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Number of bytes the title consumes, including trailing zeros.
45e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
46e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Regardless of the platform, the title is always in UTF-16LE encoding. That means the buffer
47e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          can be treated as an array of WORD (on Intel and compatible CPUs), each WORD representing the Unicode of
48e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          a character(some special Unicode may take 2 WORDs).The string is followed by two bytes of zero
49e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          indicating the end of the string.
50e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
51e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The return value always indicates the number of bytes required for the buffer, even if no buffer is specified
52e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          or the buffer size is less then required. In these cases, the buffer will not be modified.
53e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
54e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT unsigned long STDCALL FPDFBookmark_GetTitle(FPDF_BOOKMARK bookmark, void* buffer, unsigned long buflen);
55e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
56e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_Find
57e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Find a bookmark in the document, using the bookmark title.
58e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
59e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document. Returned by FPDF_LoadDocument or FPDF_LoadMemDocument.
60e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          title       -   The UTF-16LE encoded Unicode string for the bookmark title to be searched. Can't be NULL.
61e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
62e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the found bookmark item. NULL if the title can't be found.
63e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
64e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          It always returns the first found bookmark if more than one bookmarks have the same title.
65e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
66e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title);
67e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
68e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_GetDest
69e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the destination associated with a bookmark item.
70e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
71e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document.
72e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          bookmark    -   Handle to the bookmark.
73e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
74e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the destination data. NULL if no destination is associated with this bookmark.
75e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
76e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_DEST STDCALL FPDFBookmark_GetDest(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark);
77e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
78e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFBookmark_GetAction
79e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the action associated with a bookmark item.
80e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
81e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          bookmark    -   Handle to the bookmark.
82e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
83e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the action data. NULL if no action is associated with this bookmark. In this case, the
84e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          application should try FPDFBookmark_GetDest.
85e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
86e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK bookmark);
87e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
88e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PDFACTION_UNSUPPORTED       0       // Unsupported action type.
89e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PDFACTION_GOTO              1       // Go to a destination within current document.
90e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PDFACTION_REMOTEGOTO        2       // Go to a destination within another document.
91e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PDFACTION_URI               3       // Universal Resource Identifier, including web pages and
92e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov                                            // other Internet based resources.
93e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define PDFACTION_LAUNCH            4       // Launch an application or open a file.
94e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
95e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFAction_GetType
96e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get type of an action.
97e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
98e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          action      -   Handle to the action.
99e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
100e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          A type number as defined above.
101e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
102e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION action);
103e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
104e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFAction_GetDest
105e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get destination of an action.
106e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
107e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document.
108e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          action      -   Handle to the action. It must be a GOTO or REMOTEGOTO action.
109e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
110e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the destination data.
111e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
112e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          In case of remote goto action, the application should first use FPDFAction_GetFilePath to
113e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          get file path, then load that particular document, and use its document handle to call this
114e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          function.
115e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
116e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document, FPDF_ACTION action);
117e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
118e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFAction_GetURIPath
119e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get URI path of a URI action.
120e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
121e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document.
122e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          action      -   Handle to the action. Must be a URI action.
123e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buffer      -   A buffer for output the path string. Can be NULL.
124e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buflen      -   The length of the buffer, number of bytes. Can be 0.
125e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
126e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Number of bytes the URI path consumes, including trailing zeros.
127e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
128e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The URI path is always encoded in 7-bit ASCII.
129e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
130e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The return value always indicated number of bytes required for the buffer, even when there is
131e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          no buffer specified, or the buffer size is less then required. In this case, the buffer will not
132e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          be modified.
133e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
134e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, FPDF_ACTION action,
135e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov                                                      void* buffer, unsigned long buflen);
136e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
137e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFDest_GetPageIndex
138e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get page index of a destination.
139e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
140e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document.
141e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          dest        -   Handle to the destination.
142e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
143e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The page index. Starting from 0 for the first page.
144e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
145e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST dest);
146e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
147e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_GetLinkAtPoint
148e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Find a link at specified point on a document page.
149e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
150e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          page        -   Handle to the document page.
151e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          x           -   The x coordinate of the point, specified in page coordinate system.
152e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          y           -   The y coordinate of the point, specified in page coordinate system.
153e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
154e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the link. NULL if no link found at that point.
155e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
156e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The point coordinates are specified in page coordinate system. You can convert coordinates
157e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          from screen system to page system using FPDF_DeviceToPage functions.
158e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
159e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y);
160e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
161e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_GetDest
162e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get destination info of a link.
163e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
164e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          document    -   Handle to the document.
165e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          link        -   Handle to the link. Returned by FPDFLink_GetLinkAtPoint.
166e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
167e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the destination. NULL if there is no destination associated with the link, in this case
168e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          the application should try FPDFLink_GetAction.
169e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
170e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_DEST STDCALL FPDFLink_GetDest(FPDF_DOCUMENT document, FPDF_LINK link);
171e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
172e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_GetAction
173e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get action info of a link.
174e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
175e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          link        -   Handle to the link.
176e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
177e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Handle to the action. NULL if there is no action associated with the link.
178e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
179e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK link);
180e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
181e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_Enumerate
182e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          This function would enumerate all the link annotations in a single PDF page.
183e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
184e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          page[in]            -   Handle to the page.
185e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          startPos[in,out]    -   The start position to enumerate the link annotations, which should be specified to start from
186e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//                              -   0 for the first call, and would receive the next position for enumerating to start from.
187e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          linkAnnot[out]      -   Receive the link handle.
188e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
189e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          TRUE if succceed, else False;
190e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
191e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FPDF_LINK* linkAnnot);
192e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
193e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_GetAnnotRect
194e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the annotation rectangle. (Specified by the ��Rect�� entry of annotation dictionary).
195e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
196e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          linkAnnot[in]       -   Handle to the link annotation.
197e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          rect[out]           -   The annotation rect.
198e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
199e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          TRUE if succceed, else False;
200e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
201e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot, FS_RECTF* rect);
202e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
203e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_CountQuadPoints
204e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the count of quadrilateral points to the link annotation.
205e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
206e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          linkAnnot[in]       -   Handle to the link annotation.
207e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
208e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The count of quadrilateral points.
209e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
210e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot);
211e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
212e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov/* _FS_DEF_STRUCTURE_QUADPOINTSF_ */
213e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#ifndef _FS_DEF_STRUCTURE_QUADPOINTSF_
214e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#define _FS_DEF_STRUCTURE_QUADPOINTSF_
215e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganovtypedef struct _FS_QUADPOINTSF
216e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov{
217e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  x1;
218e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  y1;
219e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  x2;
220e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  y2;
221e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  x3;
222e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  y3;
223e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  x4;
224e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov    FS_FLOAT  y4;
225e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov} FS_QUADPOINTSF;
226e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#endif /* _FS_DEF_STRUCTURE_QUADPOINTSF_ */
227e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
228e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDFLink_GetQuadPoints
229e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get the quadrilateral points for the specified index in the link annotation.
230e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
231e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          linkAnnot[in]       -   Handle to the link annotation.
232e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          quadIndex[in]       -   The specified quad points index.
233e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          quadPoints[out]     -   Receive the quadrilateral points.
234e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
235e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          True if succeed, else False.
236e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
237e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quadIndex, FS_QUADPOINTSF* quadPoints);
238e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
239e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Function: FPDF_GetMetaText
240e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Get a text from meta data of the document. Result is encoded in UTF-16LE.
241e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Parameters:
242e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          doc         -   Handle to a document
243e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          tag         -   The tag for the meta data. Currently, It can be "Title", "Author",
244e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//                          "Subject", "Keywords", "Creator", "Producer", "CreationDate", or "ModDate".
245e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//                          For detailed explanation of these tags and their respective values,
246e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//                          please refer to PDF Reference 1.6, section 10.2.1, "Document Information Dictionary".
247e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buffer      -   A buffer for output the title. Can be NULL.
248e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          buflen      -   The length of the buffer, number of bytes. Can be 0.
249e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Return value:
250e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          Number of bytes the title consumes, including trailing zeros.
251e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov// Comments:
252e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          No matter on what platform, the title is always output in UTF-16LE encoding, which means the buffer
253e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          can be regarded as an array of WORD (on Intel and compatible CPUs), each WORD represent the Unicode of
254e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          a character (some special Unicode may take 2 WORDs). The string is followed by two bytes of zero
255e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          indicating end of the string.
256e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
257e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          The return value always indicated number of bytes required for the buffer, even when there is
258e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          no buffer specified, or the buffer size is less then required. In this case, the buffer will not
259e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//          be modified.
260e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov//
261e6986e1e8d4a57987f47c215490cb080a65ee29aSvet GanovDLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTRING tag,
262e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov                                                 void* buffer, unsigned long buflen);
263e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
264e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
265e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#ifdef __cplusplus
266e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov}
267e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#endif
268e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov
269e6986e1e8d4a57987f47c215490cb080a65ee29aSvet Ganov#endif  // PUBLIC_FPDF_DOC_H_
270