Foxit PDF SDK
|
Instance Methods | |
(FSPDFObject *) | - cloneObject |
Clone current PDF object and get the cloned PDF object. 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... | |
(NSString *) | - 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... | |
Class Methods | |
(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... | |
PDF supports eight basic types of objects:
"Boolean value", "Integer and real number", "String", "Name", "Array", "Dictionary", "Stream", "The null
object". For more details about PDF objects, please refer to Section 3.2 "Objects" in <PDF Reference 1.7>.
Class FSPDFObject is a base class for all kinds of PDF objects. It offers different functions to create different kind of PDF objects. For "Array", "Dictionary" and "Stream" PDF object, please refer to derived classes FSPDFArray, FSPDFDictionary and FSPDFStream .
If user wants to make a newly created PDF object to be an indirect object, please call function FSPDFDoc::addIndirectObject:.
- (FSPDFObject *) cloneObject |
Clone current PDF object and get the cloned PDF object.
+ (FSPDFObject *) createFromBoolean: | (BOOL) | boolean_value |
Create a PDF object from a boolean value.
[in] | boolean_value | A boolean value. |
+ (FSPDFObject *) createFromDateTime: | (FSDateTime*) | date_time |
Create a PDF object from date time.
PDF defines a standard date format, which closely follows that of the international standard ASN.1 (Abstract Syntax Notation One), defined in ISO/ IEC 8824 (see the Bibliography). A date is defined as an ASCII string of the form (D:YYYYMMDDHHmmSSOHH'mm').
[in] | date_time | A date and time object. |
+ (FSPDFObject *) createFromFloat: | (float) | float_value |
Create a PDF object from a float number.
[in] | float_value | A float value. |
+ (FSPDFObject *) createFromInteger: | (int) | integer_value |
Create a PDF object from a integer number.
[in] | integer_value | An integer value. |
+ (FSPDFObject *) createFromName: | (NSString *) | name |
Create a PDF object from a string which represents a name.
[in] | name | A string. It should not be an empty string. |
+ (FSPDFObject *) createFromString: | (NSString *) | string_value |
Create a PDF object from string.
[in] | string_value | A string. It should not be an empty string. |
+ (FSPDFObject *) createReference: | (FSPDFDoc*) | document | |
object_number: | (unsigned int) | object_number | |
Create a reference for an indirect object.
The indirect object can be retrieved by following methods:
[in] | document | A valid PDF document object. |
[in] | object_number | The indirect object number of the indirect PDF object. This should be above 0. |
- (FSPDFArray *) getArray |
Get the PDF array object of current PDF object.
If the type of current PDF object is FSPDFObjectReference, this function will check the direct PDF object of current PDF object.
- (BOOL) getBoolean |
Get the boolean value of current PDF object.
Only useful when the type of current PDF object is FSPDFObjectBoolean.
- (FSDateTime *) getDateTime |
Get the date time value of current PDF object.
Only useful when the type of current PDF objec is FSPDFObjectString and its content is in PDF standard date format.
- (FSPDFDictionary *) getDict |
Get the PDF dictionary object of current PDF object.
If the type of current PDF object is FSPDFObjectReference, this function will check the direct PDF object of current PDF object.
- (FSPDFObject *) getDirectObject |
Get the direct object of current PDF object.
If the type of current PDF object is FSPDFObjectReference, the direct object will be returned.
- (float) getFloat |
Get the float value of current PDF object.
Only useful when the type of current PDF object is FSPDFObjectNumber.
- (int) getInteger |
Get the integer value of current PDF object.
Only useful when the type of current PDF object is FSPDFObjectNumber.
- (FSMatrix2D *) getMatrix |
Get the matrix value of current PDF object.
Only useful for PDF object whose type is FSPDFObjectArray and it has 6 number objects as elements.
- (NSString *) getName |
Get the name value of current PDF object.
Only useful when the type of current PDF object is FSPDFObjectName or FSPDFObjectString.
- (unsigned int) getObjNum |
Get the indirect object number of current PDF object.
- (FSRectF *) getRect |
Get the rectangle value of current PDF object.
Only useful for PDF object whose type is FSPDFObjectArray and it has 4 number objects as elements.
- (FSPDFStream *) getStream |
Get the PDF stream object of current PDF object.
If the type of current PDF object is FSPDFObjectReference, this function will check the direct PDF object of current PDF object.
- (NSString *) getString |
Get the string value of current PDF object.
This function will get the string format for actual value of current PDF object:
If value of current PDF object cannot be converted to a valid string, an empty string will be returned.
- (FSPDFObjectType) getType |
Get the type of current PDF object.
- (NSString *) getWideString |
Get the wide string value of current PDF object.
This function will get the string format for actual value of current PDF object:
If value of current PDF object cannot be converted to a valid string, an empty string will be returned.