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

Side by Side Diff: public/fpdfview.h

Issue 1140653004: Merge to XFA: Tidy public/ directory. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 7 months 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
« no previous file with comments | « public/fpdf_transformpage.h ('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 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename 7 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename
8 // despite lack of consitency with other public files. 8 // despite lack of consitency with other public files.
9 9
10 #ifndef _FPDFVIEW_H_ 10 #ifndef PUBLIC_FPDFVIEW_H_
11 #define _FPDFVIEW_H_ 11 #define PUBLIC_FPDFVIEW_H_
12 12
13 #if defined(_WIN32) && !defined(__WINDOWS__) 13 #if defined(_WIN32) && !defined(__WINDOWS__)
14 #include <windows.h> 14 #include <windows.h>
15 #endif 15 #endif
16 16
17 // TODO: remove the #define when XFA is officially in pdfium 17 // TODO: remove the #define when XFA is officially in pdfium
18 #define PDF_USE_XFA 18 #define PDF_USE_XFA
19 19
20 // Data types 20 // Data types
21 typedef void*» FPDF_MODULEMGR; 21 typedef void* FPDF_MODULEMGR;
22 22
23 // PDF types 23 // PDF types
24 typedef void*» FPDF_DOCUMENT;» » 24 typedef void* FPDF_DOCUMENT;
25 typedef void*» FPDF_PAGE;» » » 25 typedef void* FPDF_PAGE;
26 typedef void*» FPDF_WIDGET;» 26 typedef void* FPDF_WIDGET;
27 typedef void*» FPDF_STRINGHANDLE; 27 typedef void* FPDF_STRINGHANDLE;
28 typedef void*» FPDF_PAGEOBJECT;» // Page object(text, path, etc) 28 typedef void* FPDF_PAGEOBJECT; // Page object(text, path, etc)
29 typedef void*» FPDF_PATH; 29 typedef void* FPDF_PATH;
30 typedef void*» FPDF_CLIPPATH;» 30 typedef void* FPDF_CLIPPATH;
31 typedef void*» FPDF_BITMAP;» 31 typedef void* FPDF_BITMAP;
32 typedef void*» FPDF_FONT;» » » 32 typedef void* FPDF_FONT;
33 33 typedef void* FPDF_TEXTPAGE;
34 typedef void*» FPDF_TEXTPAGE; 34 typedef void* FPDF_SCHHANDLE;
35 typedef void*» FPDF_SCHHANDLE; 35 typedef void* FPDF_PAGELINK;
36 typedef void*» FPDF_PAGELINK; 36 typedef void* FPDF_HMODULE;
37 typedef void*» FPDF_HMODULE; 37 typedef void* FPDF_DOCSCHHANDLE;
38 typedef void*» FPDF_DOCSCHHANDLE; 38 typedef void* FPDF_BOOKMARK;
39 39 typedef void* FPDF_DEST;
40 typedef void*» FPDF_BOOKMARK; 40 typedef void* FPDF_ACTION;
41 typedef void*» FPDF_DEST; 41 typedef void* FPDF_LINK;
42 typedef void*» FPDF_ACTION; 42 typedef void* FPDF_PAGERANGE;
43 typedef void*» FPDF_LINK;
44 typedef void* FPDF_PAGERANGE;
45 43
46 // Basic data types 44 // Basic data types
47 typedef void*» » » FPDF_LPVOID; 45 typedef void* FPDF_LPVOID;
48 typedef void const*» » FPDF_LPCVOID; 46 typedef void const* FPDF_LPCVOID;
49 typedef int» » » » FPDF_RESULT; 47 typedef int FPDF_RESULT;
50 typedef int» » » » FPDF_BOOL; 48 typedef int FPDF_BOOL;
51 typedef int» » » » FPDF_ERROR;» 49 typedef int FPDF_ERROR;
52 typedef unsigned long» FPDF_DWORD; 50 typedef unsigned long FPDF_DWORD;
53 51 typedef float FS_FLOAT;
54 typedef»float» » » FS_FLOAT;
55 52
56 // Duplex types 53 // Duplex types
57 typedef enum _FPDF_DUPLEXTYPE_ { 54 typedef enum _FPDF_DUPLEXTYPE_ {
58 DuplexUndefined = 0, 55 DuplexUndefined = 0,
59 Simplex, 56 Simplex,
60 DuplexFlipShortEdge, 57 DuplexFlipShortEdge,
61 DuplexFlipLongEdge 58 DuplexFlipLongEdge
62 } FPDF_DUPLEXTYPE; 59 } FPDF_DUPLEXTYPE;
63 60
64 // String types 61 // String types
65 typedef unsigned short» » » FPDF_WCHAR; 62 typedef unsigned short FPDF_WCHAR;
66 typedef unsigned char const*» FPDF_LPCBYTE; 63 typedef unsigned char const* FPDF_LPCBYTE;
67 typedef char const*» » » » FPDF_LPCSTR; 64 typedef char const* FPDF_LPCSTR;
68 65
69 // FPDFSDK may use three types of strings: byte string, wide string (UTF-16LE en coded), and platform dependent string 66 // FPDFSDK may use three types of strings: byte string, wide string (UTF-16LE en coded), and platform dependent string
70 typedef const char*» » » » FPDF_BYTESTRING; 67 typedef const char* FPDF_BYTESTRING;
71 68
72 typedef const unsigned short*» FPDF_WIDESTRING;» » // Foxit PDF SDK always use UTF-16LE encoding wide string, 69 typedef const unsigned short* FPDF_WIDESTRING; // Foxit PDF SDK always us e UTF-16LE encoding wide string,
73 » » » » » » » » » » » » » » // each character use 2 bytes (except surrogatio n), with low byte first. 70 // each character use 2 by tes (except surrogation), with low byte first.
74 71
75 #ifndef _FPDF_DEF_STR_ 72 #ifndef _FPDF_DEF_STR_
76 #define _FPDF_DEF_STR_ 73 #define _FPDF_DEF_STR_
77 /** @brief Structure for byte string. 74 /** @brief Structure for byte string.
78 * 75 *
79 * @note In SDK, a byte string commonly means a UTF-16LE format string. 76 * @note In SDK, a byte string commonly means a UTF-16LE format string.
80 */ 77 */
81 typedef struct _FPDF_BSTR 78 typedef struct _FPDF_BSTR
82 { 79 {
83 » /** 80 /**
84 » * @brief String buffer. 81 * @brief String buffer.
85 » */ 82 */
86 » char*» str; 83 char* str;
87 » /** 84 /**
88 » * @brief» Length of a string, in bytes. 85 * @brief Length of a string, in bytes.
89 » */ 86 */
90 » int» len; 87 int len;
91 } FPDF_BSTR; 88 } FPDF_BSTR;
92 89
93 #endif 90 #endif
94 91
95 // For Windows programmers: for most case it's OK to treat FPDF_WIDESTRING as Wi ndows unicode string, 92 // For Windows programmers: for most case it's OK to treat FPDF_WIDESTRING as Wi ndows unicode string,
96 //» » however, special care needs to be taken if you expect to proces s Unicode larger than 0xffff. 93 // however, special care needs to be taken if you expect to process Unicod e larger than 0xffff.
97 // For Linux/Unix programmers: most compiler/library environment uses 4 bytes fo r a Unicode character, 94 // For Linux/Unix programmers: most compiler/library environment uses 4 bytes fo r a Unicode character,
98 //» » you have to convert between FPDF_WIDESTRING and system wide stri ng by yourself. 95 // you have to convert between FPDF_WIDESTRING and system wide string by yo urself.
99 96
100 #ifdef _WIN32_WCE 97 #ifdef _WIN32_WCE
101 typedef const unsigned short* FPDF_STRING; 98 typedef const unsigned short* FPDF_STRING;
102 #else 99 #else
103 typedef const char* FPDF_STRING; 100 typedef const char* FPDF_STRING;
104 #endif 101 #endif
105 102
106 #ifndef _FS_DEF_MATRIX_ 103 #ifndef _FS_DEF_MATRIX_
107 #define _FS_DEF_MATRIX_ 104 #define _FS_DEF_MATRIX_
108 /** @brief Matrix for transformation. */ 105 /** @brief Matrix for transformation. */
109 typedef struct _FS_MATRIX_ 106 typedef struct _FS_MATRIX_
110 { 107 {
111 » float» a;» /**< @brief Coefficient a.*/ 108 float a; /**< @brief Coefficient a.*/
112 » float» b;» /**< @brief Coefficient b.*/ 109 float b; /**< @brief Coefficient b.*/
113 » float» c;» /**< @brief Coefficient c.*/ 110 float c; /**< @brief Coefficient c.*/
114 » float» d;» /**< @brief Coefficient d.*/ 111 float d; /**< @brief Coefficient d.*/
115 » float» e;» /**< @brief Coefficient e.*/ 112 float e; /**< @brief Coefficient e.*/
116 » float» f;» /**< @brief Coefficient f.*/ 113 float f; /**< @brief Coefficient f.*/
117 } FS_MATRIX; 114 } FS_MATRIX;
118 #endif 115 #endif
119 116
120 #ifndef _FS_DEF_RECTF_ 117 #ifndef _FS_DEF_RECTF_
121 #define _FS_DEF_RECTF_ 118 #define _FS_DEF_RECTF_
122 /** @brief Rectangle area(float) in device or page coordination system. */ 119 /** @brief Rectangle area(float) in device or page coordination system. */
123 typedef struct _FS_RECTF_ 120 typedef struct _FS_RECTF_
124 { 121 {
125 » /**@{*/ 122 /**@{*/
126 » /** @brief The x-coordinate of the left-top corner. */ 123 /** @brief The x-coordinate of the left-top corner. */
127 » float» left; 124 float left;
128 » /** @brief The y-coordinate of the left-top corner. */ 125 /** @brief The y-coordinate of the left-top corner. */
129 » float» top; 126 float top;
130 » /** @brief The x-coordinate of the right-bottom corner. */ 127 /** @brief The x-coordinate of the right-bottom corner. */
131 » float» right; 128 float right;
132 » /** @brief The y-coordinate of the right-bottom corner. */ 129 /** @brief The y-coordinate of the right-bottom corner. */
133 » float» bottom; 130 float bottom;
134 » /**@}*/ 131 /**@}*/
135 }* FS_LPRECTF, FS_RECTF; 132 }* FS_LPRECTF, FS_RECTF;
136 /** @brief Const Pointer to ::FS_RECTF structure.*/ 133 /** @brief Const Pointer to ::FS_RECTF structure.*/
137 typedef const FS_RECTF*»FS_LPCRECTF; 134 typedef const FS_RECTF* FS_LPCRECTF;
138 #endif 135 #endif
139 136
140 #if defined(_WIN32) && defined(FPDFSDK_EXPORTS) 137 #if defined(_WIN32) && defined(FPDFSDK_EXPORTS)
141 // On Windows system, functions are exported in a DLL 138 // On Windows system, functions are exported in a DLL
142 #define DLLEXPORT __declspec( dllexport ) 139 #define DLLEXPORT __declspec( dllexport )
143 #define STDCALL __stdcall 140 #define STDCALL __stdcall
144 #else 141 #else
145 #define DLLEXPORT 142 #define DLLEXPORT
146 #define STDCALL 143 #define STDCALL
147 #endif 144 #endif
148 145
149 extern const char g_ExpireDate[]; 146 extern const char g_ExpireDate[];
150 extern const char g_ModuleCodes[]; 147 extern const char g_ModuleCodes[];
151 148
152 // Exported Functions 149 // Exported Functions
153 #ifdef __cplusplus 150 #ifdef __cplusplus
154 extern "C" { 151 extern "C" {
155 #endif 152 #endif
156 153
157 // Function: FPDF_InitLibrary 154 // Function: FPDF_InitLibrary
158 //» » » Initialize the FPDFSDK library 155 // Initialize the FPDFSDK library
159 // Parameters: 156 // Parameters:
160 //» » » None 157 // None
161 // Return value: 158 // Return value:
162 //» » » None. 159 // None.
163 // Comments: 160 // Comments:
164 //» » » You have to call this function before you can call any P DF processing functions. 161 // You have to call this function before you can call any PDF processin g functions.
165 162
166 DLLEXPORT void STDCALL FPDF_InitLibrary(); 163 DLLEXPORT void STDCALL FPDF_InitLibrary();
167 164
168 165
169 // Function: FPDF_DestroyLibary 166 // Function: FPDF_DestroyLibary
170 //» » » Release all resources allocated by the FPDFSDK library. 167 // Release all resources allocated by the FPDFSDK library.
171 // Parameters: 168 // Parameters:
172 //» » » None. 169 // None.
173 // Return value: 170 // Return value:
174 //» » » None. 171 // None.
175 // Comments: 172 // Comments:
176 //» » » You can call this function to release all memory blocks allocated by the library. 173 // You can call this function to release all memory blocks allocated by the library.
177 //» » » After this function called, you should not call any PDF processing functions. 174 // After this function called, you should not call any PDF processing f unctions.
178 DLLEXPORT void STDCALL FPDF_DestroyLibrary(); 175 DLLEXPORT void STDCALL FPDF_DestroyLibrary();
179 176
180 //Policy for accessing the local machine time. 177 //Policy for accessing the local machine time.
181 #define FPDF_POLICY_MACHINETIME_ACCESS» 0 178 #define FPDF_POLICY_MACHINETIME_ACCESS 0
182 179
183 // Function: FPDF_SetSandBoxPolicy 180 // Function: FPDF_SetSandBoxPolicy
184 //» » » Set the policy for the sandbox environment. 181 // Set the policy for the sandbox environment.
185 // Parameters:» 182 // Parameters:
186 //» » » policy» » -» The specified policy for setting , for example:FPDF_POLICY_MACHINETIME_ACCESS. 183 // policy - The specified policy for setting, for example:FPDF_P OLICY_MACHINETIME_ACCESS.
187 //» » » enable» » -» True for enable, False for disab le the policy. 184 // enable - True for enable, False for disable the policy.
188 // Return value: 185 // Return value:
189 //» » » None. 186 // None.
190 DLLEXPORT void» STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enabl e); 187 DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enabl e);
191 188
192 /** 189 /**
193 * Open and load a PDF document. 190 * Open and load a PDF document.
194 * @param[in] file_path» -» Path to the PDF file (including extension). 191 * @param[in] file_path - Path to the PDF file (including extension).
195 * @param[in] password» -» A string used as the password for PDF file. 192 * @param[in] password - A string used as the password for PDF file.
196 *» » » » » » » If no password needed, e mpty or NULL can be used. 193 * If no password needed, empty or NULL can be used.
197 * @note»» Loaded document can be closed by FPDF_CloseDocument. 194 * @note Loaded document can be closed by FPDF_CloseDocument.
198 *» » » If this function fails, you can use FPDF_GetLastError() to retrieve 195 * If this function fails, you can use FPDF_GetLastError() to retrieve
199 *» » » the reason why it fails. 196 * the reason why it fails.
200 *» » » The application should call ::FPDF_LoadXFA function afte r PDF document loaded 197 * The application should call ::FPDF_LoadXFA function after PDF docume nt loaded
201 *» » » to support XFA fields in fpdfformfill.h file. 198 * to support XFA fields in fpdfformfill.h file.
202 * 199 *
203 * @retval» A handle to the loaded document. If failed, NULL is returned. 200 * @retval A handle to the loaded document. If failed, NULL is returned.
204 */ 201 */
205 DLLEXPORT FPDF_DOCUMENT»STDCALL FPDF_LoadDocument(FPDF_STRING file_path, 202 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
206 » FPDF_BYTESTRING password); 203 FPDF_BYTESTRING password);
207 204
208 // Function: FPDF_LoadMemDocument 205 // Function: FPDF_LoadMemDocument
209 //» » » Open and load a PDF document from memory. 206 // Open and load a PDF document from memory.
210 // Parameters: 207 // Parameters:
211 //» » » data_buf» -» Pointer to a buffer containing t he PDF document. 208 // data_buf - Pointer to a buffer containing the PDF document.
212 //» » » size» » -» Number of bytes in the PDF docum ent. 209 // size - Number of bytes in the PDF document.
213 //» » » password» -» A string used as the password fo r PDF file. 210 // password - A string used as the password for PDF file.
214 //» » » » » » » If no password needed, e mpty or NULL can be used. 211 // If no password needed, empty or NULL can be used.
215 // Return value: 212 // Return value:
216 //» » » A handle to the loaded document. If failed, NULL is retu rned. 213 // A handle to the loaded document. If failed, NULL is returned.
217 // Comments: 214 // Comments:
218 //» » » The memory buffer must remain valid when the document is open. 215 // The memory buffer must remain valid when the document is open.
219 //» » » Loaded document can be closed by FPDF_CloseDocument. 216 // Loaded document can be closed by FPDF_CloseDocument.
220 //» » » If this function fails, you can use FPDF_GetLastError() to retrieve 217 // If this function fails, you can use FPDF_GetLastError() to retrieve
221 //» » » the reason why it fails. 218 // the reason why it fails.
222 // Notes: 219 // Notes:
223 //» » » The application should call ::FPDF_LoadXFA function afte r PDF document loaded 220 // The application should call ::FPDF_LoadXFA function after PDF docume nt loaded
224 //» » » to support XFA fields in fpdfformfill.h file. 221 // to support XFA fields in fpdfformfill.h file.
225 // 222 //
226 DLLEXPORT FPDF_DOCUMENT»STDCALL FPDF_LoadMemDocument(const void* data_buf, 223 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf,
227 » » » » » » » » » » » int size, FPDF_BYTESTRING password); 224 int size, FPDF_BYTESTRING password);
228 225
229 // Structure for custom file access. 226 // Structure for custom file access.
230 typedef struct { 227 typedef struct {
231 » // File length, in bytes. 228 // File length, in bytes.
232 » unsigned long» m_FileLen; 229 unsigned long m_FileLen;
233 230
234 » // A function pointer for getting a block of data from specific position . 231 // A function pointer for getting a block of data from specific position.
235 » // Position is specified by byte offset from beginning of the file. 232 // Position is specified by byte offset from beginning of the file.
236 » // The position and size will never go out range of file length. 233 // The position and size will never go out range of file length.
237 » // It may be possible for FPDFSDK to call this function multiple times f or same position. 234 // It may be possible for FPDFSDK to call this function multiple times for s ame position.
238 » // Return value: should be non-zero if successful, zero for error. 235 // Return value: should be non-zero if successful, zero for error.
239 » int» » » » (*m_GetBlock)(void* param, unsigned long position, unsigned char* pBuf, unsigned long size); 236 int (*m_GetBlock)(void* param, unsigned long position, unsigned char* pBuf, unsigned long size);
240 237
241 » // A custom pointer for all implementation specific data. 238 // A custom pointer for all implementation specific data.
242 » // This pointer will be used as the first parameter to m_GetBlock callba ck. 239 // This pointer will be used as the first parameter to m_GetBlock callback.
243 » void*» » » m_Param; 240 void* m_Param;
244 } FPDF_FILEACCESS; 241 } FPDF_FILEACCESS;
245 242
246 /** 243 /**
247 * @brief Structure for file reading or writing (I/O). 244 * @brief Structure for file reading or writing (I/O).
248 * 245 *
249 * @note This is a handler and should be implemented by callers. 246 * @note This is a handler and should be implemented by callers.
250 */ 247 */
251 typedef struct _FPDF_FILEHANDLER 248 typedef struct _FPDF_FILEHANDLER
252 { 249 {
253 » /** 250 /**
254 » * @brief User-defined data. 251 * @brief User-defined data.
255 » * @note Callers can use this field to track controls. 252 * @note Callers can use this field to track controls.
256 » */ 253 */
257 » FPDF_LPVOID» clientData; 254 FPDF_LPVOID clientData;
258 » /** 255 /**
259 » * @brief Callback function to release the current file stream object. 256 * @brief Callback function to release the current file stream object.
260 » * 257 *
261 » * @param[in] clientData» Pointer to user-defined data. 258 * @param[in] clientData Pointer to user-defined data.
262 » * 259 *
263 » * @return None. 260 * @return None.
264 » */ 261 */
265 » void» » (*Release)(FPDF_LPVOID clientData); 262 void (*Release)(FPDF_LPVOID clientData);
266 » /** 263 /**
267 » * @brief Callback function to retrieve the current file stream size. 264 * @brief Callback function to retrieve the current file stream size.
268 » * 265 *
269 » * @param[in] clientData» Pointer to user-defined data. 266 * @param[in] clientData Pointer to user-defined data.
270 » * 267 *
271 » * @return Size of file stream. 268 * @return Size of file stream.
272 » */ 269 */
273 » FPDF_DWORD» (*GetSize)(FPDF_LPVOID clientData); 270 FPDF_DWORD (*GetSize)(FPDF_LPVOID clientData);
274 » /** 271 /**
275 » * @brief Callback function to read data from the current file stream. 272 * @brief Callback function to read data from the current file stream.
276 » * 273 *
277 » * @param[in]» clientData» Pointer to user-defined data. 274 * @param[in] clientData Pointer to user-defined data.
278 » * @param[in]» offset» » Offset position starts from the beginnin g of file stream. This parameter indicates reading position. 275 * @param[in] offset Offset position starts from the beginning of fil e stream. This parameter indicates reading position.
279 » * @param[in]» buffer» » Memory buffer to store data which are re ad from file stream. This parameter should not be <b>NULL</b>. 276 * @param[in] buffer Memory buffer to store data which are read from file stream. This parameter should not be <b>NULL</b>.
280 » * @param[in]» size» » Size of data which should be read from f ile stream, in bytes. The buffer indicated by the parameter <i>buffer</i> should be enough to store specified data. 277 * @param[in] size Size of data which should be read from file stre am, in bytes. The buffer indicated by the parameter <i>buffer</i> should be enou gh to store specified data.
281 » * 278 *
282 » * @return 0 for success, other value for failure. 279 * @return 0 for success, other value for failure.
283 » */ 280 */
284 » FPDF_RESULT» (*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOID buffer, FPDF_DWORD size); 281 FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPV OID buffer, FPDF_DWORD size);
285 » /** 282 /**
286 » * @brief» Callback function to write data into the current file st ream. 283 * @brief Callback function to write data into the current file stream.
287 » * 284 *
288 » * @param[in]» clientData» Pointer to user-defined data. 285 * @param[in] clientData Pointer to user-defined data.
289 » * @param[in]» offset» » Offset position starts from the beginnin g of file stream. This parameter indicates writing position. 286 * @param[in] offset Offset position starts from the beginning of fil e stream. This parameter indicates writing position.
290 » * @param[in]» buffer» » Memory buffer contains data which is wri tten into file stream. This parameter should not be <b>NULL</b>. 287 * @param[in] buffer Memory buffer contains data which is written int o file stream. This parameter should not be <b>NULL</b>.
291 » * @param[in]» size» » Size of data which should be written int o file stream, in bytes. 288 * @param[in] size Size of data which should be written into file s tream, in bytes.
292 » * 289 *
293 » * @return 0 for success, other value for failure. 290 * @return 0 for success, other value for failure.
294 » */ 291 */
295 » FPDF_RESULT» (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCVOID buffer, FPDF_DWORD size); 292 FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LP CVOID buffer, FPDF_DWORD size);
296 » /** 293 /**
297 » * @brief» Callback function to flush all internal accessing buffer s. 294 * @brief Callback function to flush all internal accessing buffers.
298 » * 295 *
299 » * @param[in]» clientData» Pointer to user-defined data. 296 * @param[in] clientData Pointer to user-defined data.
300 » * 297 *
301 » * @return 0 for success, other value for failure. 298 * @return 0 for success, other value for failure.
302 » */ 299 */
303 » FPDF_RESULT» (*Flush)(FPDF_LPVOID clientData); 300 FPDF_RESULT (*Flush)(FPDF_LPVOID clientData);
304 » /** 301 /**
305 » * @brief» Callback function to change file size. 302 * @brief Callback function to change file size.
306 » * 303 *
307 » * @details» This function is called under writing mode usually. Impl ementer can determine whether to realize it based on application requests. 304 * @details This function is called under writing mode usually. Implementer can determine whether to realize it based on application requests.
308 » * 305 *
309 » * @param[in]» clientData» Pointer to user-defined data. 306 * @param[in] clientData Pointer to user-defined data.
310 » * @param[in]» size» » New size of file stream, in bytes. 307 * @param[in] size New size of file stream, in bytes.
311 » * 308 *
312 » * @return 0 for success, other value for failure. 309 * @return 0 for success, other value for failure.
313 » */ 310 */
314 » FPDF_RESULT» (*Truncate)(FPDF_LPVOID clientData, FPDF_DWORD size); 311 FPDF_RESULT (*Truncate)(FPDF_LPVOID clientData, FPDF_DWORD size);
315 312
316 } FPDF_FILEHANDLER, *FPDF_LPFILEHANDLER; 313 } FPDF_FILEHANDLER, *FPDF_LPFILEHANDLER;
317 314
318 // Function: FPDF_LoadCustomDocument 315 // Function: FPDF_LoadCustomDocument
319 //» » » Load PDF document from a custom access descriptor. 316 // Load PDF document from a custom access descriptor.
320 // Parameters: 317 // Parameters:
321 //» » » pFileAccess» -» A structure for access the file. 318 // pFileAccess - A structure for access the file.
322 //» » » password» -» Optional password for decrypting the PDF file. 319 // password - Optional password for decrypting the PDF file.
323 // Return value: 320 // Return value:
324 //» » » A handle to the loaded document. If failed, NULL is retu rned. 321 // A handle to the loaded document. If failed, NULL is returned.
325 // Comments: 322 // Comments:
326 //» » » The application should maintain the file resources being valid until the PDF document close. 323 // The application should maintain the file resources being valid until the PDF document close.
327 //» » » Loaded document can be closed by FPDF_CloseDocument. 324 // Loaded document can be closed by FPDF_CloseDocument.
328 // Notes: 325 // Notes:
329 //» » » The application should call ::FPDF_LoadXFA function afte r PDF document loaded 326 // The application should call ::FPDF_LoadXFA function after PDF docume nt loaded
330 //» » » to support XFA fields in fpdfformfill.h file. 327 // to support XFA fields in fpdfformfill.h file.
331 // 328 //
332 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAc cess, 329 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAc cess,
333 » » » » » » » » » » » » » » FPDF_BYTESTRING password); 330 FPDF_BYTESTRING password );
334 331
335 // Function: FPDF_GetFileVersion 332 // Function: FPDF_GetFileVersion
336 //» » » Get the file version of the specific PDF document. 333 // Get the file version of the specific PDF document.
337 // Parameters: 334 // Parameters:
338 //» » » doc» » » -» Handle to document. 335 // doc - Handle to document.
339 //» » » fileVersion» -» The PDF file version. File versi on: 14 for 1.4, 15 for 1.5, ... 336 // fileVersion - The PDF file version. File version: 14 for 1.4, 15 f or 1.5, ...
340 // Return value: 337 // Return value:
341 //» » » TRUE if this call succeed, If failed, FALSE is returned. 338 // TRUE if this call succeed, If failed, FALSE is returned.
342 // Comments: 339 // Comments:
343 //» » » If the document is created by function ::FPDF_CreateNewD ocument, then this function would always fail. 340 // If the document is created by function ::FPDF_CreateNewDocument, the n this function would always fail.
344 // 341 //
345 DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, int* fileVers ion); 342 DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, int* fileVers ion);
346 343
347 #define FPDF_ERR_SUCCESS» » 0» » // No error. 344 #define FPDF_ERR_SUCCESS 0 // No error.
348 #define FPDF_ERR_UNKNOWN» » 1» » // Unknown error. 345 #define FPDF_ERR_UNKNOWN 1 // Unknown error.
349 #define FPDF_ERR_FILE» » » 2» » // File not found or cou ld not be opened. 346 #define FPDF_ERR_FILE 2 // File not found or could not be opened .
350 #define FPDF_ERR_FORMAT»» » 3» » // File not in PDF forma t or corrupted. 347 #define FPDF_ERR_FORMAT 3 // File not in PDF format or corrupted.
351 #define FPDF_ERR_PASSWORD» » 4» » // Password required or incorrect password. 348 #define FPDF_ERR_PASSWORD 4 // Password required or incorrect passwo rd.
352 #define FPDF_ERR_SECURITY» » 5» » // Unsupported security scheme. 349 #define FPDF_ERR_SECURITY 5 // Unsupported security scheme.
353 #define FPDF_ERR_PAGE» » » 6» » // Page not found or con tent error. 350 #define FPDF_ERR_PAGE 6 // Page not found or content error.
354 #define FPDF_ERR_XFALOAD» » 7» » // Load XFA error. 351 #define FPDF_ERR_XFALOAD 7 // Load XFA error.
355 #define FPDF_ERR_XFALAYOUT» » 8 // Layout XFA error. 352 #define FPDF_ERR_XFALAYOUT 8 // Layout XFA error.
356 353
357 // Function: FPDF_GetLastError 354 // Function: FPDF_GetLastError
358 //» » » Get last error code when an SDK function failed. 355 // Get last error code when an SDK function failed.
359 // Parameters: 356 // Parameters:
360 //» » » None. 357 // None.
361 // Return value: 358 // Return value:
362 //» » » A 32-bit integer indicating error codes (defined above). 359 // A 32-bit integer indicating error codes (defined above).
363 // Comments: 360 // Comments:
364 //» » » If the previous SDK call succeeded, the return value of this function 361 // If the previous SDK call succeeded, the return value of this functio n
365 //» » » is not defined. 362 // is not defined.
366 // 363 //
367 DLLEXPORT unsigned long»STDCALL FPDF_GetLastError(); 364 DLLEXPORT unsigned long STDCALL FPDF_GetLastError();
368 365
369 // Function: FPDF_GetDocPermission 366 // Function: FPDF_GetDocPermission
370 //» » » Get file permission flags of the document. 367 // Get file permission flags of the document.
371 // Parameters: 368 // Parameters:
372 //» » » document» -» Handle to document. Returned by FPDF_LoadDocument function. 369 // document - Handle to document. Returned by FPDF_LoadDocument fu nction.
373 // Return value: 370 // Return value:
374 //» » » A 32-bit integer indicating permission flags. Please ref er to PDF Reference for 371 // A 32-bit integer indicating permission flags. Please refer to PDF Re ference for
375 //» » » detailed description. If the document is not protected, 0xffffffff will be returned. 372 // detailed description. If the document is not protected, 0xffffffff w ill be returned.
376 // 373 //
377 DLLEXPORT unsigned long»STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document); 374 DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document);
378 375
379 // Function: FPDF_GetSecurityHandlerRevision 376 // Function: FPDF_GetSecurityHandlerRevision
380 //» » » Get the revision for security handler. 377 // Get the revision for security handler.
381 // Parameters: 378 // Parameters:
382 //» » » document» -» Handle to document. Returned by FPDF_LoadDocument function. 379 // document - Handle to document. Returned by FPDF_LoadDocument fu nction.
383 // Return value: 380 // Return value:
384 //» » » The security handler revision number. Please refer to PD F Reference for 381 // The security handler revision number. Please refer to PDF Reference for
385 //» » » detailed description. If the document is not protected, -1 will be returned. 382 // detailed description. If the document is not protected, -1 will be r eturned.
386 // 383 //
387 DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document); 384 DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document);
388 385
389 // Function: FPDF_GetPageCount 386 // Function: FPDF_GetPageCount
390 //» » » Get total number of pages in a document. 387 // Get total number of pages in a document.
391 // Parameters: 388 // Parameters:
392 //» » » document» -» Handle to document. Returned by FPDF_LoadDocument function. 389 // document - Handle to document. Returned by FPDF_LoadDocument fu nction.
393 // Return value: 390 // Return value:
394 //» » » Total number of pages in the document. 391 // Total number of pages in the document.
395 // 392 //
396 DLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document); 393 DLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document);
397 394
398 // Function: FPDF_LoadPage 395 // Function: FPDF_LoadPage
399 //» » » Load a page inside a document. 396 // Load a page inside a document.
400 // Parameters: 397 // Parameters:
401 //» » » document» -» Handle to document. Returned by FPDF_LoadDocument function. 398 // document - Handle to document. Returned by FPDF_LoadDocument fu nction.
402 //» » » page_index» -» Index number of the page. 0 for the first page. 399 // page_index - Index number of the page. 0 for the first page.
403 // Return value: 400 // Return value:
404 //» » » A handle to the loaded page. If failed, NULL is returned . 401 // A handle to the loaded page. If failed, NULL is returned.
405 // Comments: 402 // Comments:
406 //» » » Loaded page can be rendered to devices using FPDF_Render Page function. 403 // Loaded page can be rendered to devices using FPDF_RenderPage functio n.
407 //» » » Loaded page can be closed by FPDF_ClosePage. 404 // Loaded page can be closed by FPDF_ClosePage.
408 // 405 //
409 DLLEXPORT FPDF_PAGE» STDCALL FPDF_LoadPage(FPDF_DOCUMENT document, int page_i ndex); 406 DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document, int page_index );
410 407
411 // Function: FPDF_GetPageWidth 408 // Function: FPDF_GetPageWidth
412 //» » » Get page width. 409 // Get page width.
413 // Parameters: 410 // Parameters:
414 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 411 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
415 // Return value: 412 // Return value:
416 //» » » Page width (excluding non-displayable area) measured in points. 413 // Page width (excluding non-displayable area) measured in points.
417 //» » » One point is 1/72 inch (around 0.3528 mm). 414 // One point is 1/72 inch (around 0.3528 mm).
418 // 415 //
419 DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page); 416 DLLEXPORT double STDCALL FPDF_GetPageWidth(FPDF_PAGE page);
420 417
421 // Function: FPDF_GetPageHeight 418 // Function: FPDF_GetPageHeight
422 //» » » Get page height. 419 // Get page height.
423 // Parameters: 420 // Parameters:
424 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 421 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
425 // Return value: 422 // Return value:
426 //» » » Page height (excluding non-displayable area) measured in points. 423 // Page height (excluding non-displayable area) measured in points.
427 //» » » One point is 1/72 inch (around 0.3528 mm) 424 // One point is 1/72 inch (around 0.3528 mm)
428 // 425 //
429 DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page); 426 DLLEXPORT double STDCALL FPDF_GetPageHeight(FPDF_PAGE page);
430 427
431 // Function: FPDF_GetPageSizeByIndex 428 // Function: FPDF_GetPageSizeByIndex
432 //» » » Get the size of a page by index. 429 // Get the size of a page by index.
433 // Parameters: 430 // Parameters:
434 //» » » document» -» Handle to document. Returned by FPDF_LoadDocument function. 431 // document - Handle to document. Returned by FPDF_LoadDocument fu nction.
435 //» » » page_index» -» Page index, zero for the first p age. 432 // page_index - Page index, zero for the first page.
436 //» » » width» » -» Pointer to a double value receiv ing the page width (in points). 433 // width - Pointer to a double value receiving the page width ( in points).
437 //» » » height» » -» Pointer to a double value receiv ing the page height (in points). 434 // height - Pointer to a double value receiving the page height (in points).
438 // Return value: 435 // Return value:
439 //» » » Non-zero for success. 0 for error (document or page not found). 436 // Non-zero for success. 0 for error (document or page not found).
440 // 437 //
441 DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, int page_i ndex, double* width, double* height); 438 DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, int page_i ndex, double* width, double* height);
442 439
443 440
444 // Page rendering flags. They can be combined with bit OR. 441 // Page rendering flags. They can be combined with bit OR.
445 #define FPDF_ANNOT» » » 0x01» » // Set if annotations ar e to be rendered. 442 #define FPDF_ANNOT 0x01 // Set if annotations are to be rendered .
446 #define FPDF_LCD_TEXT» » 0x02» » // Set if using text rendering o ptimized for LCD display. 443 #define FPDF_LCD_TEXT 0x02 // Set if using text rendering optimized for LCD display.
447 #define FPDF_NO_NATIVETEXT» 0x04» » // Don't use the native text out put available on some platforms 444 #define FPDF_NO_NATIVETEXT 0x04 // Don't use the native text output avai lable on some platforms
448 #define FPDF_GRAYSCALE» » 0x08» » // Grayscale output. 445 #define FPDF_GRAYSCALE 0x08 // Grayscale output.
449 #define FPDF_DEBUG_INFO»» 0x80» » // Set if you want to get some d ebug info. 446 #define FPDF_DEBUG_INFO 0x80 // Set if you want to get some debug inf o.
450 » » » » » » » » » » // Please discuss with Foxit first if you need to collect debug info. 447 // Please discuss with Foxit first if yo u need to collect debug info.
451 #define FPDF_NO_CATCH» » 0x100» » // Set if you don't want to catc h exception. 448 #define FPDF_NO_CATCH 0x100 // Set if you don't want to catch except ion.
452 #define FPDF_RENDER_LIMITEDIMAGECACHE» 0x200» // Limit image cache size. 449 #define FPDF_RENDER_LIMITEDIMAGECACHE 0x200 // Limit image cache size.
453 #define FPDF_RENDER_FORCEHALFTONE» » 0x400» // Always use halftone f or image stretching. 450 #define FPDF_RENDER_FORCEHALFTONE 0x400 // Always use halftone for image stretching.
454 #define FPDF_PRINTING» » 0x800» // Render for printing. 451 #define FPDF_PRINTING 0x800 // Render for printing.
455 #define FPDF_REVERSE_BYTE_ORDER»» 0x10» » //set whether render in a reverse Byte order, this flag only 452 #define FPDF_REVERSE_BYTE_ORDER 0x10 //set whether render in a revers e Byte order, this flag only
456 » » » » » » » » » » » » //enable when render to a bitmap. 453 //enable when render to a bitmap .
457 #ifdef _WIN32 454 #ifdef _WIN32
458 // Function: FPDF_RenderPage 455 // Function: FPDF_RenderPage
459 //» » » Render contents in a page to a device (screen, bitmap, o r printer). 456 // Render contents in a page to a device (screen, bitmap, or printer).
460 //» » » This function is only supported on Windows system. 457 // This function is only supported on Windows system.
461 // Parameters: 458 // Parameters:
462 //» » » dc» » » -» Handle to device context . 459 // dc - Handle to device context.
463 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 460 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
464 //» » » start_x»» -» Left pixel position of the displ ay area in the device coordinate. 461 // start_x - Left pixel position of the display area in the devic e coordinate.
465 //» » » start_y»» -» Top pixel position of the displa y area in the device coordinate. 462 // start_y - Top pixel position of the display area in the device coordinate.
466 //» » » size_x» » -» Horizontal size (in pixels) for displaying the page. 463 // size_x - Horizontal size (in pixels) for displaying the page.
467 //» » » size_y» » -» Vertical size (in pixels) for di splaying the page. 464 // size_y - Vertical size (in pixels) for displaying the page.
468 //» » » rotate» » -» Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 465 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
469 //» » » » » » » » 2 (rotated 180 d egrees), 3 (rotated 90 degrees counter-clockwise). 466 // 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise).
470 //» » » flags» » -» 0 for normal display, or combina tion of flags defined above. 467 // flags - 0 for normal display, or combination of flags define d above.
471 // Return value: 468 // Return value:
472 //» » » None. 469 // None.
473 // Notes: 470 // Notes:
474 //» » » The method can not support to render the page for the do cument consists of dynamic XFA fields. 471 // The method can not support to render the page for the document consi sts of dynamic XFA fields.
475 // 472 //
476 DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, 473 DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,
477 » » » » » » int rotate, int flags); 474 int rotate, int flags);
478 #endif 475 #endif
479 476
480 // Function: FPDF_RenderPageBitmap 477 // Function: FPDF_RenderPageBitmap
481 //» » » Render contents in a page to a device independent bitmap 478 // Render contents in a page to a device independent bitmap
482 // Parameters: 479 // Parameters:
483 //» » » bitmap» » -» Handle to the device independent bitmap (as the output buffer). 480 // bitmap - Handle to the device independent bitmap (as the outp ut buffer).
484 //» » » » » » » Bitmap handle can be cre ated by FPDFBitmap_Create function. 481 // Bitmap handle can be created by FPDFBitmap_Create fu nction.
485 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 482 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
486 //» » » start_x»» -» Left pixel position of the displ ay area in the bitmap coordinate. 483 // start_x - Left pixel position of the display area in the bitma p coordinate.
487 //» » » start_y»» -» Top pixel position of the displa y area in the bitmap coordinate. 484 // start_y - Top pixel position of the display area in the bitmap coordinate.
488 //» » » size_x» » -» Horizontal size (in pixels) for displaying the page. 485 // size_x - Horizontal size (in pixels) for displaying the page.
489 //» » » size_y» » -» Vertical size (in pixels) for di splaying the page. 486 // size_y - Vertical size (in pixels) for displaying the page.
490 //» » » rotate» » -» Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 487 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
491 //» » » » » » » » 2 (rotated 180 d egrees), 3 (rotated 90 degrees counter-clockwise). 488 // 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise).
492 //» » » flags» » -» 0 for normal display, or combina tion of flags defined above. 489 // flags - 0 for normal display, or combination of flags define d above.
493 // Return value: 490 // Return value:
494 //» » » None. 491 // None.
495 // Notes: 492 // Notes:
496 //» » » The method can not support to render the page for the do cument consists of dynamic XFA fields. 493 // The method can not support to render the page for the document consi sts of dynamic XFA fields.
497 // 494 //
498 DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, 495 DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y,
499 » » » » » » int size_x, int size_y, int rota te, int flags); 496 int size_x, int size_y, int rotate, int flags);
500 497
501 // Function: FPDF_ClosePage 498 // Function: FPDF_ClosePage
502 //» » » Close a loaded PDF page. 499 // Close a loaded PDF page.
503 // Parameters: 500 // Parameters:
504 //» » » page» » -» Handle to the loaded page. 501 // page - Handle to the loaded page.
505 // Return value: 502 // Return value:
506 //» » » None. 503 // None.
507 // 504 //
508 DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page); 505 DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page);
509 506
510 // Function: FPDF_CloseDocument 507 // Function: FPDF_CloseDocument
511 //» » » Close a loaded PDF document. 508 // Close a loaded PDF document.
512 // Parameters: 509 // Parameters:
513 //» » » document» -» Handle to the loaded document. 510 // document - Handle to the loaded document.
514 // Return value: 511 // Return value:
515 //» » » None. 512 // None.
516 // 513 //
517 DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document); 514 DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document);
518 515
519 // Function: FPDF_DeviceToPage 516 // Function: FPDF_DeviceToPage
520 //» » » Convert the screen coordinate of a point to page coordin ate. 517 // Convert the screen coordinate of a point to page coordinate.
521 // Parameters: 518 // Parameters:
522 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 519 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
523 //» » » start_x»» -» Left pixel position of the displ ay area in the device coordinate. 520 // start_x - Left pixel position of the display area in the devic e coordinate.
524 //» » » start_y»» -» Top pixel position of the displa y area in the device coordinate. 521 // start_y - Top pixel position of the display area in the device coordinate.
525 //» » » size_x» » -» Horizontal size (in pixels) for displaying the page. 522 // size_x - Horizontal size (in pixels) for displaying the page.
526 //» » » size_y» » -» Vertical size (in pixels) for di splaying the page. 523 // size_y - Vertical size (in pixels) for displaying the page.
527 //» » » rotate» » -» Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 524 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
528 //» » » » » » » » 2 (rotated 180 d egrees), 3 (rotated 90 degrees counter-clockwise). 525 // 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise).
529 //» » » device_x» -» X value in device coordinate, fo r the point to be converted. 526 // device_x - X value in device coordinate, for the point to be co nverted.
530 //» » » device_y» -» Y value in device coordinate, fo r the point to be converted. 527 // device_y - Y value in device coordinate, for the point to be co nverted.
531 //» » » page_x» » -» A Pointer to a double receiving the converted X value in page coordinate. 528 // page_x - A Pointer to a double receiving the converted X valu e in page coordinate.
532 //» » » page_y» » -» A Pointer to a double receiving the converted Y value in page coordinate. 529 // page_y - A Pointer to a double receiving the converted Y valu e in page coordinate.
533 // Return value: 530 // Return value:
534 //» » » None. 531 // None.
535 // Comments: 532 // Comments:
536 //» » » The page coordinate system has its origin at left-bottom corner of the page, with X axis goes along 533 // The page coordinate system has its origin at left-bottom corner of t he page, with X axis goes along
537 //» » » the bottom side to the right, and Y axis goes along the left side upward. NOTE: this coordinate system 534 // the bottom side to the right, and Y axis goes along the left side up ward. NOTE: this coordinate system
538 //» » » can be altered when you zoom, scroll, or rotate a page, however, a point on the page should always have 535 // can be altered when you zoom, scroll, or rotate a page, however, a p oint on the page should always have
539 //» » » the same coordinate values in the page coordinate system . 536 // the same coordinate values in the page coordinate system.
540 // 537 //
541 //» » » The device coordinate system is device dependent. For sc reen device, its origin is at left-top 538 // The device coordinate system is device dependent. For screen device, its origin is at left-top
542 //» » » corner of the window. However this origin can be altered by Windows coordinate transformation 539 // corner of the window. However this origin can be altered by Windows coordinate transformation
543 //» » » utilities. You must make sure the start_x, start_y, size _x, size_y and rotate parameters have exactly 540 // utilities. You must make sure the start_x, start_y, size_x, size_y a nd rotate parameters have exactly
544 //» » » same values as you used in FPDF_RenderPage() function ca ll. 541 // same values as you used in FPDF_RenderPage() function call.
545 // 542 //
546 DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page, int start_x, int start_ y, int size_x, int size_y, 543 DLLEXPORT void STDCALL FPDF_DeviceToPage(FPDF_PAGE page, int start_x, int start_ y, int size_x, int size_y,
547 » » » » » » int rotate, int device_x, int de vice_y, double* page_x, double* page_y); 544 int rotate, int device_x, int device_y, double* page_x, double* page_y);
548 545
549 // Function: FPDF_PageToDevice 546 // Function: FPDF_PageToDevice
550 //» » » Convert the page coordinate of a point to screen coordin ate. 547 // Convert the page coordinate of a point to screen coordinate.
551 // Parameters: 548 // Parameters:
552 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 549 // page - Handle to the page. Returned by FPDF_LoadPage functi on.
553 //» » » start_x»» -» Left pixel position of the displ ay area in the device coordinate. 550 // start_x - Left pixel position of the display area in the devic e coordinate.
554 //» » » start_y»» -» Top pixel position of the displa y area in the device coordinate. 551 // start_y - Top pixel position of the display area in the device coordinate.
555 //» » » size_x» » -» Horizontal size (in pixels) for displaying the page. 552 // size_x - Horizontal size (in pixels) for displaying the page.
556 //» » » size_y» » -» Vertical size (in pixels) for di splaying the page. 553 // size_y - Vertical size (in pixels) for displaying the page.
557 //» » » rotate» » -» Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 554 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
558 //» » » » » » » » 2 (rotated 180 d egrees), 3 (rotated 90 degrees counter-clockwise). 555 // 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise).
559 //» » » page_x» » -» X value in page coordinate, for the point to be converted. 556 // page_x - X value in page coordinate, for the point to be conv erted.
560 //» » » page_y» » -» Y value in page coordinate, for the point to be converted. 557 // page_y - Y value in page coordinate, for the point to be conv erted.
561 //» » » device_x» -» A pointer to an integer receivin g the result X value in device coordinate. 558 // device_x - A pointer to an integer receiving the result X value in device coordinate.
562 //» » » device_y» -» A pointer to an integer receivin g the result Y value in device coordinate. 559 // device_y - A pointer to an integer receiving the result Y value in device coordinate.
563 // Return value: 560 // Return value:
564 //» » » None. 561 // None.
565 // Comments: 562 // Comments:
566 //» » » See comments of FPDF_DeviceToPage() function. 563 // See comments of FPDF_DeviceToPage() function.
567 // 564 //
568 DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page, int start_x, int start_ y, int size_x, int size_y, 565 DLLEXPORT void STDCALL FPDF_PageToDevice(FPDF_PAGE page, int start_x, int start_ y, int size_x, int size_y,
569 » » » » » » int rotate, double page_x, doubl e page_y, int* device_x, int* device_y); 566 int rotate, double page_x, double page_y, int* device_x, int* device_y);
570 567
571 // Function: FPDFBitmap_Create 568 // Function: FPDFBitmap_Create
572 //» » » Create a Foxit Device Independent Bitmap (FXDIB). 569 // Create a Foxit Device Independent Bitmap (FXDIB).
573 // Parameters: 570 // Parameters:
574 //» » » width» » -» Number of pixels in a horizontal line of the bitmap. Must be greater than 0. 571 // width - Number of pixels in a horizontal line of the bitmap. Must be greater than 0.
575 //» » » height» » -» Number of pixels in a vertical l ine of the bitmap. Must be greater than 0. 572 // height - Number of pixels in a vertical line of the bitmap. M ust be greater than 0.
576 //» » » alpha» » -» A flag indicating whether alpha channel is used. Non-zero for using alpha, zero for not using. 573 // alpha - A flag indicating whether alpha channel is used. Non -zero for using alpha, zero for not using.
577 // Return value: 574 // Return value:
578 //» » » The created bitmap handle, or NULL if parameter error or out of memory. 575 // The created bitmap handle, or NULL if parameter error or out of memo ry.
579 // Comments: 576 // Comments:
580 //» » » An FXDIB always use 4 byte per pixel. The first byte of a pixel is always double word aligned. 577 // An FXDIB always use 4 byte per pixel. The first byte of a pixel is a lways double word aligned.
581 //» » » Each pixel contains red (R), green (G), blue (B) and opt ionally alpha (A) values. 578 // Each pixel contains red (R), green (G), blue (B) and optionally alph a (A) values.
582 //» » » The byte order is BGRx (the last byte unused if no alpha channel) or BGRA. 579 // The byte order is BGRx (the last byte unused if no alpha channel) or BGRA.
583 //» » » 580 //
584 //» » » The pixels in a horizontal line (also called scan line) are stored side by side, with left most 581 // The pixels in a horizontal line (also called scan line) are stored s ide by side, with left most
585 //» » » pixel stored first (with lower memory address). Each sca n line uses width*4 bytes. 582 // pixel stored first (with lower memory address). Each scan line uses width*4 bytes.
586 // 583 //
587 //» » » Scan lines are stored one after another, with top most s can line stored first. There is no gap 584 // Scan lines are stored one after another, with top most scan line sto red first. There is no gap
588 //» » » between adjacent scan lines. 585 // between adjacent scan lines.
589 // 586 //
590 //» » » This function allocates enough memory for holding all pi xels in the bitmap, but it doesn't 587 // This function allocates enough memory for holding all pixels in the bitmap, but it doesn't
591 //» » » initialize the buffer. Applications can use FPDFBitmap_F illRect to fill the bitmap using any color. 588 // initialize the buffer. Applications can use FPDFBitmap_FillRect to f ill the bitmap using any color.
592 DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width, int height, int alpha ); 589 DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_Create(int width, int height, int alpha );
593 590
594 // More DIB formats 591 // More DIB formats
595 #define FPDFBitmap_Gray»» 1» » // Gray scale bitmap, one byte p er pixel. 592 #define FPDFBitmap_Gray 1 // Gray scale bitmap, one byte per pixel.
596 #define FPDFBitmap_BGR» » 2» » // 3 bytes per pixel, byte order : blue, green, red. 593 #define FPDFBitmap_BGR 2 // 3 bytes per pixel, byte order: blue, gree n, red.
597 #define FPDFBitmap_BGRx»» 3» » // 4 bytes per pixel, byte order : blue, green, red, unused. 594 #define FPDFBitmap_BGRx 3 // 4 bytes per pixel, byte order: blue, gree n, red, unused.
598 #define FPDFBitmap_BGRA»» 4» » // 4 bytes per pixel, byte order : blue, green, red, alpha. 595 #define FPDFBitmap_BGRA 4 // 4 bytes per pixel, byte order: blue, gree n, red, alpha.
599 596
600 // Function: FPDFBitmap_CreateEx 597 // Function: FPDFBitmap_CreateEx
601 //» » » Create a Foxit Device Independent Bitmap (FXDIB) 598 // Create a Foxit Device Independent Bitmap (FXDIB)
602 // Parameters: 599 // Parameters:
603 //» » » width» » -» Number of pixels in a horizontal line of the bitmap. Must be greater than 0. 600 // width - Number of pixels in a horizontal line of the bitmap. Must be greater than 0.
604 //» » » height» » -» Number of pixels in a vertical l ine of the bitmap. Must be greater than 0. 601 // height - Number of pixels in a vertical line of the bitmap. M ust be greater than 0.
605 //» » » format» » -» A number indicating for bitmap f ormat, as defined above. 602 // format - A number indicating for bitmap format, as defined ab ove.
606 //» » » first_scan» -» A pointer to the first byte of f irst scan line, for external buffer 603 // first_scan - A pointer to the first byte of first scan line, for external buffer
607 //» » » » » » » only. If this parameter is NULL, then the SDK will create its own buffer. 604 // only. If this parameter is NULL, then the SDK will c reate its own buffer.
608 //» » » stride» » -» Number of bytes for each scan li ne, for external buffer only.. 605 // stride - Number of bytes for each scan line, for external buf fer only..
609 // Return value: 606 // Return value:
610 //» » » The created bitmap handle, or NULL if parameter error or out of memory. 607 // The created bitmap handle, or NULL if parameter error or out of memo ry.
611 // Comments: 608 // Comments:
612 //» » » Similar to FPDFBitmap_Create function, with more formats and external buffer supported. 609 // Similar to FPDFBitmap_Create function, with more formats and externa l buffer supported.
613 //» » » Bitmap created by this function can be used in any place that a FPDF_BITMAP handle is 610 // Bitmap created by this function can be used in any place that a FPDF _BITMAP handle is
614 //» » » required. 611 // required.
615 // 612 //
616 //» » » If external scanline buffer is used, then the applicatio n should destroy the buffer 613 // If external scanline buffer is used, then the application should des troy the buffer
617 //» » » by itself. FPDFBitmap_Destroy function will not destroy the buffer. 614 // by itself. FPDFBitmap_Destroy function will not destroy the buffer.
618 // 615 //
619 DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for mat, void* first_scan, int stride); 616 DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for mat, void* first_scan, int stride);
620 617
621 // Function: FPDFBitmap_FillRect 618 // Function: FPDFBitmap_FillRect
622 //» » » Fill a rectangle area in an FXDIB. 619 // Fill a rectangle area in an FXDIB.
623 // Parameters: 620 // Parameters:
624 //» » » bitmap» » -» The handle to the bitmap. Return ed by FPDFBitmap_Create function. 621 // bitmap - The handle to the bitmap. Returned by FPDFBitmap_Cre ate function.
625 //» » » left» » -» The left side position. Starting from 0 at the left-most pixel. 622 // left - The left side position. Starting from 0 at the left- most pixel.
626 //» » » top» » » -» The top side position. S tarting from 0 at the top-most scan line. 623 // top - The top side position. Starting from 0 at the top-mo st scan line.
627 //» » » width» » -» Number of pixels to be filled in each scan line. 624 // width - Number of pixels to be filled in each scan line.
628 //» » » height» » -» Number of scan lines to be fille d. 625 // height - Number of scan lines to be filled.
629 //» » » color» » -» A 32-bit value specifing the col or, in 8888 ARGB format. 626 // color - A 32-bit value specifing the color, in 8888 ARGB for mat.
630 // Return value: 627 // Return value:
631 //» » » None. 628 // None.
632 // Comments: 629 // Comments:
633 //» » » This function set the color and (optionally) alpha value in specified region of the bitmap. 630 // This function set the color and (optionally) alpha value in specifie d region of the bitmap.
634 //» » » NOTE: If alpha channel is used, this function does NOT c omposite the background with the source color, 631 // NOTE: If alpha channel is used, this function does NOT composite the background with the source color,
635 //» » » instead the background will be replaced by the source co lor and alpha. 632 // instead the background will be replaced by the source color and alph a.
636 //» » » If alpha channel is not used, the "alpha" parameter is i gnored. 633 // If alpha channel is not used, the "alpha" parameter is ignored.
637 // 634 //
638 DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top , int width, int height, FPDF_DWORD color); 635 DLLEXPORT void STDCALL FPDFBitmap_FillRect(FPDF_BITMAP bitmap, int left, int top , int width, int height, FPDF_DWORD color);
639 636
640 // Function: FPDFBitmap_GetBuffer 637 // Function: FPDFBitmap_GetBuffer
641 //» » » Get data buffer of an FXDIB 638 // Get data buffer of an FXDIB
642 // Parameters: 639 // Parameters:
643 //» » » bitmap» » -» Handle to the bitmap. Returned b y FPDFBitmap_Create function. 640 // bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create function.
644 // Return value: 641 // Return value:
645 //» » » The pointer to the first byte of the bitmap buffer. 642 // The pointer to the first byte of the bitmap buffer.
646 // Comments: 643 // Comments:
647 //» » » The stride may be more than width * number of bytes per pixel 644 // The stride may be more than width * number of bytes per pixel
648 //» » » Applications can use this function to get the bitmap buf fer pointer, then manipulate any color 645 // Applications can use this function to get the bitmap buffer pointer, then manipulate any color
649 //» » » and/or alpha values for any pixels in the bitmap. 646 // and/or alpha values for any pixels in the bitmap.
650 DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap); 647 DLLEXPORT void* STDCALL FPDFBitmap_GetBuffer(FPDF_BITMAP bitmap);
651 648
652 // Function: FPDFBitmap_GetWidth 649 // Function: FPDFBitmap_GetWidth
653 //» » » Get width of an FXDIB. 650 // Get width of an FXDIB.
654 // Parameters: 651 // Parameters:
655 //» » » bitmap» » -» Handle to the bitmap. Returned b y FPDFBitmap_Create function. 652 // bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create function.
656 // Return value: 653 // Return value:
657 //» » » The number of pixels in a horizontal line of the bitmap. 654 // The number of pixels in a horizontal line of the bitmap.
658 DLLEXPORT int STDCALL FPDFBitmap_GetWidth(FPDF_BITMAP bitmap); 655 DLLEXPORT int STDCALL FPDFBitmap_GetWidth(FPDF_BITMAP bitmap);
659 656
660 // Function: FPDFBitmap_GetHeight 657 // Function: FPDFBitmap_GetHeight
661 //» » » Get height of an FXDIB. 658 // Get height of an FXDIB.
662 // Parameters: 659 // Parameters:
663 //» » » bitmap» » -» Handle to the bitmap. Returned b y FPDFBitmap_Create function. 660 // bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create function.
664 // Return value: 661 // Return value:
665 //» » » The number of pixels in a vertical line of the bitmap. 662 // The number of pixels in a vertical line of the bitmap.
666 DLLEXPORT int STDCALL FPDFBitmap_GetHeight(FPDF_BITMAP bitmap); 663 DLLEXPORT int STDCALL FPDFBitmap_GetHeight(FPDF_BITMAP bitmap);
667 664
668 // Function: FPDFBitmap_GetStride 665 // Function: FPDFBitmap_GetStride
669 //» » » Get number of bytes for each scan line in the bitmap buf fer. 666 // Get number of bytes for each scan line in the bitmap buffer.
670 // Parameters: 667 // Parameters:
671 //» » » bitmap» » -» Handle to the bitmap. Returned b y FPDFBitmap_Create function. 668 // bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create function.
672 // Return value: 669 // Return value:
673 //» » » The number of bytes for each scan line in the bitmap buf fer. 670 // The number of bytes for each scan line in the bitmap buffer.
674 // Comments: 671 // Comments:
675 //» » » The stride may be more than width * number of bytes per pixel 672 // The stride may be more than width * number of bytes per pixel
676 DLLEXPORT int STDCALL FPDFBitmap_GetStride(FPDF_BITMAP bitmap); 673 DLLEXPORT int STDCALL FPDFBitmap_GetStride(FPDF_BITMAP bitmap);
677 674
678 // Function: FPDFBitmap_Destroy 675 // Function: FPDFBitmap_Destroy
679 //» » » Destroy an FXDIB and release all related buffers. 676 // Destroy an FXDIB and release all related buffers.
680 // Parameters: 677 // Parameters:
681 //» » » bitmap» » -» Handle to the bitmap. Returned b y FPDFBitmap_Create function. 678 // bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create function.
682 // Return value: 679 // Return value:
683 //» » » None. 680 // None.
684 // Comments: 681 // Comments:
685 //» » » This function will not destroy any external buffer. 682 // This function will not destroy any external buffer.
686 // 683 //
687 DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap); 684 DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap);
688 685
689 // Function: FPDF_VIEWERREF_GetPrintScaling 686 // Function: FPDF_VIEWERREF_GetPrintScaling
690 //» » » Whether the PDF document prefers to be scaled or not. 687 // Whether the PDF document prefers to be scaled or not.
691 // Parameters: 688 // Parameters:
692 //» » » document» -» Handle to the loaded document. 689 // document - Handle to the loaded document.
693 // Return value: 690 // Return value:
694 //» » » None. 691 // None.
695 // 692 //
696 DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen t); 693 DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen t);
697 694
698 // Function: FPDF_VIEWERREF_GetNumCopies 695 // Function: FPDF_VIEWERREF_GetNumCopies
699 //» » » Returns the number of copies to be printed. 696 // Returns the number of copies to be printed.
700 // Parameters: 697 // Parameters:
701 //» » » document» -» Handle to the loaded document. 698 // document - Handle to the loaded document.
702 // Return value: 699 // Return value:
703 // The number of copies to be printed. 700 // The number of copies to be printed.
704 // 701 //
705 DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document); 702 DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document);
706 703
707 // Function: FPDF_VIEWERREF_GetPrintPageRange 704 // Function: FPDF_VIEWERREF_GetPrintPageRange
708 //» » » Page numbers to initialize print dialog box when file is printed. 705 // Page numbers to initialize print dialog box when file is printed.
709 // Parameters: 706 // Parameters:
710 //» » » document» -» Handle to the loaded document. 707 // document - Handle to the loaded document.
711 // Return value: 708 // Return value:
712 // The print page range to be used for printing. 709 // The print page range to be used for printing.
713 // 710 //
714 DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document); 711 DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document);
715 712
716 // Function: FPDF_VIEWERREF_GetDuplex 713 // Function: FPDF_VIEWERREF_GetDuplex
717 //» » » Returns the paper handling option to be used when printi ng from print dialog. 714 // Returns the paper handling option to be used when printing from prin t dialog.
718 // Parameters: 715 // Parameters:
719 //» » » document» -» Handle to the loaded document. 716 // document - Handle to the loaded document.
720 // Return value: 717 // Return value:
721 // The paper handling option to be used when printing. 718 // The paper handling option to be used when printing.
722 // 719 //
723 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t); 720 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t);
724 721
725 // Function: FPDF_CountNamedDests 722 // Function: FPDF_CountNamedDests
726 //» » » Get the count of named destinations in the PDF document. 723 // Get the count of named destinations in the PDF document.
727 // Parameters: 724 // Parameters:
728 //» » » document» -» Handle to a document 725 // document - Handle to a document
729 // Return value: 726 // Return value:
730 //» » » The count of named destinations. 727 // The count of named destinations.
731 DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document); 728 DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document);
732 729
733 // Function: FPDF_GetNamedDestByName 730 // Function: FPDF_GetNamedDestByName
734 //» » » get a special dest handle by the index. 731 // get a special dest handle by the index.
735 // Parameters: 732 // Parameters:
736 //» » » document» -» Handle to the loaded document. 733 // document - Handle to the loaded document.
737 //» » » name» » -» The name of a special named dest . 734 // name - The name of a special named dest.
738 // Return value: 735 // Return value:
739 //» » » The handle of the dest. 736 // The handle of the dest.
740 // 737 //
741 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document, FPDF _BYTESTRING name); 738 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document, FPDF _BYTESTRING name);
742 739
743 // Function: FPDF_GetNamedDest 740 // Function: FPDF_GetNamedDest
744 //» » » Get the specified named destinations of the PDF document by index. 741 // Get the specified named destinations of the PDF document by index.
745 // Parameters: 742 // Parameters:
746 //» » » document -» Handle to a document 743 // document - Handle to a document
747 //» » » index -» The index of named destination. 744 // index - The index of named destination.
748 //» » » buffer -» The buffer to obtain destination name, used as wchar_t*. 745 // buffer - The buffer to obtain destination name, used as w char_t*.
749 //» » » buflen [in/out]»-» Size of the buffer in bytes on i nput, length of the result in bytes on output or -1 if the buffer is too small. 746 // buflen [in/out] - Size of the buffer in bytes on input, length of the result in bytes on output or -1 if the buffer is too small.
750 // Return value: 747 // Return value:
751 //» » » The destination handle of a named destination, or NULL i f no named destination corresponding to |index|. 748 // The destination handle of a named destination, or NULL if no named d estination corresponding to |index|.
752 // Comments: 749 // Comments:
753 //» » » Call this function twice to get the name of the named de stination: 750 // Call this function twice to get the name of the named destination:
754 //» » » 1) First time pass in |buffer| as NULL and get buflen. 751 // 1) First time pass in |buffer| as NULL and get buflen.
755 //» » » 2) Second time pass in allocated |buffer| and buflen to retrieve |buffer|, which should be used as wchar_t*. 752 // 2) Second time pass in allocated |buffer| and buflen to retrieve |bu ffer|, which should be used as wchar_t*.
756 //» » » If buflen is not sufficiently large, it will be set t o -1 upon return. 753 // If buflen is not sufficiently large, it will be set to -1 upon re turn.
757 // 754 //
758 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long* buflen); 755 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long* buflen);
759 756
760 // Function: FPDF_BStr_Init» 757 // Function: FPDF_BStr_Init
761 //» » » Helper function to initialize a byte string. 758 // Helper function to initialize a byte string.
762 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str); 759 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str);
763 760
764 // Function: FPDF_BStr_Set» 761 // Function: FPDF_BStr_Set
765 //» » » Helper function to set string data. 762 // Helper function to set string data.
766 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str, FPDF_LPCSTR bstr, in t length); 763 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str, FPDF_LPCSTR bstr, in t length);
767 764
768 // Function: FPDF_BStr_Clear» 765 // Function: FPDF_BStr_Clear
769 //» » » Helper function to clear a byte string. 766 // Helper function to clear a byte string.
770 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); 767 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str);
771 768
772 #ifdef __cplusplus 769 #ifdef __cplusplus
773 }; 770 }
774 #endif 771 #endif
775 772
776 #endif // _FPDFVIEW_H_ 773 #endif // PUBLIC_FPDFVIEW_H_
OLDNEW
« no previous file with comments | « public/fpdf_transformpage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698