Foxit PDF SDK

fs_pdfpage.h
Go to the documentation of this file.
1
15 #ifndef FS_PDFPAGE_H_
16 #define FS_PDFPAGE_H_
17
18 #include "common/fs_common.h"
19 #include "common/fs_image.h"
20 #ifndef __EMSCRIPTEN_RENDER__
21 #include "pdf/annots/fs_annot.h"
22 #endif
23 #include "pdf/graphics/fs_pdfgraphicsobject.h"
24 #include "pdf/objects/fs_pdfobject.h"
25 #ifndef __EMSCRIPTEN_RENDER__
26 #include "pdf/fs_signature.h"
27 #endif
28
34 namespace foxit {
38 namespace pdf {
39 // forward declaration
40 namespace interform {
41 class Control;
42 } // namespace interform
43 class PDFDoc;
44 //class Signature;
45
64 class GraphicsObjects : public Base {
65 public:
71 typedef enum _TextMergeOption {
73 e_TextMergeNone = 0,
77 e_TextMergeTJY = 1,
84 e_TextMergeBTET = 2
85 } TextMergeOption;
86
87 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
88 explicit GraphicsObjects(FS_HANDLE handle = NULL);
90 virtual ~GraphicsObjects();
91
97 GraphicsObjects(const GraphicsObjects& other);
98
106 GraphicsObjects& operator=(const GraphicsObjects& other);
107
115 bool IsEmpty() const;
116
124 bool operator==(const GraphicsObjects& other) const;
125
133 bool operator!=(const GraphicsObjects& other) const;
134
150 POSITION GetFirstGraphicsObjectPosition(graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
151
170 POSITION GetNextGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
171
187 POSITION GetLastGraphicsObjectPosition(graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
188
207 POSITION GetPrevGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
208
217 graphics::GraphicsObject* GetGraphicsObject(POSITION position) const;
218
235 POSITION InsertGraphicsObject(POSITION position_insert_after, graphics::GraphicsObject* graphics_object);
236
252 bool RemoveGraphicsObject(graphics::GraphicsObject* graphics_object);
253
269 bool RemoveGraphicsObjectByPosition(POSITION position);
270
285 POSITION MoveGraphicsObjectByPosition(POSITION current_position, POSITION position_move_after);
286
294 POSITION GetGraphicsObjectPosition(graphics::GraphicsObject* graphics_object);
295
302 int GetGraphicsObjectCount() const;
303
313 int GetGraphicsObjectIndex(graphics::GraphicsObject* graphics_object) const;
314
323 graphics::GraphicsObject* GetGraphicsObject(int index) const;
324
342 bool GenerateContent();
343
364 bool GenerateContent(TextMergeOption text_merge_option);
365 };
366
412 class PDFPage FS_FINAL : public GraphicsObjects {
413 public:
419 typedef enum _ParseFlags {
421 e_ParsePageNormal = 0x0000,
423 e_ParsePageTextOnly = 0x0001
424 } ParseFlags;
425
431 typedef enum _CalcMarginMode {
433 e_CalcContentsBox = 0,
435 e_CalcDetection = 1
436 } CalcMarginMode;
437
443 typedef enum _FlattenOptions {
445 e_FlattenAll = 0,
447 e_FlattenNoAnnot = 0x0001,
449 e_FlattenNoFormControl = 0x0002
450 } FlattenOptions;
451
457 typedef enum _BoxType {
462 e_MediaBox = 0,
467 e_CropBox = 1,
472 e_TrimBox = 2,
477 e_ArtBox = 3,
482 e_BleedBox = 4
483 } BoxType;
484
490 typedef enum _Size {
492 e_SizeLetter = 1,
494 e_SizeLegal = 2,
496 e_SizeA2 = 3,
498 e_SizeA3 = 4,
500 e_SizeA4 = 5,
502 e_SizeA5 = 6,
504 e_SizeA6 = 7,
506 e_SizeB2 = 8,
508 e_SizeB3 = 9,
510 e_SizeB4 = 10,
512 e_SizeB5 = 11,
514 e_SizeB6 = 12
515 } Size;
516
517
526 PDFPage(const PDFDoc& document, objects::PDFDictionary* page_dict);
527
528 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
529 explicit PDFPage(FS_HANDLE handle = NULL);
530
536 explicit PDFPage(const foxit::pdf::GraphicsObjects& other);
537
539 ~PDFPage();
540
546 PDFDoc GetDocument() const;
547
553 objects::PDFDictionary* GetDict() const;
554
561 bool IsParsed() const;
562
590 common::Progressive StartParse(uint32 flags = PDFPage::e_ParsePageNormal, common::PauseCallback* pause = NULL,
591 bool is_reparse = false);
592
598 int GetIndex() const;
599
605 float GetHeight() const;
606
612 float GetWidth() const;
613
620 common::Rotation GetRotation() const;
621
628 common::Bitmap LoadThumbnail();
629
643 Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate);
644
660 RectF CalcContentBBox(CalcMarginMode mode);
661
662 #ifndef __EMSCRIPTEN_RENDER__
663
668 int GetAnnotCount();
669
678 annots::Annot GetAnnot(int index);
679
695 annots::Annot GetAnnotAtPoint(const PointF& position, float tolerance);
696
716 annots::Annot GetAnnotAtDevicePoint(const PointF& position, float tolerance, const Matrix* matrix = NULL);
717
736 annots::AnnotArray GetAnnotsAtPoint(const PointF& position, float tolerance);
737
760 annots::AnnotArray GetAnnotsAtDevicePoint(const PointF& position, float tolerance, const Matrix* matrix = NULL);
761
811 annots::Annot AddAnnot(annots::Annot::Type type, const RectF& rect);
812
820 annots::Annot AddAnnot(objects::PDFDictionary* annot_dict);
821
836 bool RemoveAnnot(const annots::Annot& annot);
837
853 void MoveAnnotToFirst(const annots::Annot& annot);
854
870 void MoveAnnotToLast(const annots::Annot& annot);
871
887 void MoveAnnotToPrev(const annots::Annot& annot);
888
904 void MoveAnnotToNext(const annots::Annot& annot);
905
914 void UpdateAnnotList();
915 #endif
916
924 bool HasTransparency();
925
934 bool IsScanned();
935
969 bool Flatten(bool for_display, uint32 options = PDFPage::e_FlattenAll);
970
971 #ifndef __EMSCRIPTEN_RENDER__
972
981 bool FlattenAnnot(annots::Annot annot);
982
1008 bool SetAnnotGroup(const annots::MarkupArray& annot_array, int header_index);
1009
1024 foxit::pdf::Signature AddSignature(const foxit::RectF& rect);
1025
1041 foxit::pdf::Signature AddSignature(const foxit::RectF& rect, const foxit::WString& field_name);
1042
1068 foxit::pdf::Signature AddSignature(const foxit::RectF& rect, const foxit::WString& field_name, foxit::pdf::Signature::SignatureType signature_type, bool to_check_permission = true);
1069
1098 foxit::pdf::Signature AddSignatureWithExistedVDict(const foxit::RectF& rect, const foxit::WString& field_name, foxit::pdf::Signature::SignatureType signature_type, bool to_check_permission, const foxit::pdf::Signature& existed_signature);
1099 #endif
1100
1109 bool HasWatermark();
1110
1118 bool RemoveAllWatermarks();
1119
1128 void SetRotation(common::Rotation rotate);
1129
1144 void SetSize(float width, float height);
1159 void SetSize(foxit::pdf::PDFPage::Size size);
1160
1170 void SetBox(BoxType box_type, const RectF& box);
1171
1180 RectF GetBox(BoxType box_type);
1181
1190 float GetUserUnitSize() const;
1191
1203 void SetUserUnitSize(float user_unit);
1204
1220 bool Transform(const Matrix& matrix, bool need_transform_clip_path, bool need_transform_annotations = false);
1221
1231 bool Normalize();
1232
1243 void SetClipRect(const RectF& clip_rect);
1244
1257 void SetThumbnail(const common::Bitmap& thumbnail);
1258
1272 graphics::GraphicsObject* GetGraphicsObjectAtPoint(const PointF& point, float tolerance,
1273 graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
1274
1288 graphics::GraphicsObjectArray GetGraphicsObjectsAtPoint(const PointF& point, float tolerance,
1289 graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll);
1290
1307 graphics::GraphicsObject* GetGraphicsObjectAtDevicePoint(const PointF& point, float tolerance,const Matrix* matrix ,
1308 graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
1309
1326 graphics::GraphicsObjectArray GetGraphicsObjectsAtDevicePoint(const PointF& point, float tolerance,const Matrix* matrix,
1327 graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll);
1328
1342 graphics::GraphicsObject* GetGraphicsObjectAtRectangle(const RectF& rect, graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll) const;
1343
1356 graphics::GraphicsObjectArray GetGraphicsObjectsAtRectangle(const RectF& rect, graphics::GraphicsObject::Type filter = graphics::GraphicsObject::e_TypeAll);
1357
1382 bool AddImage(const common::Image& image, int frame_index, const PointF& position, float width, float height,
1383 bool auto_generate_content = true);
1384
1405 bool AddImageFromFilePath(const char* file_path, const PointF& position, float width, float height,
1406 bool auto_generate_content = true);
1407
1428 bool AddImageFromFilePath(const wchar_t* file_path, const PointF& position, float width, float height,
1429 bool auto_generate_content = true);
1430
1439 objects::PDFArray* GetAnnots() const;
1440
1449 objects::PDFDictionary* GetResources() const;
1450
1460 objects::PDFObject* GetContents() const;
1461
1470 objects::PDFStream* GetThumb() const;
1471
1483 objects::PDFObject* GetInheritedAttribute(const char* attruibute_name) const;
1484
1490 void ClearRenderCache();
1491
1508 RectF GetSuggestedRect(const common::Bitmap& render_result, const Matrix& render_matrix, const PointF& point) const;
1529 bool AddText(const wchar_t* text, const foxit::RectF& rect, const foxit::pdf::RichTextStyle& style, const Matrix& matrix = Matrix(), bool is_each_text = false,bool disable_embed_font = false);
1530
1550 RectF AddText(const wchar_t* text, const foxit::RectF& rect, const foxit::pdf::RichTextStyle& style, int rotation, common::RotationPointOptions rotate_point = common::e_RotationPointCenter, bool disable_embed_font = false);
1551
1567 RectF CalculateNewRectForText(const wchar_t* text, const foxit::RectF& rect, const foxit::pdf::RichTextStyle& style, int rotation, common::RotationPointOptions rotate_point = common::e_RotationPointCenter, bool disable_embed_font = false);
1568
1596 graphics::TextObjectArray SplitTextsInRectangle(RectF rect, int split_step);
1597
1598 };
1599 } // namespace pdf
1600 } // namespace foxit
1601 #endif // FS_PDFPAGE_H_
1602
foxit::pdf::PDFPage::GetDisplayMatrix
Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate)
Get the display matrix of PDF page, from PDF coordinate system to targeted device coordinate system.
foxit::pdf::PDFPage::PDFPage
PDFPage(const PDFDoc &document, objects::PDFDictionary *page_dict)
Constructor, from a PDF dictionary which represents a PDF page and the PDF document which contains th...
foxit::pdf::PDFPage::RemoveAnnot
bool RemoveAnnot(const annots::Annot &annot)
Remove an annotation.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
fs_signature.h
Header file for PDF siganture related definitions and classes.
foxit::pdf::objects::PDFArray
Definition: fs_pdfobject.h:640
foxit::pdf::PDFPage::e_CropBox
Crop Box for page boundary.
Definition: fs_pdfpage.h:467
foxit::pdf::PDFPage::RemoveAllWatermarks
bool RemoveAllWatermarks()
Remove all watermarks.
foxit::pdf::PDFPage::GetAnnotsAtDevicePoint
annots::AnnotArray GetAnnotsAtDevicePoint(const PointF &position, float tolerance, const Matrix *matrix=0)
Get all the annotations at a specified position, in device coordinate system.
foxit::pdf::GraphicsObjects::GetFirstGraphicsObjectPosition
POSITION GetFirstGraphicsObjectPosition(graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the position of first graphics object in graphics object list, based on type filter.
foxit::pdf::PDFPage::MoveAnnotToLast
void MoveAnnotToLast(const annots::Annot &annot)
Change specified annotation to be the last one of all annotations.
foxit::pdf::annots::Annot
Definition: fs_annot.h:1006
foxit::pdf::PDFPage::e_CalcDetection
Calculate margin by detecting paths or images.
Definition: fs_pdfpage.h:435
foxit::pdf::PDFPage::GetBox
RectF GetBox(BoxType box_type)
Get page box.
foxit::pdf::PDFPage::e_BleedBox
Bleed Box for page boundary.
Definition: fs_pdfpage.h:482
foxit::pdf::PDFPage::Size
Size
Enumeration for page size type.
Definition: fs_pdfpage.h:490
foxit::common::Progressive
Definition: fs_common.h:373
foxit::pdf::PDFPage::FlattenAnnot
bool FlattenAnnot(annots::Annot annot)
Flatten an annotation: the annotation is made to be a part of the page contents and be removed then.
foxit::POSITION
FX_POSITION POSITION
A value used to denote the position of an element in a collection.
Definition: fs_basictypes.h:205
foxit::pdf::PDFPage::GetGraphicsObjectsAtRectangle
graphics::GraphicsObjectArray GetGraphicsObjectsAtRectangle(const RectF &rect, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
Get all the graphics objects whose rectangles intersect with a specified rectangle,...
foxit::pdf::PDFPage::e_SizeB2
Page size: B2.
Definition: fs_pdfpage.h:506
foxit::pdf::PDFPage::AddText
bool AddText(const wchar_t *text, const foxit::RectF &rect, const foxit::pdf::RichTextStyle &style, const Matrix &matrix=Matrix(), bool is_each_text=false, bool disable_embed_font=false)
Add text to current page.
foxit::pdf::graphics::GraphicsObject::Type
Type
Enumeration for PDF graphics object type.
Definition: fs_pdfgraphicsobject.h:378
foxit::pdf::GraphicsObjects::RemoveGraphicsObjectByPosition
bool RemoveGraphicsObjectByPosition(POSITION position)
Remove a graphics object by position.
foxit::pdf::PDFPage::e_ArtBox
Art Box for page boundary.
Definition: fs_pdfpage.h:477
foxit::pdf::GraphicsObjects::MoveGraphicsObjectByPosition
POSITION MoveGraphicsObjectByPosition(POSITION current_position, POSITION position_move_after)
Move a graphics object from a position to another position.
foxit::pdf::PDFPage::GetHeight
float GetHeight() const
Get the page height (unit is 1/72 inch).
foxit::pdf::GraphicsObjects::RemoveGraphicsObject
bool RemoveGraphicsObject(graphics::GraphicsObject *graphics_object)
Remove a graphics object.
foxit::pdf::GraphicsObjects::operator==
bool operator==(const GraphicsObjects &other) const
Equal operator.
foxit::pdf::PDFPage::e_SizeA5
Page size: A5.
Definition: fs_pdfpage.h:502
fs_common.h
Header file for common definitions and classes.
foxit::pdf::PDFPage::e_SizeLegal
Page size: legal.
Definition: fs_pdfpage.h:494
foxit::pdf::PDFPage::HasWatermark
bool HasWatermark()
Check whether the current page has any watermark (not including Foxit PDF SDK trial watermark).
CFX_ArrayTemplate
Definition: fx_basic.h:1297
foxit::pdf::PDFPage::GetAnnotCount
int GetAnnotCount()
Get the count of annotations.
foxit::pdf::PDFPage::e_TrimBox
Trim Box for page boundary.
Definition: fs_pdfpage.h:472
foxit::pdf::PDFPage::SetUserUnitSize
void SetUserUnitSize(float user_unit)
Set the user unit.
foxit::pdf::PDFPage::GetDocument
PDFDoc GetDocument() const
Get the PDF document, to which current PDF page belongs.
foxit::pdf::PDFPage::MoveAnnotToNext
void MoveAnnotToNext(const annots::Annot &annot)
Exchange the indexes of current annotation and its next annotation.
foxit::pdf::GraphicsObjects::GetGraphicsObjectIndex
int GetGraphicsObjectIndex(graphics::GraphicsObject *graphics_object) const
Get the index of a specified graphics object in graphics object list.
foxit::pdf::PDFPage::AddAnnot
annots::Annot AddAnnot(annots::Annot::Type type, const RectF &rect)
Add an annotation to current PDF page.
foxit::pdf::PDFPage::e_FlattenNoAnnot
Flatten a PDF page without annotations.
Definition: fs_pdfpage.h:447
foxit::pdf::PDFPage::GetAnnotsAtPoint
annots::AnnotArray GetAnnotsAtPoint(const PointF &position, float tolerance)
Get all the annotations at a specified position, in PDF coordinate system.
foxit::pdf::GraphicsObjects::e_TextMergeBTET
Merge consecutive BTETs as a new one.
Definition: fs_pdfpage.h:84
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::PDFPage::GetResources
objects::PDFDictionary * GetResources() const
Get the PDF dictionary of "Resources".
foxit::pdf::PDFPage::CalculateNewRectForText
RectF CalculateNewRectForText(const wchar_t *text, const foxit::RectF &rect, const foxit::pdf::RichTextStyle &style, int rotation, common::RotationPointOptions rotate_point=common::e_RotationPointCenter, bool disable_embed_font=false)
Calculate the new text rectangle.
foxit::pdf::PDFPage::SetAnnotGroup
bool SetAnnotGroup(const annots::MarkupArray &annot_array, int header_index)
Group all the input markup annotations together.
foxit::pdf::PDFPage::ClearRenderCache
void ClearRenderCache()
Clear render cache.
foxit::pdf::PDFPage::e_SizeB4
Page size: B4.
Definition: fs_pdfpage.h:510
foxit::pdf::PDFPage::~PDFPage
~PDFPage()
Destructor.
foxit::pdf::GraphicsObjects::GetGraphicsObjectPosition
POSITION GetGraphicsObjectPosition(graphics::GraphicsObject *graphics_object)
Get the position of the specified graphics object.
foxit::pdf::PDFPage::HasTransparency
bool HasTransparency()
Check whether current PDF page has transparency or not.
foxit::pdf::PDFPage::IsParsed
bool IsParsed() const
Check if current page has been parsed or not.
foxit::pdf::PDFPage::GetGraphicsObjectsAtPoint
graphics::GraphicsObjectArray GetGraphicsObjectsAtPoint(const PointF &point, float tolerance, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
Get all the graphics objects in specified point, with specified type filter.
foxit::pdf::PDFPage::GetInheritedAttribute
objects::PDFObject * GetInheritedAttribute(const char *attruibute_name) const
Get the PDF object for specified attribute which may be inherited from the ancestor node in the page ...
foxit::pdf::RichTextStyle
Definition: fs_annot.h:210
foxit::pdf::GraphicsObjects::GetLastGraphicsObjectPosition
POSITION GetLastGraphicsObjectPosition(graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the position of last graphics object in graphics object list, based on type filter.
foxit::pdf::PDFPage::GetWidth
float GetWidth() const
Get the page width (unit is 1/72 inch).
foxit::pdf::PDFPage::ParseFlags
ParseFlags
Enumeration for parsing flags used for PDF page.
Definition: fs_pdfpage.h:419
foxit::pdf::GraphicsObjects::operator=
GraphicsObjects & operator=(const GraphicsObjects &other)
Assign operator.
foxit::pdf::PDFPage::GetAnnot
annots::Annot GetAnnot(int index)
Get an annotation by index.
foxit::pdf::GraphicsObjects::e_TextMergeTJY
Merge consecutive text-showing operators with equal y coordinates.
Definition: fs_pdfpage.h:77
foxit::pdf::annots::AnnotArray
Definition: fs_annot.h:1666
foxit::pdf::PDFPage::e_MediaBox
Media Box for page boundary.
Definition: fs_pdfpage.h:462
foxit::pdf::GraphicsObjects::TextMergeOption
TextMergeOption
Enumeration for text merge.
Definition: fs_pdfpage.h:71
foxit::pdf::PDFPage::MoveAnnotToFirst
void MoveAnnotToFirst(const annots::Annot &annot)
Change specified annotation to be the first one of all annotations.
foxit::pdf::PDFPage::GetThumb
objects::PDFStream * GetThumb() const
Get the PDF stream of "Thumb".
foxit::pdf::PDFPage::AddImage
bool AddImage(const common::Image &image, int frame_index, const PointF &position, float width, float height, bool auto_generate_content=true)
Add an image to current page.
foxit::pdf::PDFPage::StartParse
common::Progressive StartParse(uint32 flags=PDFPage::e_ParsePageNormal, common::PauseCallback *pause=0, bool is_reparse=false)
Start to parse current page.
foxit::pdf::PDFPage::GetGraphicsObjectAtDevicePoint
graphics::GraphicsObject * GetGraphicsObjectAtDevicePoint(const PointF &point, float tolerance, const Matrix *matrix, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the topmost graphics object in specified point in device coordinate system, with specified type f...
foxit::pdf::GraphicsObjects::InsertGraphicsObject
POSITION InsertGraphicsObject(POSITION position_insert_after, graphics::GraphicsObject *graphics_object)
Insert a graphics object after the specified position.
foxit::pdf::PDFPage::e_SizeB6
Page size: B6.
Definition: fs_pdfpage.h:514
foxit::pdf::Signature
Definition: fs_signature.h:99
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::pdf::PDFPage::GetAnnotAtDevicePoint
annots::Annot GetAnnotAtDevicePoint(const PointF &position, float tolerance, const Matrix *matrix=0)
Get the annotation at a specified position, in device coordinate system.
foxit::common::Rotation
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
foxit::pdf::graphics::GraphicsObject
Definition: fs_pdfgraphicsobject.h:241
foxit::common::e_RotationPointCenter
Rotate the text block based on the center point.
Definition: fs_common.h:78
foxit::pdf::Signature::SignatureType
SignatureType
Enumeration for signature type.
Definition: fs_signature.h:251
foxit::pdf::PDFPage::e_CalcContentsBox
Calculate margin according to bounding box of all contents.
Definition: fs_pdfpage.h:433
foxit::pdf::PDFPage::FlattenOptions
FlattenOptions
Enumeration for flatten options.
Definition: fs_pdfpage.h:443
foxit::pdf::PDFPage::GetGraphicsObjectsAtDevicePoint
graphics::GraphicsObjectArray GetGraphicsObjectsAtDevicePoint(const PointF &point, float tolerance, const Matrix *matrix, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
Get all the graphics objects in specified point in device coordinate system, with specified type filt...
fs_pdfobject.h
Header file for PDF object related definitions and classes.
foxit::pdf::PDFPage::e_SizeB3
Page size: B3.
Definition: fs_pdfpage.h:508
foxit::pdf::graphics::GraphicsObject::e_TypeAll
Represents all graphics object types, only used as filter.
Definition: fs_pdfgraphicsobject.h:380
foxit::pdf::PDFPage::IsScanned
bool IsScanned()
Check whether current PDF page is scanned page or not.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::PDFPage::e_ParsePageTextOnly
Parsing flag for text-only mode.
Definition: fs_pdfpage.h:423
foxit::pdf::PDFPage::e_FlattenNoFormControl
Flatten a PDF page without form controls.
Definition: fs_pdfpage.h:449
foxit::pdf::PDFPage::e_SizeA4
Page size: A4.
Definition: fs_pdfpage.h:500
foxit::pdf::PDFPage::Flatten
bool Flatten(bool for_display, uint32 options=PDFPage::e_FlattenAll)
Flatten current PDF page: annotations or form fields may be made to be a part of the page contents ac...
foxit::pdf::PDFPage::MoveAnnotToPrev
void MoveAnnotToPrev(const annots::Annot &annot)
Exchange the indexes of current annotation and its previous annotation.
foxit::pdf::PDFPage::SplitTextsInRectangle
graphics::TextObjectArray SplitTextsInRectangle(RectF rect, int split_step)
Split text objects whose rectangles (in PDF coordinate system) intersect with a specified rectangle (...
foxit::pdf::GraphicsObjects::GetGraphicsObject
graphics::GraphicsObject * GetGraphicsObject(POSITION position) const
Get the graphics object by position in graphics object list.
foxit::pdf::GraphicsObjects::e_TextMergeNone
No text merge.
Definition: fs_pdfpage.h:73
IFX_Pause
Definition: fx_basic.h:3758
fs_image.h
Header file for image and bitmap related definitions and classes.
foxit::pdf::PDFPage::GetSuggestedRect
RectF GetSuggestedRect(const common::Bitmap &render_result, const Matrix &render_matrix, const PointF &point) const
Get the suggested rectangle (in PDF coordinate system) for a point (in PDF coordinate system) based o...
foxit::pdf::PDFPage::GetIndex
int GetIndex() const
Get page index.
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:850
foxit::pdf::PDFPage::GetContents
objects::PDFObject * GetContents() const
Get the PDF object of "Contents".
foxit::pdf::PDFPage::SetRotation
void SetRotation(common::Rotation rotate)
Set page rotation.
foxit::pdf::PDFPage::e_SizeA6
Page size: A6.
Definition: fs_pdfpage.h:504
foxit::pdf::GraphicsObjects::operator!=
bool operator!=(const GraphicsObjects &other) const
Not equal operator.
foxit::pdf::GraphicsObjects::GetGraphicsObjectCount
int GetGraphicsObjectCount() const
Get the count of graphics objects in graphics object list.
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::PDFPage::GetAnnots
objects::PDFArray * GetAnnots() const
Get the PDF array of "Annots".
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::PDFPage::GetGraphicsObjectAtRectangle
graphics::GraphicsObject * GetGraphicsObjectAtRectangle(const RectF &rect, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the topmost graphics object whose rectangle interasects with a specified rectangle,...
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::PDFPage::e_FlattenAll
Flatten all contents of a PDF page.
Definition: fs_pdfpage.h:445
foxit::common::Image
Definition: fs_image.h:459
foxit::pdf::PDFPage::GetAnnotAtPoint
annots::Annot GetAnnotAtPoint(const PointF &position, float tolerance)
Get the annotation at a specified position, in PDF coordinate system.
fs_pdfgraphicsobject.h
Header file for PDF graphics object related definitions and classes.
foxit::pdf::annots::MarkupArray
Definition: fs_annot.h:1879
foxit::pdf::annots::Annot::Type
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:1013
foxit::pdf::PDFPage::GetUserUnitSize
float GetUserUnitSize() const
Get the user unit.
foxit::pdf::PDFPage::SetThumbnail
void SetThumbnail(const common::Bitmap &thumbnail)
Set page thumbnail.
foxit::pdf::PDFPage::AddSignatureWithExistedVDict
foxit::pdf::Signature AddSignatureWithExistedVDict(const foxit::RectF &rect, const foxit::WString &field_name, foxit::pdf::Signature::SignatureType signature_type, bool to_check_permission, const foxit::pdf::Signature &existed_signature)
Add a signature to PDF page with the existed "V" dictionary in the specific signature.
foxit::pdf::PDFPage::CalcContentBBox
RectF CalcContentBBox(CalcMarginMode mode)
Calculate the content area of PDF page.
foxit::pdf::PDFPage::AddSignature
foxit::pdf::Signature AddSignature(const foxit::RectF &rect)
Add an ordinary signature to PDF page.
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::pdf::PDFPage::SetSize
void SetSize(float width, float height)
Set page width and height.
foxit::common::RotationPointOptions
RotationPointOptions
Enumeration for rotation point options.
Definition: fs_common.h:76
fs_annot.h
Header file for annotation related definitions and classes.
foxit::pdf::GraphicsObjects::GetPrevGraphicsObjectPosition
POSITION GetPrevGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the position of previous graphics object in graphics object list, based on type filter and specif...
foxit::pdf::PDFPage::SetBox
void SetBox(BoxType box_type, const RectF &box)
Set page box.
foxit::pdf::GraphicsObjects::GetNextGraphicsObjectPosition
POSITION GetNextGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the position of next graphics object in graphics object list, based on type filter and specified ...
foxit::pdf::objects::PDFStream
Definition: fs_pdfobject.h:448
foxit::pdf::PDFPage::CalcMarginMode
CalcMarginMode
Enumeration for calculating margin mode.
Definition: fs_pdfpage.h:431
foxit::pdf::PDFPage::UpdateAnnotList
void UpdateAnnotList()
Update the annotation list.
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::pdf::PDFPage::e_SizeB5
Page size: B5.
Definition: fs_pdfpage.h:512
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::GraphicsObjects::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::PDFPage::e_SizeA2
Page size: A2.
Definition: fs_pdfpage.h:496
foxit::pdf::PDFPage::GetGraphicsObjectAtPoint
graphics::GraphicsObject * GetGraphicsObjectAtPoint(const PointF &point, float tolerance, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
Get the topmost graphics object in specified point, with specified type filter.
foxit::pdf::PDFPage::SetClipRect
void SetClipRect(const RectF &clip_rect)
Set clip rectangle for all graphics objects on current PDF page.
foxit::pdf::PDFPage::AddImageFromFilePath
bool AddImageFromFilePath(const char *file_path, const PointF &position, float width, float height, bool auto_generate_content=true)
Add an image to current page from file path.
foxit::pdf::PDFPage::GetRotation
common::Rotation GetRotation() const
Get the page rotation.
foxit::pdf::PDFPage::BoxType
BoxType
Enumeration for page box type.
Definition: fs_pdfpage.h:457
foxit::pdf::PDFPage::GetDict
objects::PDFDictionary * GetDict() const
Get the page dictionary.
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::Matrix
CFX_Matrix Matrix
Matrix information, in float.
Definition: fs_basictypes.h:469
foxit::pdf::PDFPage::e_ParsePageNormal
Parsing flag for normal mode, which means to parse all the contents in a PDF page.
Definition: fs_pdfpage.h:421
foxit::pdf::PDFPage::Transform
bool Transform(const Matrix &matrix, bool need_transform_clip_path, bool need_transform_annotations=false)
Transform a PDF page, including annotations and form fields on the page.
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::PDFPage::e_SizeLetter
Page size: letter.
Definition: fs_pdfpage.h:492
foxit::pdf::PDFPage::Normalize
bool Normalize()
Transform current PDF page by undoing any rotation and removing the offset to the page's "CropBox".
foxit::pdf::GraphicsObjects::~GraphicsObjects
virtual ~GraphicsObjects()
Destructor.
foxit::pdf::GraphicsObjects
Definition: fs_pdfpage.h:64
foxit::pdf::GraphicsObjects::GenerateContent
bool GenerateContent()
Generate contents of current graphics objects.
foxit::pdf::PDFPage::e_SizeA3
Page size: A3.
Definition: fs_pdfpage.h:498
foxit::pdf::PDFPage::LoadThumbnail
common::Bitmap LoadThumbnail()
Load the thumbnail bitmap.