PDF Objects

Definitions for access to PDF objects.
Definitions and functions in this module are included in fpdf_objects_r.h and fpdf_objects_w.h.
Module: PDFObjects
License Identifier: PDFObjects/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_objects_r.h.
For License Right Writing, see fpdf_objects_w.h. More...

Functions

FS_RESULT FSPDF_Object_GetType (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32 *type)
 Get the type of an object. More...
 
FS_RESULT FSPDF_Object_GetObjNum (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_DWORD *objNum)
 Get the object number. More...
 
FS_RESULT FSPDF_Object_GetBoolean (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_BOOL *boolean)
 Get boolean value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetInteger (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32 *number)
 Get integer value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetFloat (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_FLOAT *number)
 Get float value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetRawByteString (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_BSTR *string)
 Get the raw byte string value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetUnicodeString (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_BSTR *string)
 Get the UTF-8 byte string value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetDateTime (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_DATETIMEZONE *dt)
 Get the date value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetRect (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_RECTF *rect)
 Get rectangle value from a PDF object. More...
 
FS_RESULT FSPDF_Object_GetMatrix (FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_MATRIX *matrix)
 Get matrix value from a PDF object. More...
 
FS_RESULT FSPDF_Array_CountElements (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 *count)
 Get the count of elements in an array. More...
 
FS_RESULT FSPDF_Array_GetElement (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *object)
 Get an element in an array. More...
 
FS_RESULT FSPDF_Array_GetBoolean (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_BOOL *boolean)
 Get a boolean element in an array. More...
 
FS_RESULT FSPDF_Array_GetInteger (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_INT32 *number)
 Get an integer element in an array. More...
 
FS_RESULT FSPDF_Array_GetFloat (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_FLOAT *number)
 Get a float element in an array. More...
 
FS_RESULT FSPDF_Array_GetRawByteString (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_BSTR *string)
 Get a raw byte string element in an array. More...
 
FS_RESULT FSPDF_Array_GetUnicodeString (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_BSTR *string)
 Get an UTF-8 byte string element in an array. More...
 
FS_RESULT FSPDF_Array_GetDateTime (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_DATETIMEZONE *dt)
 Get a date and time element in an array. More...
 
FS_RESULT FSPDF_Array_GetArray (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *subArray)
 Get an array element in an array. More...
 
FS_RESULT FSPDF_Array_GetRect (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_RECTF *rect)
 Get a rectangle element in an array. More...
 
FS_RESULT FSPDF_Array_GetMatrix (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_MATRIX *matrix)
 Get a matrix element in an array. More...
 
FS_RESULT FSPDF_Array_GetDict (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *dictionary)
 Get a dictionary element in an array. More...
 
FS_RESULT FSPDF_Array_GetStream (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *stream)
 Get a stream element in an array. More...
 
FS_RESULT FSPDF_Dictionary_HasKey (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_BOOL *exist)
 Determine whether a specific key exists in a dictionary or not. More...
 
FS_RESULT FSPDF_Dictionary_GetElement (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *object)
 Get an element from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_EnumEntry (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, FSCRT_POSITION *position, FSCRT_BSTR *key, FSPDF_OBJECT *object)
 Enumerate entries in a dictionary and retrieve a key and a PDF object at a given position. More...
 
FS_RESULT FSPDF_Dictionary_GetBoolean (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_BOOL *boolean)
 Get a boolean value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetInteger (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_INT32 *number)
 Get an integer value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetFloat (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_FLOAT *number)
 Get a float value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetRawByteString (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_BSTR *string)
 Get a raw string value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetUnicodeString (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_BSTR *string)
 Get an UTF-8 string value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetDateTime (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_DATETIMEZONE *dt)
 Get a date and time value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetArray (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *array)
 Get an array value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetRect (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_RECTF *rect)
 Get a rectangle value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetMatrix (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_MATRIX *matrix)
 Get a matrix value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetDict (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *subDictionary)
 Get a dictionary value from dictionary. More...
 
FS_RESULT FSPDF_Dictionary_GetStream (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *stream)
 Get a stream value from dictionary. More...
 
FS_RESULT FSPDF_Stream_GetDict (FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FSPDF_OBJECT *dictionary)
 Get the dictionary object associated to a stream. More...
 
FS_RESULT FSPDF_Stream_GetData (FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FS_LPVOID buffer, FS_DWORD *length)
 Get stream data. More...
 
FS_RESULT FSPDF_Stream_ExportData (FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FSCRT_FILE *file)
 Export stream data to a file asynchronously. More...
 
FS_RESULT FSPDF_Reference_GetReferObject (FSCRT_DOCUMENT document, FSPDF_OBJECT reference, FSPDF_OBJECT *referObj)
 Get the referred object associated to a reference object. More...
 
FS_RESULT FSPDF_Object_CreateBoolean (FSCRT_DOCUMENT document, FS_BOOL boolean, FSPDF_OBJECT *object)
 Create a boolean PDF object. More...
 
FS_RESULT FSPDF_Object_CreateInteger (FSCRT_DOCUMENT document, FS_INT32 number, FSPDF_OBJECT *object)
 Create an integer number PDF object. More...
 
FS_RESULT FSPDF_Object_CreateFloat (FSCRT_DOCUMENT document, FS_FLOAT number, FSPDF_OBJECT *object)
 Create a float number PDF object. More...
 
FS_RESULT FSPDF_Object_CreateRawByteString (FSCRT_DOCUMENT document, const FSCRT_BSTR *string, FS_BOOL hexStr, FSPDF_OBJECT *object)
 Create a raw string PDF object. More...
 
FS_RESULT FSPDF_Object_CreateUnicodeString (FSCRT_DOCUMENT document, const FSCRT_BSTR *string, FSPDF_OBJECT *object)
 Create an UTF-8 string PDF object. More...
 
FS_RESULT FSPDF_Object_CreateDateTime (FSCRT_DOCUMENT document, const FSCRT_DATETIMEZONE *dt, FSPDF_OBJECT *object)
 Create a date PDF object. More...
 
FS_RESULT FSPDF_Object_CreateUnicodeName (FSCRT_DOCUMENT document, const FSCRT_BSTR *nameStr, FSPDF_OBJECT *object)
 Create an UTF-8 name PDF object. More...
 
FS_RESULT FSPDF_Object_CreateArray (FSCRT_DOCUMENT document, FSPDF_OBJECT *object)
 Create an array PDF object. More...
 
FS_RESULT FSPDF_Object_CreateRect (FSCRT_DOCUMENT document, const FSCRT_RECTF *rect, FSPDF_OBJECT *object)
 Create a rectangle PDF object. More...
 
FS_RESULT FSPDF_Object_CreateMatrix (FSCRT_DOCUMENT document, const FSCRT_MATRIX *matrix, FSPDF_OBJECT *object)
 Create a matrix PDF object. More...
 
FS_RESULT FSPDF_Object_CreateDict (FSCRT_DOCUMENT document, FSPDF_OBJECT *object)
 Create a dictionary PDF object. More...
 
FS_RESULT FSPDF_Object_CreateStream (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, FSPDF_OBJECT *object)
 Create a stream PDF object. More...
 
FS_RESULT FSPDF_Object_CreateReference (FSCRT_DOCUMENT document, FSPDF_OBJECT refObj, FSPDF_OBJECT *object)
 Create a reference PDF object. More...
 
FS_RESULT FSPDF_Object_CreateReferenceWithObjNum (FSCRT_DOCUMENT document, FS_DWORD objNum, FSPDF_OBJECT *object)
 Create a reference PDF object with an object number. More...
 
FS_RESULT FSPDF_Object_Release (FSCRT_DOCUMENT document, FSPDF_OBJECT object)
 Release a PDF object created but not inserted into any PDF document or other PDF objects. More...
 
FS_RESULT FSPDF_Array_InsertAt (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT element)
 Insert an element into array. More...
 
FS_RESULT FSPDF_Array_SetAt (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT element)
 Set a new element at parameter index position in array. More...
 
FS_RESULT FSPDF_Array_Add (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FSPDF_OBJECT element)
 Add an element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddBoolean (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_BOOL boolean)
 Add a boolean element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddInteger (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 number)
 Add an integer element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddFloat (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_FLOAT number)
 Add a float element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddRawByteString (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_BOOL hexStr, const FSCRT_BSTR *string)
 Add a raw string element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddUnicodeString (FSCRT_DOCUMENT document, FSPDF_OBJECT array, const FSCRT_BSTR *string)
 Add an UTF-8 string element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddDateTime (FSCRT_DOCUMENT document, FSPDF_OBJECT array, const FSCRT_DATETIMEZONE *dt)
 Add a date and time element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddUnicodeName (FSCRT_DOCUMENT document, FSPDF_OBJECT array, const FSCRT_BSTR *nameStr)
 Add an UTF-8 name element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddRect (FSCRT_DOCUMENT document, FSPDF_OBJECT array, const FSCRT_RECTF *rect)
 Add a rectangle element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_AddMatrix (FSCRT_DOCUMENT document, FSPDF_OBJECT array, const FSCRT_MATRIX *matrix)
 Add a matrix element into array, to the last position. More...
 
FS_RESULT FSPDF_Array_RemoveAt (FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index)
 Remove an element from array. More...
 
FS_RESULT FSPDF_Dictionary_SetAt (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT object)
 Set an object as value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtBoolean (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_BOOL boolean)
 Set a boolean value with specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtInteger (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_INT32 number)
 Set an integer value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtFloat (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_FLOAT number)
 Set a float value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtRawByteString (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_BOOL hexStr, const FSCRT_BSTR *string)
 Set a raw byte string value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtUnicodeString (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, const FSCRT_BSTR *string)
 Set a UTF-8 byte string value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtDateTime (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, const FSCRT_DATETIMEZONE *dt)
 Set a date and time value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtUnicodeName (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, const FSCRT_BSTR *nameStr)
 Set a UTF-8 name value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtRect (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, const FSCRT_RECTF *rect)
 Set a rectangle value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_SetAtMatrix (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, const FSCRT_MATRIX *matrix)
 Set a matrix value to specific key in dictionary. More...
 
FS_RESULT FSPDF_Dictionary_RemoveAt (FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key)
 Remove a specific key from dictionary. More...
 
FS_RESULT FSPDF_Stream_SetData (FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_LPCVOID buffer, FS_DWORD length)
 Set stream data. More...
 
FS_RESULT FSPDF_Stream_ImportData (FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FSCRT_FILE file)
 Import stream data from a file. More...
 

Macro Definitions for PDF Object Types.

#define FSPDF_OBJECTTYPE_INVALID   0
 Invalid PDF object.
 
#define FSPDF_OBJECTTYPE_BOOLEAN   1
 PDF object type for boolean.
 
#define FSPDF_OBJECTTYPE_NUMBER   2
 PDF object type for integer or real number.
 
#define FSPDF_OBJECTTYPE_STRING   3
 PDF object type for string.
 
#define FSPDF_OBJECTTYPE_NAME   4
 PDF object type for name.
 
#define FSPDF_OBJECTTYPE_ARRAY   5
 PDF object type for array.
 
#define FSPDF_OBJECTTYPE_DICTIONARY   6
 PDF object type for dictionary.
 
#define FSPDF_OBJECTTYPE_STREAM   7
 PDF object type for stream.
 
#define FSPDF_OBJECTTYPE_NULL   8
 PDF object type for a null object.
 
#define FSPDF_OBJECTTYPE_REFERENCE   9
 PDF object type for a reference object.
 

Detailed Description

Definitions for access to PDF objects.
Definitions and functions in this module are included in fpdf_objects_r.h and fpdf_objects_w.h.
Module: PDFObjects
License Identifier: PDFObjects/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_objects_r.h.
For License Right Writing, see fpdf_objects_w.h.

This module contains following features:

Function Documentation

FS_RESULT FSPDF_Array_Add ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FSPDF_OBJECT  element 
)

Add an element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]elementHandle to a FSPDF_OBJECT object to be added as an element.
Note
All elements in an array object will be managed with the array object, so parameter element must NOT be freed by caller if successful.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or element is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • element: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddBoolean ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_BOOL  boolean 
)

Add a boolean element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]booleanA boolean value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document or array is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddDateTime ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
const FSCRT_DATETIMEZONE dt 
)

Add a date and time element into array, to the last position.

Date and time is a formatted string in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]dtPointer to a FSCRT_DATETIMEZONE structure which is a date value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or dt is a NULL pointer, or parameter dt is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddFloat ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_FLOAT  number 
)

Add a float element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]numberA float value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document or array is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddInteger ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  number 
)

Add an integer element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]numberAn integer value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document or array is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddMatrix ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
const FSCRT_MATRIX matrix 
)

Add a matrix element into array, to the last position.

Matrix is a six-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]matrixPointer to a FSCRT_MATRIX structure which is a matrix value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or matrix is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddRawByteString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_BOOL  hexStr,
const FSCRT_BSTR string 
)

Add a raw string element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]hexStrA boolean value indicates string is a hexadecimal string if it is TRUE or normal byte string if it is FALSE.
[in]stringPointer to a FSCRT_BSTR structure that is a raw byte string value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddRect ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
const FSCRT_RECTF rect 
)

Add a rectangle element into array, to the last position.

Rectangle is a four-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]rectPointer to a FSCRT_RECTF structure which is a rectangle value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or rect is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddUnicodeName ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
const FSCRT_BSTR nameStr 
)

Add an UTF-8 name element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]nameStrPointer to a FSCRT_BSTR structure which is an UTF-8 name value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or nameStr is a NULL pointer, or nameStr is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter nameStr is not an UTF-8 string.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_AddUnicodeString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
const FSCRT_BSTR string 
)

Add an UTF-8 string element into array, to the last position.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]stringPointer to a FSCRT_BSTR structure which is an UTF-8 byte string value to be added as an element.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter string is not an UTF-8 string.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_CountElements ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32 count 
)

Get the count of elements in an array.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[out]countPointer to a FS_INT32 object that receives the count of array elements. If there is any error or if object type not supported, it will be 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or count is a NULL pointer
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetArray ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT *  subArray 
)

Get an array element in an array.

Applicable to array elements of array type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]subArrayPointer to a FSPDF_OBJECT handle that receives an array value. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or subArray is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter array is not a type of PDF array, or element at index position is not an array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetBoolean ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FS_BOOL boolean 
)

Get a boolean element in an array.

Applicable to array elements of number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]booleanPointer to a FS_BOOL object that receives a boolean value. If there is any error or if object type not supported, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or boolean is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetDateTime ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSCRT_DATETIMEZONE dt 
)

Get a date and time element in an array.

Date and time expresses as a formatted string in PDF. Applicable to array elements of properly formatted string type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives a date value.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or dt is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_FORMAT if string content of element at parameter index position is empty or is not a date format.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetDict ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT *  dictionary 
)

Get a dictionary element in an array.

Applicable to array elements of dictionary type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]dictionaryPointer to a FSPDF_OBJECT handle that receives a dictionary value. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or dictionary is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter array is not a type of PDF array, or element at index position is not a dictionary.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetElement ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT *  object 
)

Get an element in an array.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]objectPointer to a FSPDF_OBJECT handle that receives element object. If there is any error or if object type not supported, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetFloat ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FS_FLOAT number 
)

Get a float element in an array.

Applicable to array elements of number type..

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]numberPointer to a FS_FLOAT object that receives a float value. If there is any error or if object type not supported, it will be 0.0f.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or number is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetInteger ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FS_INT32 number 
)

Get an integer element in an array.

Applicable to array elements of number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]numberPointer to a FS_INT32 object that receives an integer value. If there is any error or if object type not supported, it will be 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or number is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetMatrix ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSCRT_MATRIX matrix 
)

Get a matrix element in an array.

Matrix expresses as a six-element array in PDF. Applicable to array elements of array type, especially for matrix.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]matrixPointer to a FSCRT_MATRIX structure that receives a matrix value. If there is any error, it will be [1 0 0 1 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or matrix is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter array is not a type of PDF array, or element at index position is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_FORMAT if element at index position is empty or is not a matrix.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetRawByteString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSCRT_BSTR string 
)

Get a raw byte string element in an array.

Applicable to array elements of string, name, number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]stringPointer to a FSCRT_BSTR structure that receives a raw byte string value.
If there is any error or if object type not supported, FSCRT_BSTR::str will be empty if it is not NULL when call this function, and FSCRT_BSTR::len will be 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If parameter string is empty or does not have enough memory, this function will allocate memory by calling function FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetRect ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSCRT_RECTF rect 
)

Get a rectangle element in an array.

Rectangle expresses as a four-element array in PDF. Applicable to array elements of array type, especially for rectangle.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]rectPointer to a FSCRT_RECTF structure that receives a rectangle value. If there is any error, it will be [0 0 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or rect is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter array is not a type of PDF array, or element at index position is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_FORMAT if element at index position is empty or is not a rectangle.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetStream ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT *  stream 
)

Get a stream element in an array.

Applicable to array elements of stream type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]streamPointer to a FSPDF_OBJECT handle that receives a stream value. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or stream is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter array is not a type of PDF array, or element at index position is not a stream.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • stream: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_GetUnicodeString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSCRT_BSTR string 
)

Get an UTF-8 byte string element in an array.

Applicable to array elements of string, name, number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which should be a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[out]stringPointer to a FSCRT_BSTR structure that receives an UTF-8 byte string value.
If there is any error or if object type not supported, FSCRT_BSTR::str will be set empty if it is not NULL when call this function, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no element is found.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
If parameter string is empty or does not have enough memory, this function will allocate memory by calling function FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_InsertAt ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT  element 
)

Insert an element into array.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexThe index starting from 0, indicates position where element inserts.
If this is below 0 or count of element in parameter array is 0, parameter element is to be set to the first.
If this is larger than count of element in parameter array, parameter element is to be set to the last.
[in]elementHandle to a FSPDF_OBJECT object to be inserted as an element.
Note
All elements in an array object will be managed with the array object, so parameter element must NOT be freed by caller if successful.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or element is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If parameter index is out of range of count of array, element will be added to the last position.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • element: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_RemoveAt ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index 
)

Remove an element from array.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document or array is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Array_SetAt ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  array,
FS_INT32  index,
FSPDF_OBJECT  element 
)

Set a new element at parameter index position in array.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]arrayHandle to a FSPDF_OBJECT object which is a PDF array object.
[in]indexIndex of element. Range: 0 to (count-1). count is returned by function FSPDF_Array_CountElements.
[in]elementHandle to a FSPDF_OBJECT object to be set as a new element.
Note
All elements in an array object will be managed with the array object, so parameter element must NOT be freed by caller if successful.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, array or element is a NULL pointer.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or array is not a type of PDF array.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • element: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_EnumEntry ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
FSCRT_POSITION *  position,
FSCRT_BSTR key,
FSPDF_OBJECT *  object 
)

Enumerate entries in a dictionary and retrieve a key and a PDF object at a given position.

This function can be used to enumerate all entries in a dictionary by calling several times until FSCRT_ERRCODE_FINISHED is returned.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in,out]positionPointer to a FSCRT_POSITION object which represents the position of an entry. When this function is called, it represents the position of an entry – the key and value of this entry are to be retrieved. If call this function for first time, please pass a FSPDF_POSITION object with value NULL , in order to retrieved the first entry in dictionary.
When this function returns, it will receive the position of next entry. If there is no more entry to be enumerated, a FSPDF_POSITION object with value -1 will be returned.
[out]keyPointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of an entry's key.
If there is any error, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be set to 0.
[out]objectPointer to a FSPDF_OBJECT handle that receives a PDF object which is the value of an entry and associated with parameter key. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_TOBECONTINUED if an entry is retrieved, and there're still other entries to be retrieved.
FSCRT_ERRCODE_FINISHED if no more entries can be retrieved.
FSCRT_ERRCODE_PARAM if parameter document, dictionary, position, key or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_ERROR if fail to enumerate entry from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetArray ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSPDF_OBJECT *  array 
)

Get an array value from dictionary.

Applicable to dictionary elements of array type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]arrayPointer to a FSPDF_OBJECT object that receives a PDF array value associated with key. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or array is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary or element at parameter key position is not an array type.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary.
FSCRT_ERRCODE_ERROR if fail to get array from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • array: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetBoolean ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_BOOL boolean 
)

Get a boolean value from dictionary.

Applicable to dictionary elements of number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[out]booleanPointer to a FS_BOOL object that receives a boolean value associated with key. If there is any error or if object type not supported, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or boolean is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get boolean value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetDateTime ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSCRT_DATETIMEZONE dt 
)

Get a date and time value from dictionary.

Date and time expresses as a formatted string in PDF. Applicable to dictionary elements of properly formatted string.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which should be a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives a date and time value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or dt is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string, or element at parameter key position is empty or is not a date and time format.
FSCRT_ERRCODE_ERROR if fail to get date and time format string from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetDict ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSPDF_OBJECT *  subDictionary 
)

Get a dictionary value from dictionary.

Applicable to dictionary elements of dictionary type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]subDictionaryPointer to a FSPDF_OBJECT handle that receives a PDF dictionary value associated with key. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or subDictionary is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary or element at parameter key position is not a PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary.
FSCRT_ERRCODE_ERROR if fail to get dictionary value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • subDictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetElement ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSPDF_OBJECT *  object 
)

Get an element from dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[out]objectPointer to a FSPDF_OBJECT handle that receives a PDF object associated with key. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or object is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get elements from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetFloat ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_FLOAT number 
)

Get a float value from dictionary.

Applicable to dictionary elements of number type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which should be a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[out]numberPointer to a FS_FLOAT object that receives a float value associated with key. If there is any error or if object type not supported, it will be set 0.0f.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or number is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get float value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetInteger ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_INT32 number 
)

Get an integer value from dictionary.

Applicable to dictionary elements of number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]numberPointer to a FS_INT32 object that receives an integer value associated with key. If there is any error or if object type not supported, it will be 0.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or number is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get integer number value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetMatrix ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSCRT_MATRIX matrix 
)

Get a matrix value from dictionary.

Matrix expresses as a six-element array in PDF. Applicable to dictionary elements of array type, especially for matrix.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]matrixPointer to a FSCRT_BSTR structure that receives a matrix value associated with key. If there is any error, it will become [1 0 0 1 0 0].
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or matrix is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary or element at parameter key position is not an array.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string, or element at key position is empty or is not a matrix.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get matrix value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetRawByteString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSCRT_BSTR string 
)

Get a raw string value from dictionary.

Applicable to dictionary elements of string, name, number and boolean type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]stringPointer to a FSCRT_BSTR structure that receives a raw string value associated with key. If there is any error or if object type not supported, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be 0.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or string is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get raw byte string from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If string is empty or has not enough memory, this function will allocate memory by calling FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetRect ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSCRT_RECTF rect 
)

Get a rectangle value from dictionary.

Rectangle expresses as a four-element array in PDF. Applicable to dictionary elements of array type, especially for rectangle.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]rectPointer to a FSCRT_BSTR structure that receives a rectangle value associated with key. If there is any error, it will become [0 0 0 0].
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or rect is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary or element at parameter key position is not an array.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string, or element at key position is empty or is not a rectangle.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get rectangle value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetStream ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSPDF_OBJECT *  stream 
)

Get a stream value from dictionary.

Applicable to dictionary elements of stream type.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]streamPointer to a FSPDF_OBJECT handle that receives a PDF stream value associated with key. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or stream is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary or element at parameter key position is not a PDF stream.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary.
FSCRT_ERRCODE_ERROR if fail to get stream value from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • stream: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_GetUnicodeString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSCRT_BSTR string 
)

Get an UTF-8 string value from dictionary.

Applicable to string, name, number and boolean dictionary elements.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[out]stringPointer to a FSCRT_BSTR structure that receives an UTF-8 string value associated with key. If there is any error or if object type not supported, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be 0.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or string is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_NOTFOUND if parameter key is not found in dictionary or no object is found.
FSCRT_ERRCODE_ERROR if fail to get Unicode string from dictionary object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
If string is empty or does not have enough memory, this function will allocate memory by calling FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_HasKey ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_BOOL exist 
)

Determine whether a specific key exists in a dictionary or not.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[out]existPointer to a FS_BOOL object that receives a boolean value which indicates key exists or not:
  • TRUE: parameter key exists.
  • FALSE: parameter key does not exist.
If there is any error, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or exist is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if this function gets error for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_RemoveAt ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key 
)

Remove a specific key from dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary or key is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if the parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to remove a specific key from dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAt ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FSPDF_OBJECT  object 
)

Set an object as value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it should be a valid pointer to FSCRT_BSTR.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or object is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set an object in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • array: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtBoolean ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_BOOL  boolean 
)

Set a boolean value with specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, it is a valid pointer to FSCRT_BSTR.
[in]booleanA boolean value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary or key is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if the parameterdocument is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if the parameterkey is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a boolean value in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtDateTime ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
const FSCRT_DATETIMEZONE dt 
)

Set a date and time value to specific key in dictionary.

Date and time is a formatted string in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]dtPointer to a FSCRT_DATETIMEZONE which is a date value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or dt is a NULL pointer, key is empty, or parameter dt is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a date and time format string value in dictionary for any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtFloat ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_FLOAT  number 
)

Set a float value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]numberA float value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary or key is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a float value in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtInteger ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_INT32  number 
)

Set an integer value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]numberAn integer value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary or key is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set an integer value in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtMatrix ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
const FSCRT_MATRIX matrix 
)

Set a matrix value to specific key in dictionary.

Matrix is a six-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]matrixPointer to a FSCRT_MATRIX structure which is a matrix value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or matrix is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a matrix value in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtRawByteString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
FS_BOOL  hexStr,
const FSCRT_BSTR string 
)

Set a raw byte string value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]hexStrA boolean value indicates string is a hexadecimal string if it is TRUE or normal byte string if it is FALSE.
[in]stringPointer to a FSCRT_BSTR which is a raw byte string value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or string is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a raw byte string value in dictionary for any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtRect ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
const FSCRT_RECTF rect 
)

Set a rectangle value to specific key in dictionary.

Rectangle is a four-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]rectPointer to a FSCRT_RECTF structure which is a rectangle value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or rect is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key is not an UTF-8 format string.
FSCRT_ERRCODE_ERROR if fail to set a rectangle value in dictionary for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtUnicodeName ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
const FSCRT_BSTR nameStr 
)

Set a UTF-8 name value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string, a valid pointer to FSCRT_BSTR.
[in]nameStrPointer to a FSCRT_BSTR which is an UTF-8 name value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or nameStr is a NULL pointer, or either key or nameStr is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key or parameter nameStr is not an UTF-8 string.
FSCRT_ERRCODE_ERROR if fail to set a UTF-8 name value in dictionary for any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Dictionary_SetAtUnicodeString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
const FSCRT_BSTR key,
const FSCRT_BSTR string 
)

Set a UTF-8 byte string value to specific key in dictionary.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object.
[in]keyPointer to a UTF_8 string. It should be a valid pointer to FSCRT_BSTR.
[in]stringPointer to a FSCRT_BSTR which is an UTF-8 byte string value associated with key.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, dictionary, key or string is a NULL pointer, or key is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter dictionary is not a type of PDF dictionary.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_FORMAT if parameter key or parameter string is not an UTF-8 string.
FSCRT_ERRCODE_ERROR if fail to set a UTF-8 string value in dictionary for any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateArray ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT *  object 
)

Create an array PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateBoolean ( FSCRT_DOCUMENT  document,
FS_BOOL  boolean,
FSPDF_OBJECT *  object 
)

Create a boolean PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]booleanA boolean value, TRUE or FALSE.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateDateTime ( FSCRT_DOCUMENT  document,
const FSCRT_DATETIMEZONE dt,
FSPDF_OBJECT *  object 
)

Create a date PDF object.

Date time expresses as a formatted string in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dtPointer to a FSCRT_DATETIMEZONE structure which is a date value.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, dt or object is a NULL pointer, or paramter dt is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateDict ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT *  object 
)

Create a dictionary PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateFloat ( FSCRT_DOCUMENT  document,
FS_FLOAT  number,
FSPDF_OBJECT *  object 
)

Create a float number PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]numberA float value.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateInteger ( FSCRT_DOCUMENT  document,
FS_INT32  number,
FSPDF_OBJECT *  object 
)

Create an integer number PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]numberAn integer value.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateMatrix ( FSCRT_DOCUMENT  document,
const FSCRT_MATRIX matrix,
FSPDF_OBJECT *  object 
)

Create a matrix PDF object.

Matrix is a six-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object
[in]matrixPointer to a FSCRT_MATRIX structure which is a matrix value.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, matrix or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateRawByteString ( FSCRT_DOCUMENT  document,
const FSCRT_BSTR string,
FS_BOOL  hexStr,
FSPDF_OBJECT *  object 
)

Create a raw string PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]stringPointer to a FSCRT_BSTR structure which is a raw byte string value. If it is empty, an empty PDF string object is created.
[in]hexStrA boolean value indicates parameter string is a hexadecimal string if it is TRUE or normal byte string if it is FALSE.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, string or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateRect ( FSCRT_DOCUMENT  document,
const FSCRT_RECTF rect,
FSPDF_OBJECT *  object 
)

Create a rectangle PDF object.

Rectangle is a four-element array in PDF.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]rectPointer to a FSCRT_RECTF structure which is a rectangle value.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, rect or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateReference ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  refObj,
FSPDF_OBJECT *  object 
)

Create a reference PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]refObjHandle to a FSPDF_OBJECT object which is the referenced PDF object.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, refObj or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • refObj: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateReferenceWithObjNum ( FSCRT_DOCUMENT  document,
FS_DWORD  objNum,
FSPDF_OBJECT *  object 
)

Create a reference PDF object with an object number.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objNumObject number of an indirect PDF object for which a referenced PDF object is created. It should be above 0.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document or object is a NULL pointer, or if parameter objNum is 0.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateStream ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  dictionary,
FSPDF_OBJECT *  object 
)

Create a stream PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]dictionaryHandle to a FSPDF_OBJECT object which is a PDF dictionary object. If it is a NULL pointer, a new PDF dictionary object is created for the new stream object.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter dictionary is not a PDF dictionary if it is valid.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • dictionary: this handle is short-term.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateUnicodeName ( FSCRT_DOCUMENT  document,
const FSCRT_BSTR nameStr,
FSPDF_OBJECT *  object 
)

Create an UTF-8 name PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]nameStrPointer to a FSCRT_BSTR structure which is an UTF-8 byte string value. It cannot be NULL or be empty.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, nameStr or object is a NULL pointer, or nameStr is empty.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_FORMAT if parameter nameStr is not an UTF-8 format string.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_CreateUnicodeString ( FSCRT_DOCUMENT  document,
const FSCRT_BSTR string,
FSPDF_OBJECT *  object 
)

Create an UTF-8 string PDF object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]stringPointer to a FSCRT_BSTR structure which is an UTF-8 byte string value. If it is empty, an empty PDF string object is created.
[out]objectPointer to a FSPDF_OBJECT handle that receives a new PDF object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, string or object is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_FORMAT if parameter string is not an UTF-8 format string.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetBoolean ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FS_BOOL boolean 
)

Get boolean value from a PDF object.

Applicable for number and boolean objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]booleanPointer to a FS_BOOL object that receives the boolean value. If there is any error or if object type is not supported,it will be set FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or boolean is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document. FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetDateTime ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FSCRT_DATETIMEZONE dt 
)

Get the date value from a PDF object.

Date and time is a formatted string in PDF. Applicable to properly formatted string objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives the date and time value.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or dt is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_FORMAT if parameter object is empty or is not a date format.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetFloat ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FS_FLOAT number 
)

Get float value from a PDF object.

Applicable to number objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]numberPointer to a FS_FLOAT object that receives the float value. If there is any error or if object type not supported,it will be set 0.0f.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or number is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetInteger ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FS_INT32 number 
)

Get integer value from a PDF object.

Applicable for number and boolean objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]numberPointer to a FS_INT32 object that receives the integer value. If there is any error or if object type is not supported, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or number is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetMatrix ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FSCRT_MATRIX matrix 
)

Get matrix value from a PDF object.

Matrix is a six-element array in PDF. Applicable to array objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]matrixPointer to a FSCRT_MATRIX structure that receives the matrix value. If there is any error or if object type not supported, it will be set [1 0 0 1 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or matrix is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter object is not a PDF array object.
FSCRT_ERRCODE_FORMAT if parameter object is empty or is not a matrix.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetObjNum ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FS_DWORD objNum 
)

Get the object number.

If a PDF object is an indirect object, it will has a valid object number which is greater than 0.
If object number is 0, it means this PDF object is a direct object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]objNumPointer to a FS_DWORD object that receives the object number. If there is any error, it will become 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or objNum is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetRawByteString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FSCRT_BSTR string 
)

Get the raw byte string value from a PDF object.

The raw byte string is original string value in PDF, and is not encoded or decoded.
Applicable for string, name, number and boolean objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]stringPointer to a FSCRT_BSTR structure that receives the raw byte string value.
If there is any error or if object type not supported, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If string is empty or does not have enough memory, this function will allocate memory by calling function FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetRect ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FSCRT_RECTF rect 
)

Get rectangle value from a PDF object.

Rectangle is a four-element array in PDF. Applicable to array objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]rectPointer to a FSCRT_RECTF structure that receives the rectangle value. If there is any error or if object type not supported, it will be [0 0 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or rect is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter object is not a PDF array object.
FSCRT_ERRCODE_FORMAT if parameter object is empty or is not a rectangle.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetType ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FS_INT32 type 
)

Get the type of an object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]typePointer to a FS_INT32 object that receives the object type. Please refer to macro definitions FSPDF_OBJECTTYPE_XXX and this would be one of these macros.
If there is any error, it will become FSPDF_OBJECTTYPE_INVALID.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or type is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_GetUnicodeString ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object,
FSCRT_BSTR string 
)

Get the UTF-8 byte string value from a PDF object.

Applicable to string, name, number and boolean objects.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is a PDF object.
[out]stringPointer to a FSCRT_BSTR structure that receives the UTF-8 byte string value.
If there is any error or if object type not supported, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, object or string is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
UTF-8 is a standard character encoding method defined by Unicode Consortium.
If parameter string is empty or does not have enough memory, this function will allocate memory by calling FSCRT_BStr_SetLength.
It is better for caller to prepare enough space before calling this function if possible.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Object_Release ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  object 
)

Release a PDF object created but not inserted into any PDF document or other PDF objects.

This function is used to release PDF objects which are created by functions FSPDF_Object_CreateXXX, but is not set to another PDF object associated with PDF document or inserted to PDF document.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]objectHandle to a FSPDF_OBJECT object which is an object.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter object is a NULL pointer.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • object: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Reference_GetReferObject ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  reference,
FSPDF_OBJECT *  referObj 
)

Get the referred object associated to a reference object.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]referenceHandle to a FSPDF_OBJECT object which should be a PDF reference object.
[out]referObjPointer to a FSPDF_OBJECT handle that receives a PDF referred object associated with reference. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, reference or referObj is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter reference is not a type of PDF reference.
FSCRT_ERRCODE_NOTFOUND if referObj is not found in document. FSCRT_ERRCODE_ERROR if fail to get referObj value from reference object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • reference: this handle is short-term.
  • referObj: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Stream_ExportData ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  stream,
FS_BOOL  rawData,
FSCRT_FILE *  file 
)

Export stream data to a file asynchronously.

This function provides an asynchronous way to get the stream data. This function usually gets a large size of stream data in a progressive way. When this function returned, the application need to invoke function FSCRT_File_Read by passing the returned FSCRT_FILE to extract the data needed.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]streamHandle to a FSPDF_OBJECT object that is a PDF stream object.
[in]rawDataA boolean value indicates to export raw data from stream if it is TRUE, or to export decoded data (original data) if it is FALSE.
[out]filePointer to a FSCRT_FILE handle that receives the handle of file object.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, stream or file is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter stream is not a type of PDF stream.
FSCRT_ERRCODE_FILE if the application cannot write stream data into parameter file.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
This function is more efficient than FSPDF_Stream_GetData to large stream data. Application can optimize to write data through file stream.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • stream: this handle is short-term.
  • file: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Stream_GetData ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  stream,
FS_BOOL  rawData,
FS_LPVOID  buffer,
FS_DWORD length 
)

Get stream data.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]streamHandle to a FSPDF_OBJECT object which is a PDF stream object.
[in]rawDataA boolean value indicates to get raw data from stream if it is TRUE, or to get decoded data (original data) if it is FALSE.
[out]bufferPointer to a memory block to receive stream data. If it is NULL, this function returns the needed buffer size into parameter length.
[in,out]lengthPointer to a FS_DWORD to indicate data size in bytes.
When call this function, it means the size of parameter buffer if buffer is not NULL, When this function returns, it means the actual data size.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, stream or length is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter stream is not a type of PDF stream.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter buffer does not have enough space or parameter length is too small.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Commonly, this function is called twice, pass NULL to buffer at first to retrieve necessary buffer size, and call it again when buffer contains enough space. length should never be empty.
It is better that caller prepares enough space before calling this function.
But it is not a good manner to get large data by using this function, instead of FSPDF_Stream_ExportData.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • stream: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Stream_GetDict ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  stream,
FSPDF_OBJECT *  dictionary 
)

Get the dictionary object associated to a stream.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object returned by function FSPDF_Doc_StartLoad.
[in]streamHandle to a FSPDF_OBJECT object which should be a PDF stream object.
[out]dictionaryPointer to a FSPDF_OBJECT handle that receives a PDF dictionary object associated with stream. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, stream or dictionary is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document, or parameter stream is not a type of PDF stream.
FSCRT_ERRCODE_ERROR if fail to get dictionary value from stream object for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • stream: this handle is short-term.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Stream_ImportData ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  stream,
FSCRT_FILE  file 
)

Import stream data from a file.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]streamHandle to a FSPDF_OBJECT object which is a PDF stream object.
[in]fileHandle to a FSCRT_FILE object that from which stream data imports.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, stream or file is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter stream is not a type of PDF stream.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
This function is more efficient than function FSPDF_Stream_SetData to large data. Application can optimize to read data through parameter file.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • stream: this handle is short-term.
  • file: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Stream_SetData ( FSCRT_DOCUMENT  document,
FSPDF_OBJECT  stream,
FS_LPCVOID  buffer,
FS_DWORD  length 
)

Set stream data.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]streamHandle to a FSPDF_OBJECT object that is a PDF stream object.
[in]bufferValid pointer to a memory block.
[in]lengthSize of buffer in bytes.
Returns
FSCRT_ERRCODE_SUCCESS if successful
FSCRT_ERRCODE_PARAM if parameter document, stream or buffer is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a PDF document or parameter stream is not a type of PDF stream.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or using current function is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
It is not a good manner to set a large data by using this function, instead of calling function FSPDF_Stream_ImportData.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • document: this handle is long-term partially recoverable.
  • stream: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation