Foxit PDF SDK
fs_convert.h
Go to the documentation of this file.
1 
15 #ifndef FS_CONVERT_H_
16 #define FS_CONVERT_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/fs_pdfpage.h"
21 
27 namespace foxit {
31 namespace addon {
35 namespace conversion {
37 class HTML2PDFSettingData FS_FINAL : public Object{
38  public:
44  typedef enum _HTML2PDFPageMode {
50 
53  : page_width(0)
54  , page_height(0)
55  , is_to_page_scale(false)
56  , page_margin(0.0f, 0.0f, 0.0f, 0.0f)
57  , rotate_degrees(common::e_Rotation0)
58  , is_convert_link(false)
59  , is_generate_tag(false)
61  {}
62 
82  this->page_width = page_width;
83  this->page_height = page_height;
84  this->is_to_page_scale = is_to_page_scale;
85  this->page_margin = page_margin;
86  this->is_convert_link = is_convert_link;
87  this->rotate_degrees = rotate_degrees;
88  this->is_generate_tag = is_generate_tag;
89  this->page_mode = page_mode;
90  }
91 
100  page_width = data.page_width;
101  page_height = data.page_height;
103  page_margin = data.page_margin;
107  page_mode = data.page_mode;
108  return (*this);
109  }
110 
112  float page_width;
113 
119  float page_height;
120 
123 
131 
137 
140 
143 
149 };
150 
159 class Convert FS_FINAL : public Base {
160  public:
177  static void FromHTML(const wchar_t* src_html, const wchar_t* engine_path, const wchar_t* cookies_path, const HTML2PDFSettingData& setting_data, const wchar_t* saved_pdf_path, int32 timeout);
178 
179 };
180 }
181 }
182 }
183 #endif
bool is_convert_link
Used to decide whether the web link should be coverted or not.
Definition: fs_convert.h:139
CFX_Object Object
Object type.
Definition: fs_basictypes.h:219
bool is_to_page_scale
Used to decide whether to scale the coverted PDF page or not.
Definition: fs_convert.h:122
Header file for PDF document related definitions and classes.
float page_height
The page height used for the coverted PDF document.
Definition: fs_convert.h:119
bool is_generate_tag
Used to decide whether the tag should be generated or not.
Definition: fs_convert.h:142
float page_width
The page width used for the coverted PDF document.
Definition: fs_convert.h:112
HTML2PDFSettingData()
Constructor.
Definition: fs_convert.h:52
Multiple page mode.
Definition: fs_convert.h:48
common::Rotation rotate_degrees
The rotation degree used for the coverted PDF page.Please refer to values starting from common::e_Rot...
Definition: fs_convert.h:136
static void FromHTML(const wchar_t *src_html, const wchar_t *engine_path, const wchar_t *cookies_path, const HTML2PDFSettingData &setting_data, const wchar_t *saved_pdf_path, int32 timeout)
Convert a HTML format file or a url of a Web page to a PDF file.
HTML2PDFSettingData(float page_width, float page_height, bool is_to_page_scale, RectF page_margin, bool is_convert_link, common::Rotation rotate_degrees, bool is_generate_tag, HTML2PDFPageMode page_mode)
Constructor, with parameters.
Definition: fs_convert.h:80
RectF page_margin
The page margin used for coverted PDF document.
Definition: fs_convert.h:130
HTML2PDFPageMode
Enumeration for page mode used for converting HTML to PDF.
Definition: fs_convert.h:44
HTML2PDFPageMode page_mode
The page mode used for the converting. Please refer to values starting from HTML2PDFSettingData::e_Pa...
Definition: fs_convert.h:148
Header file for common definitions and classes.
HTML2PDFSettingData & operator=(const HTML2PDFSettingData &data)
Assign operator.
Definition: fs_convert.h:99
FX_INT32 int32
32-bit signed integer.
Definition: fs_basictypes.h:196
Definition: fs_basictypes.h:375
Header file for PDF page related definitions and classes.
No rotation.
Definition: fs_common.h:277
Rotation
Enumeration for rotation.
Definition: fs_common.h:275
Foxit namespace.
Definition: fs_compare.h:27
Definition: fs_convert.h:159
Definition: fx_coordinates.h:766