| 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 _FPDFSAVE_H_ | 7 #ifndef _FPDFSAVE_H_ |
| 8 #define _FPDFSAVE_H_ | 8 #define _FPDFSAVE_H_ |
| 9 | 9 |
| 10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
| 11 | 11 |
| 12 #ifdef __cplusplus | 12 #ifdef __cplusplus |
| 13 extern "C" { | 13 extern "C" { |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 | 16 |
| 17 // Structure for custom file write | 17 // Structure for custom file write |
| 18 struct FPDF_FILEWRITE{ | 18 typedef struct FPDF_FILEWRITE_ { |
| 19 | 19 |
| 20 // | 20 // |
| 21 //Version number of the interface. Currently must be 1. | 21 //Version number of the interface. Currently must be 1. |
| 22 // | 22 // |
| 23 int version; | 23 int version; |
| 24 | 24 |
| 25 // | 25 // |
| 26 // Method: WriteBlock | 26 // Method: WriteBlock |
| 27 // Output a block of data in your custom way. | 27 // Output a block of data in your custom way. |
| 28 // Interface Version: | 28 // Interface Version: |
| 29 // 1 | 29 // 1 |
| 30 // Implementation Required: | 30 // Implementation Required: |
| 31 // Yes | 31 // Yes |
| 32 // Comments: | 32 // Comments: |
| 33 // Called by function FPDF_SaveDocument | 33 // Called by function FPDF_SaveDocument |
| 34 // Parameters: | 34 // Parameters: |
| 35 // pThis - Pointer to the structure
itself | 35 // pThis - Pointer to the structure
itself |
| 36 // pData - Pointer to a buffer to o
utput | 36 // pData - Pointer to a buffer to o
utput |
| 37 // size - The size of the buffer. | 37 // size - The size of the buffer. |
| 38 // Return value: | 38 // Return value: |
| 39 // Should be non-zero if successful, zero for error
. | 39 // Should be non-zero if successful, zero for error
. |
| 40 // | 40 // |
| 41 » int» » (*WriteBlock)( FPDF_FILEWRITE* pThis, const void* pData,
unsigned long size); | 41 » int» » (*WriteBlock)(struct FPDF_FILEWRITE_* pThis, const void*
pData, unsigned long size); |
| 42 | 42 |
| 43 }; | 43 } FPDF_FILEWRITE; |
| 44 | 44 |
| 45 | 45 |
| 46 /** @brief Incremental. */ | 46 /** @brief Incremental. */ |
| 47 #define FPDF_INCREMENTAL 1 | 47 #define FPDF_INCREMENTAL 1 |
| 48 /** @brief No Incremental. */ | 48 /** @brief No Incremental. */ |
| 49 #define FPDF_NO_INCREMENTAL 2 | 49 #define FPDF_NO_INCREMENTAL 2 |
| 50 /** @brief Remove security. */ | 50 /** @brief Remove security. */ |
| 51 #define FPDF_REMOVE_SECURITY 3 | 51 #define FPDF_REMOVE_SECURITY 3 |
| 52 | 52 |
| 53 // Function: FPDF_SaveAsCopy | 53 // Function: FPDF_SaveAsCopy |
| (...skipping 19 matching lines...) Expand all Loading... |
| 73 // TRUE if succeed, FALSE if failed. | 73 // TRUE if succeed, FALSE if failed. |
| 74 // | 74 // |
| 75 DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion(FPDF_DOCUMENT document,FPDF_FIL
EWRITE * pFileWrite, | 75 DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion(FPDF_DOCUMENT document,FPDF_FIL
EWRITE * pFileWrite, |
| 76 FPDF_DWORD flags, int fileVersion); | 76 FPDF_DWORD flags, int fileVersion); |
| 77 | 77 |
| 78 #ifdef __cplusplus | 78 #ifdef __cplusplus |
| 79 }; | 79 }; |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 #endif //_FPDFSAVE_H_ | 82 #endif //_FPDFSAVE_H_ |
| OLD | NEW |