Foxit PDF SDK
fs_pdf2md.h
浏览该文件的文档.
1 
14 #ifndef FS_PDF2MD_H_
15 #define FS_PDF2MD_H_
16 #if defined(_WIN32) || defined(_WIN64) || (defined(__linux__) && !defined(__ANDROID__))
17 #include "common/fs_common.h"
18 
19 namespace foxit {
20 namespace addon {
21 namespace conversion {
22 namespace pdf2md {
24 class PDF2MdSettingData FS_FINAL : public Object {
25  public:
31  typedef enum _TableFormat {
36  } TableFormat;
37 
38 
42  , include_header_footer(false)
43  , enable_italic(true)
44  , enable_bold(false)
45  , skip_ocr_pages(false) {}
46 
57  bool enable_italic, bool enable_bold, bool skip_ocr_pages = false) {
58  this->table_format = table_format;
59  this->include_header_footer = include_header_footer;
60  this->enable_italic = enable_italic;
61  this->enable_bold = enable_bold;
63  }
64 
76  enable_bold = data.enable_bold;
78  return *this;
79  }
80 
93  bool enable_italic, bool enable_bold, bool skip_ocr_pages = false) {
94  this->table_format = table_format;
95  this->include_header_footer = include_header_footer;
96  this->enable_italic = enable_italic;
97  this->enable_bold = enable_bold;
99  }
100 
136 };
137 
144 class PDF2Md FS_FINAL : public Object {
145  public:
160  static void Initialize(const wchar_t* library_path);
161 
170  static void Release();
171 
179  static String GetVersion();
180 
198  static bool ConvertToMarkdown(const wchar_t* src_pdf_file_path, const wchar_t* src_file_password,
199  const wchar_t* saved_md_path, const wchar_t* saved_image_dir_name = NULL,
200  const PDF2MdSettingData& setting_data = PDF2MdSettingData());
201 };
202 
203 } // namespace pdf2md
204 } // namespace conversion
205 } // namespace addon
206 } // namespace foxit
207 
208 #endif // #if defined(_WIN32) || defined(_WIN64) || (defined(__linux__) && !defined(__ANDROID__))
209 #endif // FS_PDF2MD_H_
static bool ConvertToMarkdown(const wchar_t *src_pdf_file_path, const wchar_t *src_file_password, const wchar_t *saved_md_path, const wchar_t *saved_image_dir_name=0, const PDF2MdSettingData &setting_data=PDF2MdSettingData())
将PDF格式文件转换为Markdown文件。
表格格式:HTML表格标签。
Definition: fs_pdf2md.h:35
bool include_header_footer
是否包含页眉/页脚(artifact)内容。默认值:false。
Definition: fs_pdf2md.h:114
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
bool enable_italic
是否保留原始PDF中的斜体格式。默认值:true。
Definition: fs_pdf2md.h:121
表格格式:Markdown管道语法(默认)。
Definition: fs_pdf2md.h:33
TableFormat
Markdown转换中表格输出格式的枚举。
Definition: fs_pdf2md.h:31
TableFormat table_format
表格输出格式。默认值: e_TableFormatMarkdown 。
Definition: fs_pdf2md.h:107
PDF2MdSettingData(TableFormat table_format, bool include_header_footer, bool enable_italic, bool enable_bold, bool skip_ocr_pages=false)
带参数的构造函数。
Definition: fs_pdf2md.h:56
void Set(TableFormat table_format, bool include_header_footer, bool enable_italic, bool enable_bold, bool skip_ocr_pages=false)
设置值。
Definition: fs_pdf2md.h:92
static void Release()
释放PDF2Md模块并卸载Foxit PDF Conversion SDK库。
bool enable_bold
是否保留原始PDF中的粗体格式。默认值:false。
Definition: fs_pdf2md.h:128
Definition: fs_pdf2md.h:144
通用定义和类的头文件。
PDF2MdSettingData()
构造函数。
Definition: fs_pdf2md.h:40
static String GetVersion()
获取Foxit PDF Conversion SDK的版本号。
Foxit 命名空间。
Definition: fs_accessibility.h:28
字节字符串类
Definition: fx_string.h:317
bool skip_ocr_pages
是否静默跳过仅含路径/图像对象的页面。默认值:false。
Definition: fs_pdf2md.h:135
static void Initialize(const wchar_t *library_path)
通过加载Foxit PDF Conversion SDK库来初始化PDF2Md模块。
#define NULL
空指针值。
Definition: fx_system.h:792
PDF2MdSettingData & operator=(const PDF2MdSettingData &data)
赋值操作符。
Definition: fs_pdf2md.h:72