#ifndef _FS_PDFPAGE_C_H_
#define _FS_PDFPAGE_C_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "fx_basic_c.h"
#include "fs_common_c.h"
#include "fs_annot_c.h"
#include "fs_pdfgraphicsobject_c.h"
#include "fs_signature_c.h"


typedef enum _FSParseFlags {
e_FSParseFlagsParsePageNormal = 0x0000,
e_FSParsePageTextOnly = 0x0001,
}FSParseFlags;



typedef enum _FSCalcMarginMode {
e_FSCalcContentsBox  = 0,
e_FSCalcDetection = 1,
}FSCalcMarginMode;



typedef enum _FSFlattenOptions {
e_FSFlattenAll        = 0,
e_FSFlattenNoAnnot      = 0x0001,
e_FSFlattenNoFormControl  = 0x0002,
}FSFlattenOptions;



typedef enum _FSBoxType {
e_FSMediaBox = 0,
e_FSCropBox = 1,
e_FSTrimBox = 2,
e_FSArtBox = 3,
e_FSBleedBox = 4,
}FSBoxType;



typedef enum _FSSize {
e_FSSizeLetter = 1,
e_FSSizeLegal = 2,
e_FSSizeA2 = 3,
e_FSSizeA3 = 4,
e_FSSizeA4 = 5,
e_FSSizeA5 = 6,
e_FSSizeA6 = 7,
e_FSSizeB2 = 8,
e_FSSizeB3 = 9,
e_FSSizeB4 = 10,
e_FSSizeB5 = 11,
e_FSSizeB6 = 12,
}FSSize;



typedef enum _FSTextMergeOption {
e_FSTextMergeNone  = 0,
e_FSTextMergeTJY = 1,
e_FSTextMergeBTET = 2,
}FSTextMergeOption;


FSErrorCode FSDK_GraphicsObjects_Release(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle);
FSErrorCode FSDK_GraphicsObjects_IsEmpty(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_BOOL* return_value);
FSErrorCode FSDK_GraphicsObjects_GetFirstGraphicsObjectPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle,  FSGraphicsObjectType filter, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetNextGraphicsObjectPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION position, FSGraphicsObjectType filter, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetLastGraphicsObjectPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle,  FSGraphicsObjectType filter, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetPrevGraphicsObjectPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION position, FSGraphicsObjectType filter, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetGraphicsObject(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION position, FS_GRAPHICSOBJECT_HANDLE* return_value);
FSErrorCode FSDK_GraphicsObjects_InsertGraphicsObject(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION position_insert_after, FS_GRAPHICSOBJECT_HANDLE graphics_object, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_RemoveGraphicsObject(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle,  FS_GRAPHICSOBJECT_HANDLE graphics_object, FS_BOOL* return_value);
FSErrorCode FSDK_GraphicsObjects_RemoveGraphicsObjectByPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION position, FS_BOOL* return_value);
FSErrorCode FSDK_GraphicsObjects_MoveGraphicsObjectByPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_POSITION current_position, FS_POSITION position_move_after, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetGraphicsObjectPosition(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle,  FS_GRAPHICSOBJECT_HANDLE graphics_object, FS_POSITION* return_value);
FSErrorCode FSDK_GraphicsObjects_GetGraphicsObjectCount(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, int* return_value);
FSErrorCode FSDK_GraphicsObjects_GetGraphicsObjectIndex(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle,  FS_GRAPHICSOBJECT_HANDLE graphics_object, int* return_value);
FSErrorCode FSDK_GraphicsObjects_GetGraphicsObject0(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, int index, FS_GRAPHICSOBJECT_HANDLE* return_value);
FSErrorCode FSDK_GraphicsObjects_GenerateContent(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FS_BOOL* return_value);
FSErrorCode FSDK_GraphicsObjects_GenerateContent0(FS_GRAPHICSOBJECTS_HANDLE graphicsobjects_handle, FSTextMergeOption text_merge_option, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_Create(const FS_PDFDOC_HANDLE document, FS_PDFDICTIONARY_HANDLE page_dict, FS_PDFPAGE_HANDLE* pdfpage_return_value);
FSErrorCode FSDK_PDFPage_Create0(const FS_GRAPHICSOBJECTS_HANDLE other, FS_PDFPAGE_HANDLE* pdfpage_return_value);
FSErrorCode FSDK_PDFPage_Release(FS_PDFPAGE_HANDLE pdfpage_handle);
FSErrorCode FSDK_PDFPage_GetDocument(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFDOC_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetDict(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFDICTIONARY_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_IsParsed(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_StartParse(FS_PDFPAGE_HANDLE pdfpage_handle, FS_UINT32 flags, FSPauseCallback* pause,
                                 FS_BOOL is_reparse, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetIndex(FS_PDFPAGE_HANDLE pdfpage_handle, int* return_value);
FSErrorCode FSDK_PDFPage_GetHeight(FS_PDFPAGE_HANDLE pdfpage_handle, float* return_value);
FSErrorCode FSDK_PDFPage_GetWidth(FS_PDFPAGE_HANDLE pdfpage_handle, float* return_value);
FSErrorCode FSDK_PDFPage_GetRotation(FS_PDFPAGE_HANDLE pdfpage_handle, FSRotation* return_value);
FSErrorCode FSDK_PDFPage_LoadThumbnail(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BITMAP_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetDisplayMatrix(FS_PDFPAGE_HANDLE pdfpage_handle, int left, int top, int width, int height, FSRotation rotate, FSMatrix* return_value);
FSErrorCode FSDK_PDFPage_CalcContentBBox(FS_PDFPAGE_HANDLE pdfpage_handle, FSCalcMarginMode mode, FSRectF* return_value);
FSErrorCode FSDK_PDFPage_GetAnnotCount(FS_PDFPAGE_HANDLE pdfpage_handle, int* return_value);
FSErrorCode FSDK_PDFPage_GetAnnot(FS_PDFPAGE_HANDLE pdfpage_handle, int index, FS_ANNOT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetAnnotAtPoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF position, float tolerance, FS_ANNOT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetAnnotAtDevicePoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF position, float tolerance, const FSMatrix* matrix, FS_ANNOT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetAnnotsAtPoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF position, float tolerance, FS_ANNOT_HANDLE* return_annotarray, FS_UINT32* return_array_length);
FSErrorCode FSDK_PDFPage_GetAnnotsAtDevicePoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF position, float tolerance, const FSMatrix* matrix, FS_ANNOT_HANDLE* return_annotarray, FS_UINT32* return_array_length);
FSErrorCode FSDK_PDFPage_AddAnnot(FS_PDFPAGE_HANDLE pdfpage_handle,  FSAnnotType type, const FSRectF rect, FS_ANNOT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_AddAnnot0(FS_PDFPAGE_HANDLE pdfpage_handle,  FS_PDFDICTIONARY_HANDLE annot_dict, FS_ANNOT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_RemoveAnnot(FS_PDFPAGE_HANDLE pdfpage_handle, const FS_ANNOT_HANDLE annot, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_HasTransparency(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_IsScanned(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_Flatten(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL for_display, FS_UINT32 options, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_FlattenAnnot(FS_PDFPAGE_HANDLE pdfpage_handle,  FS_ANNOT_HANDLE annot, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_SetAnnotGroup(FS_PDFPAGE_HANDLE pdfpage_handle, const FS_MARKUPANNOT_HANDLE* markup_array, FS_UINT32 array_length_annot_array, int header_index, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_AddSignature(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF rect, FS_SIGNATURE_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_AddSignature0(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF rect, const wchar_t* field_name, FS_SIGNATURE_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_AddSignature1(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF rect, const wchar_t* field_name, FSSignatureType signature_type, FS_BOOL to_check_permission, FS_SIGNATURE_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_HasWatermark(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_RemoveAllWatermarks(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_SetRotation(FS_PDFPAGE_HANDLE pdfpage_handle,  FSRotation rotate);
FSErrorCode FSDK_PDFPage_SetSize(FS_PDFPAGE_HANDLE pdfpage_handle, float width, float height);
FSErrorCode FSDK_PDFPage_SetSize0(FS_PDFPAGE_HANDLE pdfpage_handle,  FSSize size);
FSErrorCode FSDK_PDFPage_SetBox(FS_PDFPAGE_HANDLE pdfpage_handle, FSBoxType box_type, const FSRectF box);
FSErrorCode FSDK_PDFPage_GetBox(FS_PDFPAGE_HANDLE pdfpage_handle, FSBoxType box_type, FSRectF* return_value);
FSErrorCode FSDK_PDFPage_GetUserUnitSize(FS_PDFPAGE_HANDLE pdfpage_handle, float* return_value);
FSErrorCode FSDK_PDFPage_SetUserUnitSize(FS_PDFPAGE_HANDLE pdfpage_handle, float user_unit);
FSErrorCode FSDK_PDFPage_Transform(FS_PDFPAGE_HANDLE pdfpage_handle, const FSMatrix matrix, FS_BOOL need_transform_clip_path, FS_BOOL need_transform_annotations, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_Normalize(FS_PDFPAGE_HANDLE pdfpage_handle, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_SetClipRect(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF clip_rect);
FSErrorCode FSDK_PDFPage_SetThumbnail(FS_PDFPAGE_HANDLE pdfpage_handle, const FS_BITMAP_HANDLE thumbnail);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectAtPoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF point, float tolerance,
                                                      FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectsAtPoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF point, float tolerance,
                                                           FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_graphicsobjects_array, FS_UINT32* return_array_length_settingdata_array);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectAtDevicePoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF point, float tolerance,const FSMatrix* matrix ,
                                                      FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectsAtDevicePoint(FS_PDFPAGE_HANDLE pdfpage_handle, const FSPointF point, float tolerance,const FSMatrix* matrix,
                                                           FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_graphicsobjects_array, FS_UINT32* return_array_length_settingdata_array);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectAtRectangle(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF rect, FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetGraphicsObjectsAtRectangle(FS_PDFPAGE_HANDLE pdfpage_handle, const FSRectF rect, FSGraphicsObjectType filter, FS_GRAPHICSOBJECT_HANDLE* return_graphicsobjects_array, FS_UINT32* return_array_length_settingdata_array);
FSErrorCode FSDK_PDFPage_AddImage(FS_PDFPAGE_HANDLE pdfpage_handle, const FS_IMAGE_HANDLE image, int frame_index, const FSPointF position, float width, float height,
                FS_BOOL auto_generate_content, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_AddImageFromFilePath(FS_PDFPAGE_HANDLE pdfpage_handle, const wchar_t* file_path, const FSPointF position, float width, float height,
                            FS_BOOL auto_generate_content, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_GetAnnots(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFARRAY_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetResources(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFDICTIONARY_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetContents(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFOBJECT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetThumb(FS_PDFPAGE_HANDLE pdfpage_handle, FS_PDFSTREAM_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_GetInheritedAttribute(FS_PDFPAGE_HANDLE pdfpage_handle, const char* attruibute_name, FS_PDFOBJECT_HANDLE* return_value);
FSErrorCode FSDK_PDFPage_ClearRenderCache(FS_PDFPAGE_HANDLE pdfpage_handle);
FSErrorCode FSDK_PDFPage_GetSuggestedRect(FS_PDFPAGE_HANDLE pdfpage_handle, const FS_BITMAP_HANDLE render_result, const FSMatrix render_matrix, const FSPointF point, FSRectF* return_value);
FSErrorCode FSDK_PDFPage_AddText(FS_PDFPAGE_HANDLE pdfpage_handle, const wchar_t* text, const FSRectF rect, const FSRichTextStyle style, const FSMatrix matrix, FS_BOOL is_each_text,FS_BOOL disable_embed_font, FS_BOOL* return_value);
FSErrorCode FSDK_PDFPage_AddText0(FS_PDFPAGE_HANDLE pdfpage_handle, const wchar_t* text, const FSRectF rect, const FSRichTextStyle style, int rotation, FSRotationPointOptions  rotate_point, FS_BOOL disable_embed_font, FSRectF* return_value);
FSErrorCode FSDK_PDFPage_CalculateNewRectForText(FS_PDFPAGE_HANDLE pdfpage_handle, const wchar_t* text, const FSRectF rect, const FSRichTextStyle style, int rotation, FSRotationPointOptions  rotate_point, FS_BOOL disable_embed_font, FSRectF* return_value);
FSErrorCode FSDK_PDFPage_SplitTextsInRectangle(FS_PDFPAGE_HANDLE pdfpage_handle, FSRectF rect, int split_step, FS_TEXTOBJECT_HANDLE* return_textobjects_array, FS_UINT32* return_array_length_settingdata_array);
#ifdef __cplusplus
}
#endif
#endif
