Foxit PDF SDK

fs_reflowpage.h
Go to the documentation of this file.
1
15 #ifndef FS_REFLOWPAGE_H_
16 #define FS_REFLOWPAGE_H_
17
18 #include "common/fs_common.h"
19 //#include "pdf/fs_pdfpage.h"
20
26 namespace foxit {
30 namespace pdf {
31 class PDFPage;
32
62 class ReflowPage FS_FINAL : public Base {
63 public:
69 typedef enum _Flags {
71 e_Normal = 0x0,
73 e_WithImage = 0x1,
92 e_NoTruncate = 0x2
93 } Flags;
94
95
101 explicit ReflowPage(const PDFPage& page);
102
108 ReflowPage(const ReflowPage& other);
109
117 ReflowPage& operator = (const ReflowPage& other);
125 bool operator == (const ReflowPage& other) const ;
133 bool operator != (const ReflowPage& other) const ;
135 ~ReflowPage();
136
144 bool IsEmpty() const;
157 void SetScreenSize(float width, float height);
158
178 void SetScreenMargin(int left, int top, int right, int bottom);
179
194 void SetZoom(int zoom);
195
206 void SetParseFlags(uint32 flags);
207
217 void SetLineSpace(float line_space);
218
227 void SetImageScale(float image_scale);
228
240 void SetTopSpace(float top_space);
241
259 common::Progressive StartParse(common::PauseCallback* pause = NULL);
260
266 float GetContentWidth() const;
267
273 float GetContentHeight() const;
274
291 Matrix GetDisplayMatrix(float offset_x, float offset_y,int width, int height,common::Rotation rotate) const;
292
312 String GetFocusData(const Matrix& matrix, const PointF& point) const;
313
335 PointF GetFocusPosition(const Matrix& matrix, const char* focus_data) const;
336
343 bool IsParsed() const;
344
345 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
346 explicit ReflowPage(FS_HANDLE handle = NULL);
347 };
348 } // namespace pdf
349 } // namespace foxit
350 #endif // FS_REFLOWPAGE_H_
351
foxit::pdf::ReflowPage::GetDisplayMatrix
Matrix GetDisplayMatrix(float offset_x, float offset_y, int width, int height, common::Rotation rotate) const
Get the display matrix, according to the offset of top side between current reflow page and screen.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::ReflowPage::SetScreenMargin
void SetScreenMargin(int left, int top, int right, int bottom)
Set margin. This can be called before calling function ReflowPage::StartParse.
foxit::common::Progressive
Definition: fs_common.h:373
foxit::pdf::ReflowPage::e_NoTruncate
Parsing flag to decide whether to allow to truncate the first/last image or line of text within the s...
Definition: fs_reflowpage.h:92
foxit::pdf::ReflowPage::Flags
Flags
Enumeration for parsing flags used for a reflow page.
Definition: fs_reflowpage.h:69
fs_common.h
Header file for common definitions and classes.
foxit::pdf::ReflowPage::~ReflowPage
~ReflowPage()
Destructor.
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::ReflowPage::operator!=
bool operator!=(const ReflowPage &other) const
Not equal operator.
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::common::Rotation
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
foxit::pdf::ReflowPage::ReflowPage
ReflowPage(const PDFPage &page)
Constructor, from a parsed PDF page.
foxit::pdf::ReflowPage
Definition: fs_reflowpage.h:62
foxit::pdf::ReflowPage::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::ReflowPage::SetParseFlags
void SetParseFlags(uint32 flags)
Set the parsing flag. This can be called before calling function ReflowPage::StartParse.
foxit::pdf::ReflowPage::GetContentHeight
float GetContentHeight() const
Get content height after current reflow page object has been parsed.
IFX_Pause
Definition: fx_basic.h:3758
foxit::pdf::ReflowPage::StartParse
common::Progressive StartParse(common::PauseCallback *pause=0)
Start to parse current reflow page.
foxit::pdf::ReflowPage::GetContentWidth
float GetContentWidth() const
Get content width after current reflow page object has been parsed.
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::ReflowPage::IsParsed
bool IsParsed() const
Check if current reflow page has been parsed or not.
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::ReflowPage::GetFocusData
String GetFocusData(const Matrix &matrix, const PointF &point) const
Get focus data corresponding to a given position in device coordinate system.
foxit::pdf::ReflowPage::operator=
ReflowPage & operator=(const ReflowPage &other)
Assign operator.
foxit::pdf::ReflowPage::SetImageScale
void SetImageScale(float image_scale)
Set image scale. This can be called before calling function ReflowPage::StartParse.
foxit::pdf::ReflowPage::operator==
bool operator==(const ReflowPage &other) const
Equal operator.
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::pdf::ReflowPage::SetTopSpace
void SetTopSpace(float top_space)
Set the top space. This can be called before calling function ReflowPage::StartParse.
foxit::pdf::ReflowPage::e_Normal
Parsing flag for normal mode, without image.
Definition: fs_reflowpage.h:71
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::pdf::ReflowPage::GetFocusPosition
PointF GetFocusPosition(const Matrix &matrix, const char *focus_data) const
Get the position in device coordinate system corresponding to a given focus data.
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::ReflowPage::SetScreenSize
void SetScreenSize(float width, float height)
Set screen size. This should be called before calling functions ReflowPage::StartParse and ReflowPage...
foxit::pdf::ReflowPage::e_WithImage
Parsing flag for image mode.
Definition: fs_reflowpage.h:73
foxit::pdf::ReflowPage::SetLineSpace
void SetLineSpace(float line_space)
Set line space. This can be called before calling function ReflowPage::StartParse.
foxit::pdf::ReflowPage::SetZoom
void SetZoom(int zoom)
Set zoom factor. This can be called before calling function ReflowPage::StartParse.