Foxit PDF Conversion SDK
fs_pdf2md.h
Go to the documentation of this file.
1 
18 #ifndef FS_PDF2MD_H_
19 #define FS_PDF2MD_H_
20 
21 #include "common/fs_common.h"
22 
28 namespace foxit {
29  using namespace common;
30 
31 namespace conversion {
35 namespace pdf2md {
37 class PDF2MdSettingData FS_FINAL : public Object {
38  public:
44  typedef enum _TableFormat {
46  e_TableFormatMarkdown = 0,
48  e_TableFormatHTML = 1
49  } TableFormat;
50 
51 
54  : table_format(e_TableFormatMarkdown)
55  , include_header_footer(false)
56  , enable_italic(true)
57  , enable_bold(false)
58  , skip_ocr_pages(false) {}
59 
69  PDF2MdSettingData(TableFormat table_format, bool include_header_footer, bool enable_italic, bool enable_bold, bool skip_ocr_pages = false) {
70  this->table_format = table_format;
71  this->include_header_footer = include_header_footer;
72  this->enable_italic = enable_italic;
73  this->enable_bold = enable_bold;
74  this->skip_ocr_pages = skip_ocr_pages;
75  }
76 
85  table_format = data.table_format;
86  include_header_footer = data.include_header_footer;
87  enable_italic = data.enable_italic;
88  enable_bold = data.enable_bold;
89  skip_ocr_pages = data.skip_ocr_pages;
90  return (*this);
91  }
92 
116 };
117 
121 class PDF2Md FS_FINAL : public Base {
122  public:
139  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 = NULL, const PDF2MdSettingData& setting_data = PDF2MdSettingData());
140 };
141 
142 } // namespace pdf2md
143 } // namespace conversion
144 } // namespace foxit
145 
146 #endif // FS_PDF2MD_H
bool enable_bold
Whether to preserve bold formatting from the original PDF. When true, text that is bold in the PDF wi...
Definition: fs_pdf2md.h:108
CFX_Object Object
Object type.
Definition: fs_basictypes.h:145
bool enable_italic
Whether to preserve italic formatting from the original PDF. When true (default), text that is italic...
Definition: fs_pdf2md.h:102
PDF2MdSettingData(TableFormat table_format, bool include_header_footer, bool enable_italic, bool enable_bold, bool skip_ocr_pages=false)
Constructor, with parameters.
Definition: fs_pdf2md.h:69
bool include_header_footer
Whether to include page header/footer (artifact) content. Default: false.
Definition: fs_pdf2md.h:96
TableFormat table_format
Table output format. Default value: e_TableFormatMarkdown.
Definition: fs_pdf2md.h:94
PDF2MdSettingData()
Constructor.
Definition: fs_pdf2md.h:53
Definition: fs_pdf2md.h:121
bool skip_ocr_pages
Whether to silently skip pages that contain only path/image objects (scan-only pages that would norma...
Definition: fs_pdf2md.h:115
TableFormat
Enumeration for table output format in Markdown conversion.
Definition: fs_pdf2md.h:44
PDF2MdSettingData & operator=(const PDF2MdSettingData &data)
Assign operator.
Definition: fs_pdf2md.h:84
Header file for common definitions and classes.
Definition: fs_basictypes.h:238
Foxit namespace.
Definition: fs_basictypes.h:124
#define NULL
The null-pointer value.
Definition: fx_system.h:793