OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef PUBLIC_FPDF_EDIT_H_ | 7 #ifndef PUBLIC_FPDF_EDIT_H_ |
8 #define PUBLIC_FPDF_EDIT_H_ | 8 #define PUBLIC_FPDF_EDIT_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #endif // __cplusplus | 31 #endif // __cplusplus |
32 | 32 |
33 // Create a new PDF document. | 33 // Create a new PDF document. |
34 // | 34 // |
35 // Returns a handle to a new document, or NULL on failure. | 35 // Returns a handle to a new document, or NULL on failure. |
36 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument(); | 36 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument(); |
37 | 37 |
38 // Create a new PDF page. | 38 // Create a new PDF page. |
39 // | 39 // |
40 // document - handle to document. | 40 // document - handle to document. |
41 // page_index - the index of the page to create. | 41 // page_index - suggested index of the page to create. If it is larger than |
| 42 // document's current last index(L), the created page index is |
| 43 // the next available index -- L+1. |
42 // width - the page width. | 44 // width - the page width. |
43 // height - the page height. | 45 // height - the page height. |
44 // | 46 // |
45 // Returns the handle to the new page. | 47 // Returns the handle to the new page. |
46 // | 48 // |
47 // The page should be deleted with |FPDFPage_Delete| when finished. | 49 // The page should be closed with CPDF_ClosePage() when finished as |
| 50 // with any other page in the document. |
48 DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document, | 51 DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document, |
49 int page_index, | 52 int page_index, |
50 double width, | 53 double width, |
51 double height); | 54 double height); |
52 | 55 |
53 // Delete the page at |page_index|. | 56 // Delete the page at |page_index|. |
54 // | 57 // |
55 // document - handle to document. | 58 // document - handle to document. |
56 // page_index - the index of the page to delete. | 59 // page_index - the index of the page to delete. |
57 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index); | 60 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, | 235 DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, |
233 int nCount, | 236 int nCount, |
234 FPDF_PAGEOBJECT image_object, | 237 FPDF_PAGEOBJECT image_object, |
235 FPDF_BITMAP bitmap); | 238 FPDF_BITMAP bitmap); |
236 | 239 |
237 #ifdef __cplusplus | 240 #ifdef __cplusplus |
238 } // extern "C" | 241 } // extern "C" |
239 #endif // __cplusplus | 242 #endif // __cplusplus |
240 | 243 |
241 #endif // PUBLIC_FPDF_EDIT_H_ | 244 #endif // PUBLIC_FPDF_EDIT_H_ |
OLD | NEW |