- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PDFView.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFPDFView
6 #define PDFTRON_H_CPPPDFPDFView
7
8 #include <Common/BasicTypes.h>
9 #include <PDF/PDFDoc.h>
10 #include <PDF/ExternalAnnotManager.h>
11 #include <PDF/PDFRasterizer.h>
12 #include <PDF/Highlights.h>
13 #include <PDF/LinkInfo.h>
14 #include <PDF/OCG/Context.h>
15 #include <C/PDF/TRN_PDFView.h>
16 #include <PDF/Selection.h>
17 #include <PDF/DocumentConversion.h>
18 #include <SDF/ObjSet.h>
19 #include <PDF/ViewChangeCollection.h>
20 #include <PDF/ActionParameter.h>
21 #ifdef SWIG
22 #include <PDF/Callback.h>
23 #endif
24
25 namespace pdftron {
26 namespace PDF {
27
72 class PDFView
73 {
74 public:
75
80 PDFView();
81 ~PDFView();
82
88 void SetDoc(PDFDoc& doc);
89
98 void OpenUniversalDoc(DocumentConversion& conversion);
99
103 void CloseDoc();
104
108 PDFDoc* GetDoc();
109
114 void DocLock(bool cancel_threads);
115
119 void DocUnlock();
120
126 bool DocTryLock( int milliseconds = 0 );
127
139 void DocLockRead();
140
144 void DocUnlockRead();
145
151 bool DocTryLockRead( int milliseconds = 0 );
152
156 enum PagePresentationMode
157 {
158 e_single_page = 1, //<<< Display one page at a time.
159 e_single_continuous, //<<< Display the pages in one column.
160 e_facing, //<<< Display the pages two at a time, with odd-numbered pages on the left.
161 e_facing_continuous, //<<< Display the pages in two columns, with odd-numbered pages on the left.
162 e_facing_cover, //<<< Display the pages two at a time, with odd-numbered pages on the right.
163 e_facing_continuous_cover //<<< Display the pages in two columns, with odd-numbered pages on the right.
164 };
165
172 void SetPagePresentationMode(PagePresentationMode mode);
173
177 PagePresentationMode GetPagePresentationMode() const;
178
188 void SetColorPostProcessMode(PDFRasterizer::ColorPostProcessMode mode);
189
190
204 void SetColorPostProcessMapFile(Filters::Filter image_file_contents);
205
213 ColorPt GetPostProcessedColor(const ColorPt& color) const;
214
227 void SetColorPostProcessColors(unsigned int white_color, unsigned int black_color);
228
232 PDFRasterizer::ColorPostProcessMode GetColorPostProcessMode() const;
233
237 int GetCurrentPage() const;
238
242 int GetPageCount() const;
243
249 bool GotoFirstPage();
250
256 bool GotoLastPage();
257
263 bool GotoNextPage();
264
270 bool GotoPreviousPage();
271
277 bool SetCurrentPage(int page_num);
278
286 bool ShowRect( int page_num, const Rect& rect );
287
293 std::vector<int> GetVisiblePages() const ;
294
300 double GetZoom() const;
301
309 bool SetZoom(double zoom);
310
338 bool SetZoom(int x, int y, double zoom);
339
356 bool SmartZoom(int x, int y);
360 void RotateClockwise();
361
365 void RotateCounterClockwise();
366
370 Page::Rotate GetRotation() const;
371
377 int GetPageNumberFromScreenPt(double x, double y) const;
378
382 Point ConvScreenPtToCanvasPt(const Point& pt) const;
383
384 #ifndef SWIG
385 void ConvScreenPtToCanvasPt(double& x, double& y) const;
386 #endif
387
391 Point ConvCanvasPtToScreenPt(const Point& pt) const;
392
393 #ifndef SWIG
394 void ConvCanvasPtToScreenPt(double& x, double& y) const;
395 #endif
396
404 Point ConvCanvasPtToPagePt(const Point& pt, int page_num = -1) const;
405
406 #ifndef SWIG
407 void ConvCanvasPtToPagePt(double& x, double& y, int page_num = -1) const;
408 #endif
409
417 Point ConvPagePtToCanvasPt(const Point& pt, int page_num = -1) const;
418
419 #ifndef SWIG
420 void ConvPagePtToCanvasPt(double& x, double& y, int page_num = -1) const;
421 #endif
422
430 Point ConvScreenPtToPagePt(const Point& pt, int page_num = -1) const;
431
432 #ifndef SWIG
433 void ConvScreenPtToPagePt(double& x, double& y, int page_num = -1) const;
434 #endif
435
445 Point ConvPagePtToScreenPt(const Point& pt, int page_num = -1) const;
446
447 #ifndef SWIG
448 void ConvPagePtToScreenPt(double& x, double& y, int page_num = -1) const;
449 #endif
450
455 Point SnapToNearestInDoc(const Point& screen_pt);
456
463 void SetSnappingMode(UInt32 mode_flags);
464
480 Common::Matrix2D GetDeviceTransform(int page_num = -1) const;
481
489 #ifdef SWIG
490 void SetErrorReportProc(Callback* instance);
491 #else
492 void SetErrorReportProc(PDFRasterizer::ErrorReportProc error_proc, void* data);
493 #endif
494
503 typedef void (*CurrentPageProc) (int current_page, int num_pages, void* data);
504
513 #ifdef SWIG
514 void SetCurrentPageProc(Callback* instance);
515 #else
516 void SetCurrentPageProc(CurrentPageProc curr_pagenum_proc, void* data);
517 #endif
518
528 typedef void(*JavaScriptEventProc) (const char* event_type, const char* json, void* data);
529
537 #ifdef SWIG
538 void SetJavaScriptEventCallBack(Callback* instance);
539 #else
540 void SetJavaScriptEventCallBack(JavaScriptEventProc js_proc, void* data);
541 #endif
542
550 typedef void (*CurrentZoomProc) (double curr_zoom_proc, void* data);
551
560 #ifdef SWIG
561 void SetCurrentZoomProc(Callback* instance);
562 #else
563 void SetCurrentZoomProc(CurrentZoomProc curr_zoom_proc, void* data);
564 #endif
565
571 void ExecuteAction(Action& action);
572
573 void ExecuteAction(ActionParameter& action_param);
574
578 double GetCanvasWidth() const;
579
583 double GetCanvasHeight() const;
584
588 double GetHScrollPos() const;
589
593 double GetVScrollPos() const;
594
601 void OnScroll(int pix_dx, int pix_dy);
602
609 void SetHScrollPos(double pos);
610
633 void SetVScrollPos(double pos);
634
642 void OnSize(int width, int height);
643
652 bool IsFinishedRendering(bool visible_region_only) const;
653
658 void CancelRendering();
659
663 void Update(bool all = false);
664
669 void Update(const Rect& update);
670
676 void Update(const Annot& annot, int page_num);
677
682 void Update(const Field& field);
683
690 void UpdatePageLayout();
691
697 #ifdef SWIG
698 std::vector<unsigned char> GetBuffer() const;
699 #else
700 const char* GetBuffer() const;
701 #endif
702
715 void UpdateBuffer();
716
721 int GetBufferWidth() const;
722
727 int GetBufferHeight() const;
728
733 int GetBufferStride() const;
734
741 void HideAnnotation(Annot annot);
742
749 void ShowAnnotation(Annot annot);
750
757 void SetDrawAnnotations(bool render_annots);
758
771 void SetUrlExtraction(bool enabled);
772
785 LinkInfo GetLinkAt(int x, int y);
786
796 void SetFieldHighlightColor(const ColorPt& new_field_highlight_color);
797
803 void SetHighlightFields(bool highlight_fields);
804
813 void SetRequiredFieldBorderColor(const ColorPt& new_border_color);
814
824 void SetSignatureHighlightColor(const ColorPt& new_signature_highlight_color);
825
835 void SetAntiAliasing(bool enable_aa);
836
845 void SetPathHinting(bool enable_hinting);
846
857 void SetThinLineAdjustment(bool pixel_grid_fit, bool stroke_adjust);
858
872 void SetImageSmoothing(bool smoothing_enabled = true);
873
881 void SetCaching(bool enabled);
882
891 void SetRasterizerType (PDFRasterizer::Type type);
892
905 void SetGamma(double exp);
906
916 void SetOverprint(PDFRasterizer::OverprintPreviewMode op);
917
933 void SetOCGContext(const OCG::Context& ctx);
934
942 OCG::Context GetOCGContext();
943
949 void UpdateOCGContext();
950
951
958 typedef void (*RenderBeginEventProc) (void* data);
959
971 typedef void (*RenderFinishEventProc) (void* data, bool canceled);
972
985 #ifdef SWIG
986 void SetRenderBeginProc(class Callback* instance);
987 #else
988 void SetRenderBeginProc(RenderBeginEventProc proc, void* data);
989 #endif
990
1003 #ifdef SWIG
1004 void SetRenderFinishProc(class Callback* instance);
1005 #else
1006 void SetRenderFinishProc(RenderFinishEventProc proc, void* data);
1007 #endif
1008
1009
1017 enum TextSelectionMode {
1018 e_structural,
1019 e_rectangular,
1020 e_structural_algorithm_2
1021 };
1022
1027 void SetTextSelectionMode(TextSelectionMode tm);
1028
1032 TextSelectionMode GetTextSelectionMode() const;
1033
1039 void SetRightToLeftLanguage(bool flag);
1040
1046 bool GetRightToLeftLanguage() const;
1047
1055 bool Select(double x1, double y1, double x2, double y2);
1056
1065 bool SelectWithSnapping(double x1, double y1, double x2, double y2, bool snap_to_start, bool snap_to_end);
1066
1074 bool SelectWithSmartSnapping(double x1, double y1, double x2, double y2);
1075
1083 bool Select(double x1, double y1, int page1, double x2, double y2, int page2);
1084
1093 bool SelectWithSnapping(double x1, double y1, int page1, double x2, double y2, int page2,
1094 bool snap_to_start, bool snap_to_end);
1095
1103 bool SelectWithSmartSnapping(double x1, double y1, int page1, double x2, double y2, int page2);
1104
1111 bool Select(const Highlights& highlights);
1112
1119 bool Select(const Selection& select);
1120
1125 void CancelFindText();
1126
1130 void SelectAll();
1131
1135 bool HasSelection() const;
1136
1140 void ClearSelection();
1141
1145 Selection GetSelection( int pagenum = -1 ) const;
1146
1151 int GetSelectionBeginPage() const ;
1152
1157 int GetSelectionEndPage() const;
1158
1163 bool HasSelectionOnPage( int ipage ) const;
1164
1171 void PrepareWords(int page_num);
1172
1177 bool WereWordsPrepared(int page_num) const;
1178
1183 bool IsThereTextInRect(double x1, double y1, double x2, double y2) const;
1184
1195 void PrepareAnnotsForMouse(int page_num, double distance_threshold, double minimum_line_weight);
1196
1201 bool WereAnnotsForMousePrepared(int page_num) const;
1202
1208 Annot::Type GetAnnotTypeUnder(double x, double y);
1209
1214 void SetPageBorderVisibility(bool border_visible);
1215
1221 void SetPageTransparencyGrid(bool trans_grid_visible);
1222
1227 void SetDefaultPageColor(UInt8 r, UInt8 g, UInt8 b);
1228
1234 void SetBackgroundColor(UInt8 r, UInt8 g, UInt8 b, UInt8 a = 255);
1235
1245 void SetHorizontalAlign(int align);
1246
1256 void SetVerticalAlign(int align);
1257
1270 void SetPageSpacing(int horiz_col_space, int vert_col_space, int horiz_pad, int vert_pad);
1271
1284 static void SetViewerCache(SDF::SDFDoc& document, size_t max_cache_size, bool on_disk);
1285
1289 void Destroy();
1290
1294 void SetDevicePixelDensity(double dpi, double scale_factor);
1295
1304 Rect GetScreenRectForAnnot(Annot annot, int page_num = -1);
1305
1316 Annot GetAnnotationAt(int x, int y, double distanceThreshold, double minimumLineWeight);
1317
1327 enum PageViewMode
1328 {
1329 e_fit_page = 0,
1330 e_fit_width,
1331 e_fit_height,
1332 e_zoom,
1333 PVM_SIZE //must stay as the last element
1334 };
1335
1342 void SetPageViewMode(PageViewMode mode);
1343
1347 PageViewMode GetPageViewMode() const;
1348
1355 void RefreshAndUpdate(const ViewChangeCollection& view_change);
1356
1369 void SetPageRefViewMode(PageViewMode mode);
1370
1375 PageViewMode GetPageRefViewMode() const;
1376
1390 void SetupThumbnails(bool use_embedded, bool generate_at_runtime, bool use_disk_cache, int thumb_max_side_length, size_t max_abs_cache_size, double max_perc_cache_size);
1391
1395 void ClearThumbCache();
1396
1408 typedef void (*ThumbAsyncHandler) (int page_num, bool was_thumb_found, const char* thumb_buf, int thumb_width, int thumb_height, void* custom_data);
1409
1418 #ifdef SWIG
1419 void GetThumbAsync(int page_num, Callback* instance);
1420 #else
1421 void GetThumbAsync(int page_num, ThumbAsyncHandler proc, void* custom_data);
1422 #endif
1423
1431 size_t GetThumbInCacheSize(int page_num);
1432
1443 bool GetThumbInCache(int page_num, UChar* buf, UInt32& out_width, UInt32& out_height);
1444
1445 /*
1446 * Cancel all pending GetThumbAsync requests. Your callback function will still be called
1447 * for each canceled request, but 'was_thumb_found' will be set to 'false'.
1448 */
1449 void CancelAllThumbRequests();
1450
1456 typedef void (*RequestRenderInWorkerThreadProc) (void* custom_data);
1457
1466 #ifdef SWIG
1467 void SetRequestRenderInWorkerThreadProc(Callback* instance);
1468 #else
1469 void SetRequestRenderInWorkerThreadProc(RequestRenderInWorkerThreadProc proc, void* custom_data);
1470 #endif
1471
1477 typedef void (*FindTextHandler)(bool success, PDF::Selection selection, void* custom_data);
1478
1479
1480 #ifdef SWIG
1481
1487 void SetFindTextHandler(Callback* instance);
1488 #else // SWIG
1489
1496 void SetFindTextHandler(PDFView::FindTextHandler proc, void* custom_data);
1497 #endif // SWIG
1498
1510 void FindTextAsync(const UString& search_str, bool match_case, bool match_whole_word, bool search_up, bool reg_exp);
1511
1520 std::vector<Annot> GetAnnotationsOnPage(int page_num);
1521
1534 std::vector<Annot> GetAnnotationListAt(int x1, int y1, int x2, int y2);
1535
1539 void EnableUndoRedo();
1540
1547 UString Undo();
1548
1554 UString Redo();
1555
1561 bool HasChangesSinceSnapshot();
1562
1568 void TakeSnapshot(const UString& meta_info);
1569
1577 UString GetNextUndoInfo();
1578
1586 UString GetNextRedoInfo();
1587
1593 bool CanUndo();
1594
1600 bool CanRedo();
1601
1608 void RevertChangesSinceSnapshot();
1609
1613 void RevertAllChanges();
1614
1615 ExternalAnnotManager GetExternalAnnotManager(const UString& author, ExternalAnnotManager::Mode mode = ExternalAnnotManager::e_admin_undo_own);
1616
1617
1618 // @cond PRIVATE_DOC
1619 private:
1620 TRN_PDFView mp_view;
1621 TRN_PDFDoc temp_doc;
1622
1623 // PDFView should not be copied
1624 PDFView(const PDFView&);
1625 PDFView& operator= (const PDFView&);
1626
1627 FindTextHandler mp_findtexthandler;
1628 void* mp_findtextdata;
1629
1630 static void StaticTRNPDFViewFindTextHandler(TRN_Bool success, TRN_PDFViewSelection selection, void* custom_data);
1631
1632 //for internal use only
1633 #if defined(__iOS__)
1634 public:
1635 #include <Impl/PDFView.internal>
1636 #endif // defined(__iOS__)
1637 // @endcond
1638 };
1639
1640 #include <Impl/PDFView.inl>
1641
1642 }; // namespace PDF
1643 }; // namespace pdftron
1644
1645 #endif // PDFTRON_H_CPPPDFPDFView
pdftron::PDF::PDFView::DocTryLock
bool DocTryLock(int milliseconds=0)
pdftron::PDF::PDFView::SetPageSpacing
void SetPageSpacing(int horiz_col_space, int vert_col_space, int horiz_pad, int vert_pad)
pdftron::PDF::PDFView::JavaScriptEventProc
void(* JavaScriptEventProc)(const char *event_type, const char *json, void *data)
Definition: PDFView.h:528
pdftron::PDF::PDFView::~PDFView
~PDFView()
pdftron::PDF::PDFView::SetBackgroundColor
void SetBackgroundColor(UInt8 r, UInt8 g, UInt8 b, UInt8 a=255)
pdftron::PDF::PDFView::SnapToNearestInDoc
Point SnapToNearestInDoc(const Point &screen_pt)
pdftron::PDF::PDFView::SetVScrollPos
void SetVScrollPos(double pos)
DocumentConversion.h
pdftron::PDF::ViewChangeCollection
Definition: ViewChangeCollection.h:9
pdftron::PDF::PDFView::SetRasterizerType
void SetRasterizerType(PDFRasterizer::Type type)
pdftron::PDF::Annot::Type
Type
Definition: Annot.h:41
Selection.h
pdftron::PDF::PDFView::DocUnlockRead
void DocUnlockRead()
pdftron::PDF::PDFView::SetHScrollPos
void SetHScrollPos(double pos)
pdftron::PDF::PDFView::GetPagePresentationMode
PagePresentationMode GetPagePresentationMode() const
pdftron::PDF::PDFView::SelectWithSmartSnapping
bool SelectWithSmartSnapping(double x1, double y1, double x2, double y2)
pdftron::PDF::PDFView::GetDoc
PDFDoc * GetDoc()
pdftron::PDF::PDFView::GetAnnotationsOnPage
std::vector< Annot > GetAnnotationsOnPage(int page_num)
pdftron::PDF::PDFView::Redo
UString Redo()
pdftron::PDF::PDFView::e_facing_continuous_cover
Definition: PDFView.h:163
pdftron::PDF::PDFView::OnScroll
void OnScroll(int pix_dx, int pix_dy)
pdftron::PDF::PDFView::ClearSelection
void ClearSelection()
pdftron::PDF::PDFView::WereWordsPrepared
bool WereWordsPrepared(int page_num) const
pdftron::PDF::PDFView::SetPageRefViewMode
void SetPageRefViewMode(PageViewMode mode)
pdftron::PDF::PDFView::DocTryLockRead
bool DocTryLockRead(int milliseconds=0)
pdftron::PDF::PDFView::GotoNextPage
bool GotoNextPage()
pdftron::PDF::PDFView::PrepareWords
void PrepareWords(int page_num)
pdftron::PDF::PDFView::e_fit_width
Definition: PDFView.h:1330
pdftron::PDF::PDFView::HideAnnotation
void HideAnnotation(Annot annot)
pdftron::PDF::PDFView::GotoPreviousPage
bool GotoPreviousPage()
pdftron::PDF::PDFView::SetRequestRenderInWorkerThreadProc
void SetRequestRenderInWorkerThreadProc(RequestRenderInWorkerThreadProc proc, void *custom_data)
pdftron::PDF::PDFView::RenderFinishEventProc
void(* RenderFinishEventProc)(void *data, bool canceled)
Definition: PDFView.h:971
pdftron::PDF::OCG::Context
Definition: Context.h:41
pdftron::PDF::PDFView
Definition: PDFView.h:72
pdftron::PDF::PDFView::IsFinishedRendering
bool IsFinishedRendering(bool visible_region_only) const
pdftron::PDF::ColorPt
Definition: ColorSpace.h:20
pdftron::PDF::PDFView::SetVerticalAlign
void SetVerticalAlign(int align)
pdftron::PDF::PDFView::RevertAllChanges
void RevertAllChanges()
pdftron::PDF::PDFView::HasChangesSinceSnapshot
bool HasChangesSinceSnapshot()
pdftron::PDF::PDFView::RenderBeginEventProc
void(* RenderBeginEventProc)(void *data)
Definition: PDFView.h:958
pdftron::PDF::PDFView::SetOCGContext
void SetOCGContext(const OCG::Context &ctx)
pdftron::PDF::PDFView::SetUrlExtraction
void SetUrlExtraction(bool enabled)
pdftron::PDF::PDFView::GetThumbInCacheSize
size_t GetThumbInCacheSize(int page_num)
pdftron::PDF::PDFView::e_facing_cover
Definition: PDFView.h:162
pdftron::UInt8
TRN_UInt8 UInt8
Definition: BasicTypes.h:15
pdftron::PDF::PDFView::GetAnnotationAt
Annot GetAnnotationAt(int x, int y, double distanceThreshold, double minimumLineWeight)
pdftron::PDF::PDFRasterizer::ColorPostProcessMode
ColorPostProcessMode
Definition: PDFRasterizer.h:461
pdftron::PDF::PDFView::GetOCGContext
OCG::Context GetOCGContext()
pdftron::PDF::Highlights
Definition: Highlights.h:70
pdftron::PDF::PDFView::SetColorPostProcessMapFile
void SetColorPostProcessMapFile(Filters::Filter image_file_contents)
pdftron::PDF::PDFView::SetFindTextHandler
void SetFindTextHandler(PDFView::FindTextHandler proc, void *custom_data)
pdftron::PDF::PDFView::GetPageNumberFromScreenPt
int GetPageNumberFromScreenPt(double x, double y) const
pdftron::PDF::PDFView::ConvPagePtToScreenPt
Point ConvPagePtToScreenPt(const Point &pt, int page_num=-1) const
pdftron::PDF::PDFView::SetPagePresentationMode
void SetPagePresentationMode(PagePresentationMode mode)
pdftron::PDF::PDFView::CurrentZoomProc
void(* CurrentZoomProc)(double curr_zoom_proc, void *data)
Definition: PDFView.h:550
pdftron::PDF::PDFView::SetRightToLeftLanguage
void SetRightToLeftLanguage(bool flag)
pdftron::PDF::PDFView::ConvCanvasPtToPagePt
Point ConvCanvasPtToPagePt(const Point &pt, int page_num=-1) const
pdftron::PDF::PDFView::GetSelection
Selection GetSelection(int pagenum=-1) const
pdftron::PDF::PDFView::GetRotation
Page::Rotate GetRotation() const
pdftron::PDF::PDFView::PageViewMode
PageViewMode
Definition: PDFView.h:1327
pdftron::PDF::PDFView::SelectWithSnapping
bool SelectWithSnapping(double x1, double y1, double x2, double y2, bool snap_to_start, bool snap_to_end)
pdftron::PDF::PDFView::SetupThumbnails
void SetupThumbnails(bool use_embedded, bool generate_at_runtime, bool use_disk_cache, int thumb_max_side_length, size_t max_abs_cache_size, double max_perc_cache_size)
pdftron::PDF::PDFView::HasSelectionOnPage
bool HasSelectionOnPage(int ipage) const
pdftron::PDF::PDFView::GetBufferStride
int GetBufferStride() const
pdftron::PDF::PDFView::SetDoc
void SetDoc(PDFDoc &doc)
pdftron::PDF::PDFView::e_facing
Definition: PDFView.h:160
pdftron::PDF::PDFView::e_rectangular
Definition: PDFView.h:1019
pdftron::PDF::PDFView::SetCurrentZoomProc
void SetCurrentZoomProc(CurrentZoomProc curr_zoom_proc, void *data)
pdftron::PDF::PDFView::FindTextAsync
void FindTextAsync(const UString &search_str, bool match_case, bool match_whole_word, bool search_up, bool reg_exp)
pdftron::PDF::PDFView::SetAntiAliasing
void SetAntiAliasing(bool enable_aa)
pdftron::PDF::PDFView::CancelRendering
void CancelRendering()
pdftron::PDF::PDFView::e_zoom
Definition: PDFView.h:1332
pdftron::PDF::PDFView::RequestRenderInWorkerThreadProc
void(* RequestRenderInWorkerThreadProc)(void *custom_data)
Definition: PDFView.h:1456
pdftron::PDF::PDFView::SetOverprint
void SetOverprint(PDFRasterizer::OverprintPreviewMode op)
pdftron::PDF::PDFView::ConvScreenPtToCanvasPt
Point ConvScreenPtToCanvasPt(const Point &pt) const
pdftron::PDF::PDFView::e_facing_continuous
Definition: PDFView.h:161
pdftron::PDF::Rect
Definition: Rect.h:28
pdftron::PDF::PDFView::PDFView
PDFView()
pdftron::PDF::PDFView::Update
void Update(bool all=false)
pdftron::PDF::PDFView::PrepareAnnotsForMouse
void PrepareAnnotsForMouse(int page_num, double distance_threshold, double minimum_line_weight)
pdftron::PDF::PDFView::SetZoom
bool SetZoom(double zoom)
pdftron::PDF::PDFView::SetGamma
void SetGamma(double exp)
pdftron::PDF::PDFView::GotoFirstPage
bool GotoFirstPage()
pdftron::PDF::Point
Definition: Point.h:12
pdftron::PDF::PDFView::CloseDoc
void CloseDoc()
pdftron::PDF::PDFView::ConvCanvasPtToScreenPt
Point ConvCanvasPtToScreenPt(const Point &pt) const
Callback.h
pdftron::PDF::PDFView::SetPathHinting
void SetPathHinting(bool enable_hinting)
pdftron::PDF::PDFView::GetExternalAnnotManager
ExternalAnnotManager GetExternalAnnotManager(const UString &author, ExternalAnnotManager::Mode mode=ExternalAnnotManager::e_admin_undo_own)
pdftron::PDF::DocumentConversion
Definition: DocumentConversion.h:26
pdftron::PDF::PDFView::UpdatePageLayout
void UpdatePageLayout()
pdftron::PDF::PDFView::GetZoom
double GetZoom() const
pdftron::PDF::ExternalAnnotManager
Definition: ExternalAnnotManager.h:25
pdftron::PDF::PDFView::SetCurrentPage
bool SetCurrentPage(int page_num)
pdftron::PDF::PDFView::SetImageSmoothing
void SetImageSmoothing(bool smoothing_enabled=true)
pdftron::PDF::PDFRasterizer::ErrorReportProc
void(* ErrorReportProc)(const char *message, void *data)
Definition: PDFRasterizer.h:423
pdftron::PDF::PDFView::EnableUndoRedo
void EnableUndoRedo()
pdftron::PDF::PDFView::ConvPagePtToCanvasPt
Point ConvPagePtToCanvasPt(const Point &pt, int page_num=-1) const
pdftron::PDF::Page::Rotate
Rotate
Definition: Page.h:190
pdftron::PDF::PDFView::GetNextRedoInfo
UString GetNextRedoInfo()
pdftron::PDF::PDFView::SetDefaultPageColor
void SetDefaultPageColor(UInt8 r, UInt8 g, UInt8 b)
pdftron::PDF::PDFView::GetHScrollPos
double GetHScrollPos() const
pdftron::PDF::PDFView::SetColorPostProcessMode
void SetColorPostProcessMode(PDFRasterizer::ColorPostProcessMode mode)
Highlights.h
pdftron::PDF::PDFView::Undo
UString Undo()
pdftron::PDF::PDFDoc
Definition: PDFDoc.h:71
pdftron::UInt32
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
pdftron::Common::Matrix2D
Definition: Matrix2D.h:103
pdftron::PDF::PDFView::TakeSnapshot
void TakeSnapshot(const UString &meta_info)
pdftron::PDF::PDFView::FindTextHandler
void(* FindTextHandler)(bool success, PDF::Selection selection, void *custom_data)
Definition: PDFView.h:1477
pdftron::PDF::PDFView::GetBuffer
const char * GetBuffer() const
pdftron::PDF::PDFView::DocUnlock
void DocUnlock()
pdftron::PDF::PDFView::GetPageRefViewMode
PageViewMode GetPageRefViewMode() const
pdftron::PDF::LinkInfo
Definition: LinkInfo.h:18
pdftron::PDF::PDFView::ThumbAsyncHandler
void(* ThumbAsyncHandler)(int page_num, bool was_thumb_found, const char *thumb_buf, int thumb_width, int thumb_height, void *custom_data)
Definition: PDFView.h:1408
pdftron::PDF::PDFView::SetErrorReportProc
void SetErrorReportProc(PDFRasterizer::ErrorReportProc error_proc, void *data)
pdftron::PDF::PDFView::GetThumbAsync
void GetThumbAsync(int page_num, ThumbAsyncHandler proc, void *custom_data)
pdftron::SDF::SDFDoc
Definition: SDFDoc.h:67
pdftron::PDF::PDFView::GetAnnotationListAt
std::vector< Annot > GetAnnotationListAt(int x1, int y1, int x2, int y2)
pdftron::PDF::PDFRasterizer::OverprintPreviewMode
OverprintPreviewMode
Definition: PDFRasterizer.h:114
pdftron::PDF::PDFView::GetPostProcessedColor
ColorPt GetPostProcessedColor(const ColorPt &color) const
pdftron::PDF::PDFView::ConvScreenPtToPagePt
Point ConvScreenPtToPagePt(const Point &pt, int page_num=-1) const
LinkInfo.h
pdftron::UChar
TRN_UChar UChar
Definition: BasicTypes.h:12
pdftron::PDF::PDFView::SetSignatureHighlightColor
void SetSignatureHighlightColor(const ColorPt &new_signature_highlight_color)
pdftron::PDF::PDFView::CanRedo
bool CanRedo()
PDFDoc.h
pdftron::PDF::PDFView::SetSnappingMode
void SetSnappingMode(UInt32 mode_flags)
pdftron::PDF::PDFView::SetDrawAnnotations
void SetDrawAnnotations(bool render_annots)
pdftron::PDF::PDFView::GetVScrollPos
double GetVScrollPos() const
pdftron::PDF::PDFView::GetCanvasHeight
double GetCanvasHeight() const
pdftron::PDF::PDFView::RevertChangesSinceSnapshot
void RevertChangesSinceSnapshot()
pdftron::PDF::ExternalAnnotManager::e_admin_undo_own
Definition: ExternalAnnotManager.h:32
pdftron::PDF::PDFView::SetRequiredFieldBorderColor
void SetRequiredFieldBorderColor(const ColorPt &new_border_color)
pdftron::PDF::PDFView::ClearThumbCache
void ClearThumbCache()
pdftron::PDF::PDFView::DocLock
void DocLock(bool cancel_threads)
ViewChangeCollection.h
pdftron::Filters::Filter
Definition: Filter.h:45
pdftron::PDF::PDFView::SetPageTransparencyGrid
void SetPageTransparencyGrid(bool trans_grid_visible)
pdftron::PDF::PDFView::GetVisiblePages
std::vector< int > GetVisiblePages() const
pdftron::PDF::PDFView::Select
bool Select(double x1, double y1, double x2, double y2)
pdftron::PDF::ExternalAnnotManager::Mode
Mode
Definition: ExternalAnnotManager.h:28
pdftron::PDF::PDFView::e_fit_page
Definition: PDFView.h:1329
pdftron::PDF::PDFView::SetRenderFinishProc
void SetRenderFinishProc(RenderFinishEventProc proc, void *data)
pdftron::PDF::PDFView::PVM_SIZE
Definition: PDFView.h:1333
pdftron::PDF::PDFView::RefreshAndUpdate
void RefreshAndUpdate(const ViewChangeCollection &view_change)
pdftron::PDF::PDFView::SetJavaScriptEventCallBack
void SetJavaScriptEventCallBack(JavaScriptEventProc js_proc, void *data)
BasicTypes.h
pdftron::PDF::ActionParameter
Definition: ActionParameter.h:22
pdftron::PDF::PDFView::UpdateBuffer
void UpdateBuffer()
pdftron::PDF::PDFView::SetHorizontalAlign
void SetHorizontalAlign(int align)
pdftron::PDF::PDFView::RotateClockwise
void RotateClockwise()
pdftron::PDF::PDFView::CancelFindText
void CancelFindText()
pdftron::PDF::PDFView::PagePresentationMode
PagePresentationMode
Definition: PDFView.h:156
pdftron::PDF::PDFView::e_structural_algorithm_2
Definition: PDFView.h:1020
pdftron::PDF::PDFView::GetSelectionEndPage
int GetSelectionEndPage() const
pdftron::PDF::PDFView::CanUndo
bool CanUndo()
pdftron::PDF::PDFView::ShowRect
bool ShowRect(int page_num, const Rect &rect)
pdftron::PDF::PDFView::ExecuteAction
void ExecuteAction(Action &action)
pdftron::PDF::PDFView::WereAnnotsForMousePrepared
bool WereAnnotsForMousePrepared(int page_num) const
pdftron::PDF::PDFView::SetRenderBeginProc
void SetRenderBeginProc(RenderBeginEventProc proc, void *data)
pdftron::PDF::PDFView::GetAnnotTypeUnder
Annot::Type GetAnnotTypeUnder(double x, double y)
pdftron::PDF::PDFView::GetTextSelectionMode
TextSelectionMode GetTextSelectionMode() const
pdftron::PDF::PDFView::e_structural
Definition: PDFView.h:1018
pdftron::PDF::PDFView::SelectAll
void SelectAll()
pdftron::PDF::PDFView::Destroy
void Destroy()
pdftron::PDF::PDFView::IsThereTextInRect
bool IsThereTextInRect(double x1, double y1, double x2, double y2) const
pdftron::PDF::Annot
Definition: Annot.h:33
pdftron::PDF::PDFView::SetPageBorderVisibility
void SetPageBorderVisibility(bool border_visible)
pdftron::PDF::PDFView::SetCurrentPageProc
void SetCurrentPageProc(CurrentPageProc curr_pagenum_proc, void *data)
ActionParameter.h
pdftron::PDF::Selection
Definition: Selection.h:15
pdftron::PDF::Action
Definition: Action.h:31
pdftron::PDF::PDFView::GetNextUndoInfo
UString GetNextUndoInfo()
pdftron::PDF::PDFView::GetSelectionBeginPage
int GetSelectionBeginPage() const
pdftron::PDF::PDFView::GetThumbInCache
bool GetThumbInCache(int page_num, UChar *buf, UInt32 &out_width, UInt32 &out_height)
pdftron::PDF::PDFView::HasSelection
bool HasSelection() const
pdftron::PDF::Field
Definition: Field.h:69
pdftron::PDF::PDFView::GetBufferWidth
int GetBufferWidth() const
pdftron::PDF::PDFView::OnSize
void OnSize(int width, int height)
pdftron::PDF::PDFView::SetHighlightFields
void SetHighlightFields(bool highlight_fields)
pdftron::PDF::PDFView::GetColorPostProcessMode
PDFRasterizer::ColorPostProcessMode GetColorPostProcessMode() const
ObjSet.h
pdftron::PDF::PDFView::UpdateOCGContext
void UpdateOCGContext()
pdftron::PDF::PDFView::SetPageViewMode
void SetPageViewMode(PageViewMode mode)
pdftron::PDF::PDFView::TextSelectionMode
TextSelectionMode
Definition: PDFView.h:1017
pdftron::PDF::PDFView::GetLinkAt
LinkInfo GetLinkAt(int x, int y)
pdftron::PDF::PDFView::GetPageCount
int GetPageCount() const
pdftron::PDF::PDFView::SetThinLineAdjustment
void SetThinLineAdjustment(bool pixel_grid_fit, bool stroke_adjust)
pdftron::PDF::PDFView::SetColorPostProcessColors
void SetColorPostProcessColors(unsigned int white_color, unsigned int black_color)
pdftron::PDF::PDFView::GetScreenRectForAnnot
Rect GetScreenRectForAnnot(Annot annot, int page_num=-1)
pdftron::PDF::PDFView::SetViewerCache
static void SetViewerCache(SDF::SDFDoc &document, size_t max_cache_size, bool on_disk)
pdftron::PDF::PDFView::CancelAllThumbRequests
void CancelAllThumbRequests()
pdftron::PDF::PDFView::GetDeviceTransform
Common::Matrix2D GetDeviceTransform(int page_num=-1) const
pdftron::PDF::PDFRasterizer::Type
Type
Definition: PDFRasterizer.h:103
pdftron::PDF::PDFView::ShowAnnotation
void ShowAnnotation(Annot annot)
pdftron::PDF::PDFView::e_single_continuous
Definition: PDFView.h:159
pdftron::PDF::PDFView::RotateCounterClockwise
void RotateCounterClockwise()
pdftron::PDF::PDFView::CurrentPageProc
void(* CurrentPageProc)(int current_page, int num_pages, void *data)
Definition: PDFView.h:503
pdftron::PDF::PDFView::DocLockRead
void DocLockRead()
pdftron::PDF::PDFView::GetCurrentPage
int GetCurrentPage() const
PDFRasterizer.h
pdftron::PDF::PDFView::SmartZoom
bool SmartZoom(int x, int y)
pdftron::PDF::PDFView::GetPageViewMode
PageViewMode GetPageViewMode() const
pdftron::PDF::PDFView::OpenUniversalDoc
void OpenUniversalDoc(DocumentConversion &conversion)
pdftron::UString
Definition: UString.h:27
pdftron::PDF::PDFView::e_single_page
Definition: PDFView.h:158
pdftron::PDF::PDFView::e_fit_height
Definition: PDFView.h:1331
pdftron::PDF::PDFView::SetFieldHighlightColor
void SetFieldHighlightColor(const ColorPt &new_field_highlight_color)
pdftron::PDF::PDFView::GotoLastPage
bool GotoLastPage()
pdftron::PDF::PDFView::SetCaching
void SetCaching(bool enabled)
pdftron::PDF::PDFView::SetTextSelectionMode
void SetTextSelectionMode(TextSelectionMode tm)
pdftron::PDF::PDFView::GetCanvasWidth
double GetCanvasWidth() const
Context.h
pdftron::PDF::PDFView::GetRightToLeftLanguage
bool GetRightToLeftLanguage() const
pdftron::PDF::PDFView::SetDevicePixelDensity
void SetDevicePixelDensity(double dpi, double scale_factor)
ExternalAnnotManager.h
pdftron::PDF::PDFView::GetBufferHeight
int GetBufferHeight() const