Foxit PDF SDK
|
Public Member Functions | |
def | ExportData (is_raw_data) |
Export stream data. More... | |
def | GetData (is_raw_data, size, out_buffer) |
Get stream data. More... | |
def | GetDataSize (is_raw_data) |
Get the size of stream data, in bytes. More... | |
def | GetDictionary () |
Get the PDF dictionary object associated to current PDF stream object. More... | |
def | GetStreamFilter () |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used. More... | |
def | ImportData (file_read, stream_filter) |
Import stream data. More... | |
def | SetData (buffer, size) |
Set stream data. More... | |
![]() | |
def | CloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
def | DeepCloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
def | GetArray () |
Get the PDF array object of current PDF object. More... | |
def | GetBoolean () |
Get the boolean value of current PDF object. More... | |
def | GetDateTime () |
Get the date time value of current PDF object. More... | |
def | GetDict () |
Get the PDF dictionary object of current PDF object. More... | |
def | GetDirectObject () |
Get the direct object of current PDF object. More... | |
def | GetFloat () |
Get the float value of current PDF object. More... | |
def | GetInteger () |
Get the integer value of current PDF object. More... | |
def | GetMatrix () |
Get the matrix value of current PDF object. More... | |
def | GetName () |
Get the name value of current PDF object. More... | |
def | GetObjNum () |
Get the indirect object number of current PDF object. More... | |
def | GetRect () |
Get the rectangle value of current PDF object. More... | |
def | GetStream () |
Get the PDF stream object of current PDF object. More... | |
def | GetString () |
Get the string value of current PDF object. More... | |
def | GetType () |
Get the type of current PDF object. More... | |
def | GetWideString () |
Get the wide string value of current PDF object. More... | |
def | IsIdentical (pdf_obj) |
Check if input PDF object is identical with current PDF object. More... | |
def | Release () |
Release a newly created PDF object or a clone PDF object, which is not related to PDF document or other PDF object and will not be used any more. More... | |
Static Public Attributes | |
Create = _fsdk.PDFStream_Create | |
Create a new stream object based on a dictionary. More... | |
e_ASCII85Decode = _fsdk.PDFStream_e_ASCII85Decode | |
Filter type: ASCII85Decode, which means to decode data encoded in an ASCII base-85 representation, reproducing the original binary data. | |
e_ASCIIHexDecode = _fsdk.PDFStream_e_ASCIIHexDecode | |
Filter type: ASCIIHexDecode, which means to decode data encoded in an ASCII hexadecimal representation, reproducing the original binary data. | |
e_CCITTFaxDecode = _fsdk.PDFStream_e_CCITTFaxDecode | |
Filter type: CCITTFaxDecode, which means to decompress data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel). | |
e_Crypt = _fsdk.PDFStream_e_Crypt | |
Filter type: Crypt, which means to decrypt data encrypted by a security handler, reproducing the original data as it was before encryption. | |
e_DCTDecode = _fsdk.PDFStream_e_DCTDecode | |
Filter type: DCTDecode, which means to decompress data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data. | |
e_FlateDecode = _fsdk.PDFStream_e_FlateDecode | |
Filter type: FlateDecode, which means to decompress data encoded using the zlib/deflate compression method, reproducing the original text or binary data. | |
e_JBIG2Decode = _fsdk.PDFStream_e_JBIG2Decode | |
Filter type: JBIG2Decode, which means to decompress data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). | |
e_JPXDecode = _fsdk.PDFStream_e_JPXDecode | |
Filter type: JPXDecode, which means to decompress data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data. | |
e_LZWDecode = _fsdk.PDFStream_e_LZWDecode | |
Filter type: LZWDecode, which means to decompress data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data. | |
e_NoneDecode = _fsdk.PDFStream_e_NoneDecode | |
No need to decode the stream data. | |
e_RunLengthDecode = _fsdk.PDFStream_e_RunLengthDecode | |
Filter type: RunLengthDecode, which means to decompress data encoded using a byte-oriented run-length encoding algorithm, reproducing the original text or binary data (typically monochrome image data, or any data that contains frequent long runs of a single byte value). | |
e_Unknown = _fsdk.PDFStream_e_Unknown | |
Unknown filter type. | |
![]() | |
CreateFromBoolean = _fsdk.PDFObject_CreateFromBoolean | |
Create a PDF object from a boolean value. More... | |
CreateFromDateTime = _fsdk.PDFObject_CreateFromDateTime | |
Create a PDF object from date time. More... | |
CreateFromFloat = _fsdk.PDFObject_CreateFromFloat | |
Create a PDF object from a float number. More... | |
CreateFromInteger = _fsdk.PDFObject_CreateFromInteger | |
Create a PDF object from a integer number. More... | |
CreateFromName = _fsdk.PDFObject_CreateFromName | |
Create a PDF object from a string which represents a name. More... | |
CreateFromString = _fsdk.PDFObject_CreateFromString | |
Create a PDF object from string. More... | |
CreateReference = _fsdk.PDFObject_CreateReference | |
Create a reference for an indirect object. More... | |
e_Array = _fsdk.PDFObject_e_Array | |
PDF array object. | |
e_Boolean = _fsdk.PDFObject_e_Boolean | |
PDF boolean object. | |
e_Dictionary = _fsdk.PDFObject_e_Dictionary | |
PDF dictionary object. | |
e_InvalidType = _fsdk.PDFObject_e_InvalidType | |
Invalid PDF object type. | |
e_Name = _fsdk.PDFObject_e_Name | |
PDF name object. | |
e_Null = _fsdk.PDFObject_e_Null | |
PDF null object. | |
e_Number = _fsdk.PDFObject_e_Number | |
PDF number object. | |
e_Reference = _fsdk.PDFObject_e_Reference | |
PDF reference object. | |
e_Stream = _fsdk.PDFObject_e_Stream | |
PDF stream object. | |
e_String = _fsdk.PDFObject_e_String | |
PDF string object. | |
A PDF stream object consists of a direct dictionary object and stream data. For more details, please refer to Section 3.2.7 "Stream Objects" in <PDF Reference 1.7>.
Class FoxitPDFSDKPython3.PDFStream is derived from PDFObject and offers functions to create a new PDF stream object and get/set stream data.
def FoxitPDFSDKPython3.PDFStream.ExportData | ( | is_raw_data | ) |
Export stream data.
This function provides an efficient way to get the stream data, especially for large stream data.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
def FoxitPDFSDKPython3.PDFStream.GetData | ( | is_raw_data, | |
size, | |||
out_buffer | |||
) |
Get stream data.
When calling this function, user should pass a memory block with enough size to retrieve data. User is recommended to call function FoxitPDFSDKPython3.PDFStream.GetDataSize (with same parameter is_raw_data) to get the expected size, then prepare the memory block, and then call this function to get data.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
[in] | size | Size of parameter out_buffer, in bytes. It should be equal to or larger than the actual data size. |
[out] | out_buffer | A memory block (with enough size) used as output parameter that receives the stream data. It should not be null. |
def FoxitPDFSDKPython3.PDFStream.GetDataSize | ( | is_raw_data | ) |
Get the size of stream data, in bytes.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
def FoxitPDFSDKPython3.PDFStream.GetDictionary | ( | ) |
Get the PDF dictionary object associated to current PDF stream object.
def FoxitPDFSDKPython3.PDFStream.GetStreamFilter | ( | ) |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used.
def FoxitPDFSDKPython3.PDFStream.ImportData | ( | file_read, | |
stream_filter | |||
) |
Import stream data.
[in] | file_read | A FoxitPDFSDKPython3.FileReaderCallback object implemented by user. Foxit PDF SDK will use this to read stream data and set to current PDF stream object. User should keep this callback valid until the related PDF document is closed or current stream object is released because of useless. |
[in] | stream_filter | Type of stream filter, which specifies how to decode the data which is read through parameter file_read. Please refer to values starting from FoxitPDFSDKPython3.PDFStream.e_NoneDecode and this should be one of these values except FoxitPDFSDKPython3.PDFStream.e_Unknown . |
def FoxitPDFSDKPython3.PDFStream.SetData | ( | buffer, | |
size | |||
) |
Set stream data.
[in] | buffer | A memory block that represents the new stream data to be set. |
[in] | size | Size of parameter buffer, in bytes. |
|
static |
Create a new stream object based on a dictionary.
Please call function FoxitPDFSDKPython3.PDFObject.Release to release the created object if it has not been added/set into PDF document or other PDF object and will not be used any more.
[in] | dictionary | A PDF dictionary object:
|