Foxit PDF SDK

fs_annotationsummary.h
Go to the documentation of this file.
1
15 #ifndef FS_ANNOTATIONSUMMARY_H_
16 #define FS_ANNOTATIONSUMMARY_H_
17
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20
26 namespace foxit {
30 namespace pdf {
37 class AnnotationSummaryCallback {
38 public:
44 typedef enum _AnnotationSummaryStringID {
49 e_AnnotationSummaryStringIDAuthor = 0,
54 e_AnnotationSummaryStringIDDate = 1,
59 e_AnnotationSummaryStringIDPage = 2,
64 e_AnnotationSummaryStringIDType = 3,
66 e_AnnotationSummaryStringIDDocumentTitle = 4,
70 e_AnnotationSummaryStringIDPageTitle = 5,
75 e_AnnotationSummaryStringIDNoAnnotations = 6,
80 e_AnnotationSummaryStringIDNumber = 7,
85 e_AnnotationSummaryStringIDSubject = 8
86 } AnnotationSummaryStringID;
87
88
94 virtual void Release() = 0;
95
105 virtual common::LocaleID GetCurrentLocaleID() = 0;
106
115 virtual WString GetLocalFontName() = 0;
116
133 virtual WString LoadString(AnnotationSummaryStringID id) = 0;
134
135 protected:
136 ~AnnotationSummaryCallback() {}
137 };
138
144 class AnnotationSummarySettings FS_FINAL : public Base {
145 public:
151 typedef enum _SummaryLayout {
153 e_SummaryLayoutSeparatePagesWithLine = 0,
155 e_SummaryLayoutSinglePageWithLine = 1,
157 e_SummaryLayoutAnnotationOnly = 2,
159 e_SummaryLayoutSeparatePagesWithSequenceNumber = 3,
161 e_SummaryLayoutSinglePageWithSequenceNumber = 4
162 } SummaryLayout;
163
169 typedef enum _SortType {
171 e_TypeSortByAuthor = 0,
173 e_TypeSortByDate = 1,
175 e_TypeSortByPage = 2,
177 e_TypeSortByAnnotationType = 3
178 } SortType;
179
185 typedef enum _FontSizeType {
187 e_FontSizeSmall = 0,
189 e_FontSizeMedium = 1,
191 e_FontSizeLarge = 2
192 } FontSizeType;
193
194
198 AnnotationSummarySettings();
199
200 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
201 explicit AnnotationSummarySettings(FS_HANDLE handle);
202
204 ~AnnotationSummarySettings();
205
211 AnnotationSummarySettings(const AnnotationSummarySettings& other);
212
220 AnnotationSummarySettings& operator=(const AnnotationSummarySettings& other);
221
229 bool operator==(const AnnotationSummarySettings& other) const;
230
238 bool operator!=(const AnnotationSummarySettings& other) const;
239
247 bool IsEmpty() const;
248
262 void SetSummaryLayout(SummaryLayout type);
263
277 void SetSortType(SortType type);
278
292 void SetFontSize(FontSizeType type);
293
318 void SetAnnotType(annots::Annot::Type type, bool use_all);
319
329 void SetFileTitle(const wchar_t* title);
330
340 void SetPageRect(const RectF& rect);
341
353 void SetPageMargin(const RectF& margin);
354
367 void SetStartPage(int page_index);
368
382 void SetEndPage(int page_index);
383
395 void EnableOutputNoAnnotationPage(bool enable);
396
409 void SetConnectorLineColor(RGB color);
410
424 void SetConnectorLineOpacity(float opacity);
425
448 void SetAnnotThumbnail(annots::Annot::Type type, const common::Bitmap& thumbnail);
449 };
450
454 class AnnotationSummary FS_FINAL : public Base {
455 public:
461 AnnotationSummary(const pdf::PDFDoc& document);
462
463 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
464 explicit AnnotationSummary(FS_HANDLE handle);
465
467 ~AnnotationSummary();
468
474 AnnotationSummary(const AnnotationSummary& other);
475
483 AnnotationSummary& operator=(const AnnotationSummary& other);
484
492 bool operator==(const AnnotationSummary& other) const;
493
501 bool operator!=(const AnnotationSummary& other) const;
502
510 bool IsEmpty() const;
511
524 void SetCallback(AnnotationSummaryCallback* callback);
525
545 common::Progressive StartSummarize(const char* dest_file_path, const AnnotationSummarySettings& settings, common::PauseCallback* pause = NULL);
546
566 common::Progressive StartSummarize(const wchar_t* dest_file_path, const AnnotationSummarySettings& settings, common::PauseCallback* pause = NULL);
567
588 common::Progressive StartSummarize(foxit::common::file::WriterCallback* dest_file, const AnnotationSummarySettings& settings, foxit::common::PauseCallback* pause = NULL);
589 };
590
591 } // namespace pdf
592 } // namespace foxit
593 #endif // FS_ANNOTATIONSUMMARY_H_
foxit::pdf::AnnotationSummarySettings
Definition: fs_annotationsummary.h:144
foxit::pdf::AnnotationSummary::SetCallback
void SetCallback(AnnotationSummaryCallback *callback)
Set a callback object for annotation summary.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDDocumentTitle
Annotations summary string ID: specify the document title in result document. Default title is "Summa...
Definition: fs_annotationsummary.h:66
IFX_FileWrite
File writing interface.
Definition: fx_stream.h:470
foxit::pdf::AnnotationSummaryCallback
Definition: fs_annotationsummary.h:37
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::AnnotationSummary::AnnotationSummary
AnnotationSummary(const pdf::PDFDoc &document)
Constructor.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDNoAnnotations
Annotations summary string ID: specify the string used as content in result document when a page does...
Definition: fs_annotationsummary.h:75
foxit::pdf::AnnotationSummary::StartSummarize
common::Progressive StartSummarize(const char *dest_file_path, const AnnotationSummarySettings &settings, common::PauseCallback *pause=0)
Start to summarize annotation.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDSubject
Annotations summary string ID: specify the prefix when subject information is outputed in result docu...
Definition: fs_annotationsummary.h:85
foxit::pdf::AnnotationSummaryCallback::LoadString
virtual WString LoadString(AnnotationSummaryStringID id)=0
A callback function used to load a string in local language for a specified case.
foxit::pdf::AnnotationSummarySettings::SetFileTitle
void SetFileTitle(const wchar_t *title)
Set the file title string when location of the document needs to be outputed in result document.
foxit::pdf::AnnotationSummaryCallback::GetLocalFontName
virtual WString GetLocalFontName()=0
A callback function used to specify the font name used locally.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDNumber
Annotations summary string ID: specify the prefix when number information is outputed in result docum...
Definition: fs_annotationsummary.h:80
fs_pdfdoc.h
Header file for PDF document related definitions and classes.
foxit::common::LocaleID
LocaleID
Enumeration for locale ID.
Definition: fs_common.h:238
foxit::pdf::AnnotationSummary::operator=
AnnotationSummary & operator=(const AnnotationSummary &other)
Assign operator.
foxit::pdf::AnnotationSummarySettings::~AnnotationSummarySettings
~AnnotationSummarySettings()
Destructor.
foxit::pdf::AnnotationSummarySettings::SetFontSize
void SetFontSize(FontSizeType type)
Set the font size type used in result document of annotation summary.
foxit::pdf::AnnotationSummarySettings::SetConnectorLineColor
void SetConnectorLineColor(RGB color)
Set connector line color.
foxit::RGB
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
foxit::pdf::AnnotationSummary
Definition: fs_annotationsummary.h:454
foxit::pdf::annots::Annot::Type
Type
Enumeration for PDF annotation type.
Definition: fs_annot.h:1013
foxit::pdf::AnnotationSummarySettings::operator=
AnnotationSummarySettings & operator=(const AnnotationSummarySettings &other)
Assign operator.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDDate
Annotations summary string ID: specify the prefix when date information is outputed in result documen...
Definition: fs_annotationsummary.h:54
foxit::pdf::AnnotationSummarySettings::SummaryLayout
SummaryLayout
Enumeration for options used for annotation summary layout.
Definition: fs_annotationsummary.h:151
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::pdf::AnnotationSummarySettings::SetAnnotThumbnail
void SetAnnotThumbnail(annots::Annot::Type type, const common::Bitmap &thumbnail)
Set the markup annotation thumbnail used in result document to indicates the type of annotation.
foxit::pdf::AnnotationSummary::~AnnotationSummary
~AnnotationSummary()
Destructor.
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::AnnotationSummarySettings::e_TypeSortByPage
If set, that means to sort annotation by page in result document.
Definition: fs_annotationsummary.h:175
foxit::pdf::AnnotationSummarySettings::e_SummaryLayoutSinglePageWithSequenceNumber
If set, that means to layout document and annotations with sequence numbers on separate pages.
Definition: fs_annotationsummary.h:161
foxit::pdf::AnnotationSummarySettings::SetConnectorLineOpacity
void SetConnectorLineOpacity(float opacity)
Set connector line opacity.
foxit::pdf::AnnotationSummarySettings::SetSortType
void SetSortType(SortType type)
Set the option to decide to sort annotation by what.
foxit::pdf::AnnotationSummarySettings::e_SummaryLayoutSinglePageWithLine
If set, that means to layout document and annotations with connector lines on single pages.
Definition: fs_annotationsummary.h:155
foxit::pdf::AnnotationSummarySettings::FontSizeType
FontSizeType
Enumeration for options used for font size type in result document.
Definition: fs_annotationsummary.h:185
foxit::pdf::AnnotationSummarySettings::e_FontSizeSmall
If set, that means to use small font size in result document.
Definition: fs_annotationsummary.h:187
foxit::pdf::AnnotationSummarySettings::AnnotationSummarySettings
AnnotationSummarySettings()
Constructor, with parameters.
foxit::pdf::AnnotationSummarySettings::e_TypeSortByAuthor
If set, that means to sort annotation by author in result document.
Definition: fs_annotationsummary.h:171
foxit::pdf::AnnotationSummarySettings::e_SummaryLayoutSeparatePagesWithLine
If set, that means to layout document and annotations with connector lines on separate pages.
Definition: fs_annotationsummary.h:153
foxit::pdf::AnnotationSummarySettings::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::AnnotationSummarySettings::e_FontSizeLarge
If set, that means to use large font size in result document.
Definition: fs_annotationsummary.h:191
foxit::pdf::AnnotationSummarySettings::SetEndPage
void SetEndPage(int page_index)
Set ending page index.
foxit::pdf::AnnotationSummaryCallback::GetCurrentLocaleID
virtual common::LocaleID GetCurrentLocaleID()=0
A callback function used to specify current locale ID.
IFX_Pause
Definition: fx_basic.h:3758
foxit::pdf::AnnotationSummarySettings::SetAnnotType
void SetAnnotType(annots::Annot::Type type, bool use_all)
Set the option to decide which type of annotations will be summarized.
foxit::pdf::AnnotationSummarySettings::e_SummaryLayoutSeparatePagesWithSequenceNumber
If set, that means to layout document and annotations with sequence numbers on separate pages.
Definition: fs_annotationsummary.h:159
foxit::common::Progressive
Definition: fs_common.h:373
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDAuthor
Annotations summary string ID: specify the prefix when author information is outputed in result docum...
Definition: fs_annotationsummary.h:49
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
fs_common.h
Header file for common definitions and classes.
foxit::pdf::AnnotationSummaryCallback::Release
virtual void Release()=0
A callback function used to release current callback object itself.
foxit::pdf::AnnotationSummarySettings::SortType
SortType
Enumeration for options used for sorting annotation in result document.
Definition: fs_annotationsummary.h:169
foxit::pdf::AnnotationSummary::operator!=
bool operator!=(const AnnotationSummary &other) const
Not equal operator.
foxit::pdf::AnnotationSummaryCallback::AnnotationSummaryStringID
AnnotationSummaryStringID
Enumeration for string ID used to specify the string or prefix in result document when summarizing an...
Definition: fs_annotationsummary.h:44
foxit::pdf::AnnotationSummarySettings::e_SummaryLayoutAnnotationOnly
If set, that means to layout annotations only.
Definition: fs_annotationsummary.h:157
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::AnnotationSummary::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::AnnotationSummarySettings::e_TypeSortByDate
If set, that means to sort annotation by date in result document.
Definition: fs_annotationsummary.h:173
foxit
Foxit namespace.
Definition: fs_pdf3d.h:26
foxit::pdf::AnnotationSummary::operator==
bool operator==(const AnnotationSummary &other) const
Equal operator.
foxit::pdf::AnnotationSummarySettings::EnableOutputNoAnnotationPage
void EnableOutputNoAnnotationPage(bool enable)
Set the flag to decide whether to output information of pages which have no annotation.
foxit::pdf::AnnotationSummarySettings::e_TypeSortByAnnotationType
If set, that means to sort annotation by annotation type in result document.
Definition: fs_annotationsummary.h:177
foxit::pdf::AnnotationSummarySettings::e_FontSizeMedium
If set, that means to use medium font size in result document.
Definition: fs_annotationsummary.h:189
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDPageTitle
Annotations summary string ID: specify the prefix when page title is outputed in result document....
Definition: fs_annotationsummary.h:70
foxit::pdf::AnnotationSummarySettings::SetStartPage
void SetStartPage(int page_index)
Set starting page index.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDPage
Annotations summary string ID: specify the prefix when page information is outputed in result documen...
Definition: fs_annotationsummary.h:59
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::AnnotationSummarySettings::SetPageRect
void SetPageRect(const RectF &rect)
Set the page rectangle in result document.
foxit::pdf::AnnotationSummarySettings::operator!=
bool operator!=(const AnnotationSummarySettings &other) const
Not equal operator.
foxit::pdf::AnnotationSummarySettings::SetSummaryLayout
void SetSummaryLayout(SummaryLayout type)
Set summary layout type.
foxit::pdf::AnnotationSummarySettings::SetPageMargin
void SetPageMargin(const RectF &margin)
Set the page margin used in result document.
foxit::pdf::AnnotationSummarySettings::operator==
bool operator==(const AnnotationSummarySettings &other) const
Equal operator.
foxit::pdf::AnnotationSummaryCallback::e_AnnotationSummaryStringIDType
Annotations summary string ID: specify the prefix when annotation type is outputed in result document...
Definition: fs_annotationsummary.h:64
CFX_FloatRect
Definition: fx_coordinates.h:771