Foxit PDF SDK
|
Instance Methods | |
(id< FSFileReaderCallback >) | - exportData: |
Export stream data. More... | |
(NSData *) | - getData: |
Get stream data. More... | |
(unsigned long long) | - getDataSize: |
Get the size of stream data, in bytes. More... | |
(FSPDFDictionary *) | - getDictionary |
Get the PDF dictionary object associated to current PDF stream object. More... | |
(FSPDFStreamFilter) | - getStreamFilter |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used. More... | |
(void) | - importData:stream_filter: |
Import stream data. More... | |
(void) | - setData: |
Set stream data. More... | |
![]() | |
(FSPDFObject *) | - cloneObject |
Clone current PDF object and get the cloned PDF object. More... | |
(FSPDFObject *) | - deepCloneObject |
Clone current PDF object and get the cloned PDF object. More... | |
(void) | - destroy |
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... | |
(FSPDFArray *) | - getArray |
Get the PDF array object of current PDF object. More... | |
(BOOL) | - getBoolean |
Get the boolean value of current PDF object. More... | |
(FSDateTime *) | - getDateTime |
Get the date time value of current PDF object. More... | |
(FSPDFDictionary *) | - getDict |
Get the PDF dictionary object of current PDF object. More... | |
(FSPDFObject *) | - getDirectObject |
Get the direct object of current PDF object. More... | |
(float) | - getFloat |
Get the float value of current PDF object. More... | |
(int) | - getInteger |
Get the integer value of current PDF object. More... | |
(FSMatrix2D *) | - getMatrix |
Get the matrix value of current PDF object. More... | |
(NSString *) | - getName |
Get the name value of current PDF object. More... | |
(unsigned int) | - getObjNum |
Get the indirect object number of current PDF object. More... | |
(FSRectF *) | - getRect |
Get the rectangle value of current PDF object. More... | |
(FSPDFStream *) | - getStream |
Get the PDF stream object of current PDF object. More... | |
(NSData *) | - getString |
Get the string value of current PDF object. More... | |
(FSPDFObjectType) | - getType |
Get the type of current PDF object. More... | |
(NSString *) | - getWideString |
Get the wide string value of current PDF object. More... | |
(BOOL) | - isIdentical: |
Check if input PDF object is identical with current PDF object. More... | |
Class Methods | |
(FSPDFStream *) | + create: |
Create a new stream object based on a dictionary. More... | |
![]() | |
(FSPDFObject *) | + createFromBoolean: |
Create a PDF object from a boolean value. More... | |
(FSPDFObject *) | + createFromDateTime: |
Create a PDF object from date time. More... | |
(FSPDFObject *) | + createFromFloat: |
Create a PDF object from a float number. More... | |
(FSPDFObject *) | + createFromInteger: |
Create a PDF object from a integer number. More... | |
(FSPDFObject *) | + createFromName: |
Create a PDF object from a string which represents a name. More... | |
(FSPDFObject *) | + createFromString: |
Create a PDF object from string. More... | |
(FSPDFObject *) | + createReference:object_number: |
Create a reference for an indirect object. More... | |
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 FSPDFStream is derived from FSPDFObject and offers functions to create a new PDF stream object and get/set stream data.
+ (FSPDFStream *) create: | (FSPDFDictionary*) | dictionary |
Create a new stream object based on a dictionary.
Please call function FSPDFObject::destroy 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:
|
- (id< FSFileReaderCallback >) exportData: | (BOOL) | 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: YES means to get raw data, and NO means to get decoded data (original data). |
- (NSData *) getData: | (BOOL) | is_raw_data |
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 FSPDFStream::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: YES means to get raw data, and NO means to get decoded data (original data). |
- (unsigned long long) getDataSize: | (BOOL) | 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: YES means to get raw data, and NO means to get decoded data (original data). |
- (FSPDFDictionary *) getDictionary |
Get the PDF dictionary object associated to current PDF stream object.
- (FSPDFStreamFilter) getStreamFilter |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used.
- (void) importData: | (id<FSFileReaderCallback>) | file_read | |
stream_filter: | (FSPDFStreamFilter) | stream_filter | |
Import stream data.
[in] | file_read | A FSFileReaderCallback 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 FSPDFStreamNoneDecode and this should be one of these values except FSPDFStreamUnknown. |
- (void) setData: | (NSData *) | buffer |
Set stream data.
[in] | buffer | A memory block that represents the new stream data to be set. |