fpdf_objects_r.h
Go to the documentation of this file.
1 
26 #ifndef _FSPDF_OBJECTS_R_H_
27 #define _FSPDF_OBJECTS_R_H_
28 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 /*******************************************************************************/
58 /* PDF object types */
59 /*******************************************************************************/
60 #ifndef _FSPDF_DEF_MACRO_OBJECTYPE_
61 #define _FSPDF_DEF_MACRO_OBJECTYPE_
62 
68 #define FSPDF_OBJECTTYPE_INVALID 0
69 
70 #define FSPDF_OBJECTTYPE_BOOLEAN 1
71 
72 #define FSPDF_OBJECTTYPE_NUMBER 2
73 
74 #define FSPDF_OBJECTTYPE_STRING 3
75 
76 #define FSPDF_OBJECTTYPE_NAME 4
77 
78 #define FSPDF_OBJECTTYPE_ARRAY 5
79 
80 #define FSPDF_OBJECTTYPE_DICTIONARY 6
81 
82 #define FSPDF_OBJECTTYPE_STREAM 7
83 
84 #define FSPDF_OBJECTTYPE_NULL 8
85 
86 #define FSPDF_OBJECTTYPE_REFERENCE 9
87 
89 #endif /* _FSPDF_DEF_MACRO_OBJECTYPE_ */
90 
91 /*******************************************************************************/
92 /* Object data retrieval */
93 /*******************************************************************************/
120 FS_RESULT FSPDF_Object_GetType(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32* type);
121 
150 FS_RESULT FSPDF_Object_GetObjNum(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_DWORD* objNum);
151 
179 FS_RESULT FSPDF_Object_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_BOOL* boolean);
180 
208 FS_RESULT FSPDF_Object_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32* number);
209 
237 FS_RESULT FSPDF_Object_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_FLOAT* number);
238 
272 FS_RESULT FSPDF_Object_GetRawByteString(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_BSTR* string);
273 
307 FS_RESULT FSPDF_Object_GetUnicodeString(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_BSTR* string);
308 
337 FS_RESULT FSPDF_Object_GetDateTime(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_DATETIMEZONE* dt);
338 
368 FS_RESULT FSPDF_Object_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_RECTF* rect);
369 
399 FS_RESULT FSPDF_Object_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_MATRIX* matrix);
400 
401 /*******************************************************************************/
402 /* PDF array access */
403 /*******************************************************************************/
429 FS_RESULT FSPDF_Array_CountElements(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32* count);
430 
459 FS_RESULT FSPDF_Array_GetElement(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT* object);
460 
491 FS_RESULT FSPDF_Array_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_BOOL* boolean);
492 
523 FS_RESULT FSPDF_Array_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_INT32* number);
524 
555 FS_RESULT FSPDF_Array_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_FLOAT* number);
556 
592 FS_RESULT FSPDF_Array_GetRawByteString(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_BSTR* string);
593 
630 FS_RESULT FSPDF_Array_GetUnicodeString(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_BSTR* string);
631 
663 FS_RESULT FSPDF_Array_GetDateTime(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_DATETIMEZONE* dt);
664 
695 FS_RESULT FSPDF_Array_GetArray(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT* subArray);
696 
729 FS_RESULT FSPDF_Array_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_RECTF* rect);
730 
763 FS_RESULT FSPDF_Array_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_MATRIX* matrix);
764 
796 FS_RESULT FSPDF_Array_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT* dictionary);
797 
829 FS_RESULT FSPDF_Array_GetStream(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT* stream);
830 
831 /*******************************************************************************/
832 /* PDF dictionary access */
833 /*******************************************************************************/
867 FS_RESULT FSPDF_Dictionary_HasKey(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FS_BOOL* exist);
868 
900 FS_RESULT FSPDF_Dictionary_GetElement(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSPDF_OBJECT* object);
901 
940 FS_RESULT FSPDF_Dictionary_EnumEntry(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, FSCRT_POSITION* position, FSCRT_BSTR* key, FSPDF_OBJECT* object);
941 
974 FS_RESULT FSPDF_Dictionary_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FS_BOOL* boolean);
975 
1008 FS_RESULT FSPDF_Dictionary_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FS_INT32* number);
1009 
1042 FS_RESULT FSPDF_Dictionary_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FS_FLOAT* number);
1043 
1081 FS_RESULT FSPDF_Dictionary_GetRawByteString(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSCRT_BSTR* string);
1082 
1121 FS_RESULT FSPDF_Dictionary_GetUnicodeString(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSCRT_BSTR* string);
1122 
1156 FS_RESULT FSPDF_Dictionary_GetDateTime(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSCRT_DATETIMEZONE* dt);
1157 
1192 FS_RESULT FSPDF_Dictionary_GetArray(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSPDF_OBJECT* array);
1193 
1229 FS_RESULT FSPDF_Dictionary_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSCRT_RECTF* rect);
1230 
1266 FS_RESULT FSPDF_Dictionary_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSCRT_MATRIX* matrix);
1267 
1302 FS_RESULT FSPDF_Dictionary_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSPDF_OBJECT* subDictionary);
1303 
1338 FS_RESULT FSPDF_Dictionary_GetStream(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR* key, FSPDF_OBJECT* stream);
1339 
1340 /*******************************************************************************/
1341 /* PDF stream access */
1342 /*******************************************************************************/
1370 FS_RESULT FSPDF_Stream_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FSPDF_OBJECT* dictionary);
1371 
1406 FS_RESULT FSPDF_Stream_GetData(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FS_LPVOID buffer, FS_DWORD* length);
1407 
1443 FS_RESULT FSPDF_Stream_ExportData(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FSCRT_FILE* file);
1444 
1445 /*******************************************************************************/
1446 /* PDF reference access */
1447 /*******************************************************************************/
1448 
1477 FS_RESULT FSPDF_Reference_GetReferObject(FSCRT_DOCUMENT document, FSPDF_OBJECT reference, FSPDF_OBJECT* referObj);
1478 
1479 #ifdef __cplusplus
1480 };
1481 #endif
1482  /* group FPDFOBJECTS */
1484 
1485 #endif // _FSPDF_OBJECTS_R_H_
FS_RESULT FSPDF_Dictionary_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_INT32 *number)
Get an integer value from dictionary.
FS_RESULT FSPDF_Dictionary_GetElement(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *object)
Get an element from dictionary.
FS_RESULT FSPDF_Dictionary_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_BOOL *boolean)
Get a boolean value from dictionary.
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.
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.
FS_RESULT FSPDF_Object_GetRawByteString(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_BSTR *string)
Get the raw byte string value from a PDF object.
Structure for rectangle, in float.
Definition: fs_base_r.h:2078
float FS_FLOAT
32-bit floating-point number, single precision.
Definition: fs_base_r.h:148
FS_RESULT FSPDF_Array_CountElements(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 *count)
Get the count of elements in an array.
FS_RESULT FSPDF_Object_GetObjNum(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_DWORD *objNum)
Get the object number.
FS_RESULT FSPDF_Dictionary_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *subDictionary)
Get a dictionary value from dictionary.
FS_RESULT FSPDF_Array_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_BOOL *boolean)
Get a boolean element in an array.
FS_RESULT FSPDF_Array_GetArray(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *subArray)
Get an array element in an array.
FS_RESULT FSPDF_Dictionary_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_RECTF *rect)
Get a rectangle value from dictionary.
FS_RESULT FSPDF_Object_GetBoolean(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_BOOL *boolean)
Get boolean value from a PDF object.
FS_RESULT FSPDF_Stream_GetData(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FS_LPVOID buffer, FS_DWORD *length)
Get stream data.
FS_RESULT FSPDF_Object_GetType(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32 *type)
Get the type of an object.
unsigned int FS_DWORD
32-bit unsigned integer.
Definition: fs_base_r.h:142
FS_RESULT FSPDF_Stream_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FSPDF_OBJECT *dictionary)
Get the dictionary object associated to a stream.
FS_RESULT FSPDF_Array_GetDict(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *dictionary)
Get a dictionary element in an array.
int FS_INT32
32-bit signed integer.
Definition: fs_base_r.h:175
FS_RESULT FSPDF_Object_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_RECTF *rect)
Get rectangle value from a PDF object.
Structure for date and time.
Definition: fs_base_r.h:2018
FS_RESULT FSPDF_Dictionary_GetStream(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *stream)
Get a stream value from dictionary.
FS_RESULT FSPDF_Array_GetElement(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *object)
Get an element in an array.
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.
FS_RESULT FSPDF_Dictionary_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSCRT_MATRIX *matrix)
Get a matrix value from dictionary.
FS_RESULT FSPDF_Dictionary_GetArray(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FSPDF_OBJECT *array)
Get an array value from dictionary.
FS_RESULT FSPDF_Array_GetStream(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSPDF_OBJECT *stream)
Get a stream element in an array.
FS_RESULT FSPDF_Stream_ExportData(FSCRT_DOCUMENT document, FSPDF_OBJECT stream, FS_BOOL rawData, FSCRT_FILE *file)
Export stream data to a file asynchronously.
FS_RESULT FSPDF_Object_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_INT32 *number)
Get integer value from a PDF object.
int FS_BOOL
Boolean type (This should be TRUE or FALSE).
Definition: fs_base_r.h:133
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.
FS_RESULT FSPDF_Reference_GetReferObject(FSCRT_DOCUMENT document, FSPDF_OBJECT reference, FSPDF_OBJECT *referObj)
Get the referred object associated to a reference object.
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.
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.
void * FS_LPVOID
A pointer to any types.
Definition: fs_base_r.h:127
FS_RESULT FSPDF_Array_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_MATRIX *matrix)
Get a matrix element in an array.
Structure for 2D matrix.
Definition: fs_base_r.h:2130
Structure for byte string.
Definition: fs_base_r.h:611
FS_RESULT FSPDF_Array_GetInteger(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_INT32 *number)
Get an integer element in an array.
FS_RESULT FSPDF_Object_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FS_FLOAT *number)
Get float value from a PDF object.
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.
FS_RESULT FSPDF_Object_GetMatrix(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_MATRIX *matrix)
Get matrix value from a PDF object.
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.
FS_RESULT FSPDF_Dictionary_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT dictionary, const FSCRT_BSTR *key, FS_FLOAT *number)
Get a float value from dictionary.
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.
int FS_RESULT
Result code for functions in Foxit PDF SDK.
Definition: fs_base_r.h:160
FS_RESULT FSPDF_Object_GetDateTime(FSCRT_DOCUMENT document, FSPDF_OBJECT object, FSCRT_DATETIMEZONE *dt)
Get the date value from a PDF object.
FS_RESULT FSPDF_Array_GetFloat(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FS_FLOAT *number)
Get a float element in an array.
FS_RESULT FSPDF_Array_GetRect(FSCRT_DOCUMENT document, FSPDF_OBJECT array, FS_INT32 index, FSCRT_RECTF *rect)
Get a rectangle element in an array.

Foxit Corporation