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

Side by Side Diff: public/fpdfview.h

Issue 1465723002: Make XFA public more closely match master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View 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 PUBLIC_FPDFVIEW_H_ 10 #ifndef PUBLIC_FPDFVIEW_H_
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // Function: FPDF_InitLibraryWithConfig 174 // Function: FPDF_InitLibraryWithConfig
175 // Initialize the FPDFSDK library 175 // Initialize the FPDFSDK library
176 // Parameters: 176 // Parameters:
177 // config - configuration information as above. 177 // config - configuration information as above.
178 // Return value: 178 // Return value:
179 // None. 179 // None.
180 // Comments: 180 // Comments:
181 // You have to call this function before you can call any PDF 181 // You have to call this function before you can call any PDF
182 // processing functions. 182 // processing functions.
183 DLLEXPORT void STDCALL 183 DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig(
184 FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* config); 184 const FPDF_LIBRARY_CONFIG* config);
185 185
186 // Function: FPDF_DestroyLibary 186 // Function: FPDF_DestroyLibary
187 // Release all resources allocated by the FPDFSDK library. 187 // Release all resources allocated by the FPDFSDK library.
188 // Parameters: 188 // Parameters:
189 // None. 189 // None.
190 // Return value: 190 // Return value:
191 // None. 191 // None.
192 // Comments: 192 // Comments:
193 // You can call this function to release all memory blocks allocated by 193 // You can call this function to release all memory blocks allocated by
194 // the library. 194 // the library.
(...skipping 20 matching lines...) Expand all
215 // Parameters: 215 // Parameters:
216 // file_path - Path to the PDF file (including extension). 216 // file_path - Path to the PDF file (including extension).
217 // password - A string used as the password for the PDF file. 217 // password - A string used as the password for the PDF file.
218 // If no password is needed, empty or NULL can be used. 218 // If no password is needed, empty or NULL can be used.
219 // Return value: 219 // Return value:
220 // A handle to the loaded document, or NULL on failure. 220 // A handle to the loaded document, or NULL on failure.
221 // Comments: 221 // Comments:
222 // Loaded document can be closed by FPDF_CloseDocument(). 222 // Loaded document can be closed by FPDF_CloseDocument().
223 // If this function fails, you can use FPDF_GetLastError() to retrieve 223 // If this function fails, you can use FPDF_GetLastError() to retrieve
224 // the reason why it failed. 224 // the reason why it failed.
225 // The application should call ::FPDF_LoadXFA function after PDF 225 // Notes:
226 // document loaded 226 // The application should call FPDF_LoadXFA function after PDF
227 // to support XFA fields in fpdfformfill.h file. 227 // document loaded to support XFA fields in fpdfformfill.h file.
228 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, 228 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
229 FPDF_BYTESTRING password); 229 FPDF_BYTESTRING password);
230 230
231 // Function: FPDF_LoadMemDocument 231 // Function: FPDF_LoadMemDocument
232 // Open and load a PDF document from memory. 232 // Open and load a PDF document from memory.
233 // Parameters: 233 // Parameters:
234 // data_buf - Pointer to a buffer containing the PDF document. 234 // data_buf - Pointer to a buffer containing the PDF document.
235 // size - Number of bytes in the PDF document. 235 // size - Number of bytes in the PDF document.
236 // password - A string used as the password for the PDF file. 236 // password - A string used as the password for the PDF file.
237 // If no password is needed, empty or NULL can be used. 237 // If no password is needed, empty or NULL can be used.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // fileVersion - The PDF file version. File version: 14 for 1.4, 15 374 // fileVersion - The PDF file version. File version: 14 for 1.4, 15
375 // for 1.5, ... 375 // for 1.5, ...
376 // Return value: 376 // Return value:
377 // True if succeeds, false otherwise. 377 // True if succeeds, false otherwise.
378 // Comments: 378 // Comments:
379 // If the document was created by FPDF_CreateNewDocument, 379 // If the document was created by FPDF_CreateNewDocument,
380 // then this function will always fail. 380 // then this function will always fail.
381 DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, 381 DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc,
382 int* fileVersion); 382 int* fileVersion);
383 383
384 #define FPDF_ERR_SUCCESS 0 // No error. 384 #define FPDF_ERR_SUCCESS 0 // No error.
Lei Zhang 2015/11/20 01:57:43 This is better, we prefer 2 spaces
385 #define FPDF_ERR_UNKNOWN 1 // Unknown error. 385 #define FPDF_ERR_UNKNOWN 1 // Unknown error.
386 #define FPDF_ERR_FILE 2 // File not found or could not be opened. 386 #define FPDF_ERR_FILE 2 // File not found or could not be opened.
387 #define FPDF_ERR_FORMAT 3 // File not in PDF format or corrupted. 387 #define FPDF_ERR_FORMAT 3 // File not in PDF format or corrupted.
388 #define FPDF_ERR_PASSWORD 4 // Password required or incorrect password. 388 #define FPDF_ERR_PASSWORD 4 // Password required or incorrect password.
389 #define FPDF_ERR_SECURITY 5 // Unsupported security scheme. 389 #define FPDF_ERR_SECURITY 5 // Unsupported security scheme.
390 #define FPDF_ERR_PAGE 6 // Page not found or content error. 390 #define FPDF_ERR_PAGE 6 // Page not found or content error.
391 #define FPDF_ERR_XFALOAD 7 // Load XFA error. 391 #define FPDF_ERR_XFALOAD 7 // Load XFA error.
392 #define FPDF_ERR_XFALAYOUT 8 // Layout XFA error. 392 #define FPDF_ERR_XFALAYOUT 8 // Layout XFA error.
393 393
394 // Function: FPDF_GetLastError 394 // Function: FPDF_GetLastError
395 // Get last error code when a function fails. 395 // Get last error code when a function fails.
396 // Parameters: 396 // Parameters:
397 // None. 397 // None.
398 // Return value: 398 // Return value:
399 // A 32-bit integer indicating error code as defined above. 399 // A 32-bit integer indicating error code as defined above.
400 // Comments: 400 // Comments:
401 // If the previous SDK call succeeded, the return value of this 401 // If the previous SDK call succeeded, the return value of this
402 // function is not defined. 402 // function is not defined.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // size_y - Vertical size (in pixels) for displaying the page. 522 // size_y - Vertical size (in pixels) for displaying the page.
523 // rotate - Page orientation: 523 // rotate - Page orientation:
524 // 0 (normal) 524 // 0 (normal)
525 // 1 (rotated 90 degrees clockwise) 525 // 1 (rotated 90 degrees clockwise)
526 // 2 (rotated 180 degrees) 526 // 2 (rotated 180 degrees)
527 // 3 (rotated 90 degrees counter-clockwise) 527 // 3 (rotated 90 degrees counter-clockwise)
528 // flags - 0 for normal display, or combination of flags 528 // flags - 0 for normal display, or combination of flags
529 // defined above. 529 // defined above.
530 // Return value: 530 // Return value:
531 // None. 531 // None.
532 // Notes:
533 // FPDF_RenderPage can not be used if the document contains dynamic
534 // form fields.
535 DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, 532 DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
536 FPDF_PAGE page, 533 FPDF_PAGE page,
537 int start_x, 534 int start_x,
538 int start_y, 535 int start_y,
539 int size_x, 536 int size_x,
540 int size_y, 537 int size_y,
541 int rotate, 538 int rotate,
542 int flags); 539 int flags);
543 #endif 540 #endif
544 541
(...skipping 12 matching lines...) Expand all
557 // size_y - Vertical size (in pixels) for displaying the page. 554 // size_y - Vertical size (in pixels) for displaying the page.
558 // rotate - Page orientation: 555 // rotate - Page orientation:
559 // 0 (normal) 556 // 0 (normal)
560 // 1 (rotated 90 degrees clockwise) 557 // 1 (rotated 90 degrees clockwise)
561 // 2 (rotated 180 degrees) 558 // 2 (rotated 180 degrees)
562 // 3 (rotated 90 degrees counter-clockwise) 559 // 3 (rotated 90 degrees counter-clockwise)
563 // flags - 0 for normal display, or combination of flags 560 // flags - 0 for normal display, or combination of flags
564 // defined above. 561 // defined above.
565 // Return value: 562 // Return value:
566 // None. 563 // None.
567 // Notes:
568 // FPDF_RenderPageBitmap can not be used if the document contains
569 // dynamic form fields.
570 DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, 564 DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
571 FPDF_PAGE page, 565 FPDF_PAGE page,
572 int start_x, 566 int start_x,
573 int start_y, 567 int start_y,
574 int size_x, 568 int size_x,
575 int size_y, 569 int size_y,
576 int rotate, 570 int rotate,
577 int flags); 571 int flags);
578 572
579 // Function: FPDF_ClosePage 573 // Function: FPDF_ClosePage
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 924
931 // Function: FPDF_BStr_Clear 925 // Function: FPDF_BStr_Clear
932 // Helper function to clear a byte string. 926 // Helper function to clear a byte string.
933 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); 927 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str);
934 928
935 #ifdef __cplusplus 929 #ifdef __cplusplus
936 } 930 }
937 #endif 931 #endif
938 932
939 #endif // PUBLIC_FPDFVIEW_H_ 933 #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