#ifndef _FS_PDF2OFFICE_C_H_
#define _FS_PDF2OFFICE_C_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "fx_stream_c.h"

typedef struct _FSPDF2WordSettingData {
  FS_BOOL enable_retain_page_layout;
  FS_BOOL enable_generate_headers_and_footers;
  FS_BOOL enable_generate_footnotes_and_endnotes;
  FS_BOOL enable_generate_page_rendered_break;
  int max_blank_paragraphs_per_page_bottom;
}FSPDF2WordSettingData;

typedef struct _FSPDF2PowerPointSettingData {
  FS_BOOL enable_aggressively_split_sections;
  FS_BOOL enable_adapt_to_largest_page;
}FSPDF2PowerPointSettingData;


typedef enum _FSWorkbookSettings {
e_FSWorkbookSettingsDocument = 0,
e_FSWorkbookSettingsEachTable = 1,
e_FSWorkbookSettingsEachPage = 2,
}FSWorkbookSettings;


typedef struct _FSPDF2ExcelSettingData {
  FS_BSTR decimal_symbol;
  FS_BSTR thousands_separator;
  FSWorkbookSettings workbook_settings;
  FS_BOOL enable_aggressive_table_repair;
  FS_BOOL include_watermarks;
}FSPDF2ExcelSettingData;

typedef struct _FSPDF2OfficeSettingData {
  FS_WSTR metrics_data_folder_path;
  FS_BOOL enable_ml_recognition;
  FS_RANGE_HANDLE page_range;
  FS_BOOL include_pdf_comments;
  FSPDF2WordSettingData word_setting_data;
  FSPDF2PowerPointSettingData power_point_setting_data;
  FSPDF2ExcelSettingData excel_setting_data;
  FS_BOOL enable_trailing_space;
  FS_BOOL include_images;
  FS_BOOL enable_matching_system_fonts;
}FSPDF2OfficeSettingData;

typedef struct _FSConvertCallback {
  void* user_data;
  FS_BOOL (*NeedToPause)(void* user_data);
  void (*ProgressNotify)(void* user_data, int converted_count, int total_count);
}FSConvertCallback;

FSErrorCode FSDK_PDF2Office_StartConvertToWord(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_word_file_path, 
                            const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDF2Office_StartConvertToWord0( FSReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, FSStreamCallback* saved_word_file_stream, 
                            const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDF2Office_StartConvertToExcel(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_excel_file_path, 
                             const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDF2Office_StartConvertToExcel0( FSReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, FSStreamCallback* saved_excel_file_stream, 
                             const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDF2Office_StartConvertToPowerPoint(const wchar_t* src_pdf_path, const wchar_t* src_pdf_password, const wchar_t* saved_ppt_file_path, 
                                  const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_PDF2Office_StartConvertToPowerPoint0( FSReaderCallback* src_pdf_reader, const wchar_t* src_pdf_password, FSStreamCallback* saved_ppt_file_stream, 
                                  const FSPDF2OfficeSettingData setting_data, FSConvertCallback* convert_callback, FS_PROGRESSIVE_HANDLE* return_value);
#ifdef __cplusplus
}
#endif
#endif
