<< Click to Display Table of Contents >> Navigation: Tasks > Change GUI > ViewControls and ViewOptions |
WPViewPDF1.ViewControls := [wpViewLeftPanel, wpHorzScrollBar, wpVertScrollBar,wpNavigationPanel, wpPropertyPanel, wpViewPanel];
pdfViewer1.ViewControls =
eViewControls.wpHorzScrollBar |
eViewControls.wpNavigationPanel |
eViewControls.wpPropertyPanel |
eViewControls.wpVertScrollBar |
eViewControls.wpViewPanel;
wpDontUseHyperlinks : Hyperlinks are ignored - however the hyperlink event will still be triggered.
wpDontHighlightLinks: Hyperlinks will not painted with a blue background
wpNoHyperlinkCursor: Do not switch to hand point cursor on links.
wpDontAskForPassword: When a PDF requires a password the control will not ask for one.
wpSelectPage: The user can select pages by pressing Ctrl+Cursor left/right
wpPageMultiSelection: like wpSelectPage
wpShowPageSelection: (wrong name) Allow page selection with PageUp + Down + Shift / Ctrl
wpDisablePagenrHint: Don't display a page number during scrolling
wpDisableZoomHint: Don't display a zoome value during zooming
wpDisableBookmarkView: Do not load bookmarks
wpInactivateHyperlinks: Display hyperlinks but do not use the internal jump on clicks
wpExpandAllBookmarks: Expand all bookmarks
wpShowDeletionCross: Show pages which are marked for deletion with a cross
wpPaintCursor: (not used by WPViewPDF Standard and PLUS) Paint a cursor in PDF text paths
wpPaintPathRects: Show rectangle around text paths
wpPaintObjectsRects: Show frames for all draw objects
wpPaintObjectsSizers: Show sizer rectangles when a draw object is selected
wpHighlightFields: Show colored backgrounds for fields (widget annotations)
wpViewThumbnails: Enable display thumbnails in left panel
- use CommandEx(COMPDF_SetPageModeDefault, val) to actually display them
wpAllowPageDragging : Allows move of selected pages
wpHidePageSelection : Disable display of selection in main viewer
wpHidePageSelectionThumbnails: disable display of selection in thumbnail viewer
wpInteractiveThumbnails: Allows page moving in thumbnail viewer
wpThumbnailAtozoomToSquareWH : reserve the maximum square rectangle for thumbnails. This avoids scaling when pages are rotated.
wpHideFocusRectThumbnails: Hide the red line which highlights the current page
WPViewPDF1.ViewOptions :=
[wpExpandAllBookmarks,
wpSelectPage,
wpShowPageSelection,
wpPageMultiSelection];
pdfViewer1.ViewOptions =
eViewOptions.wpExpandAllBookmarks |
eViewOptions.wpExpandAllBookmarks |
eViewOptions.wpSelectPage |
eViewOptions.wpShowPageSelection;
This command can be used to force the display of the navigation panel (Bookmarks and Thumbnails).
Use IntPar=0 to hide it, 1 to show it and 2 to toggle its visibility.
COMPDF_SetPageModeDefault = 615:
0=Auto, 1=None, 2=Outlines, 3=Thumbnails
(Note: The VCL has the property PageModeDefault)
This command disables, that the user can switch off the navigation n(left) panel and
it stays switched off after loading a new file.
It further can override the PageMode defined in the PDF:
COMPDF_EnableNavigationAfterLoad = 616:
0: AsBeforeLoad - persistent, default
1: AsDefinedInDefaultPageMode - always use COMPDF_SetPageModeDefault
2: DefinedInPDFOrDefault - reset navigation after loading a new file
Delphi Example:
Display the thumbnails from the beginning (after loading a PDF file)
FViewer := TWPViewPDF.Create(Parent); // Parent can be a TPanel for example
FViewer.Parent := Parent;
FViewer.ViewControls := [ wpViewLeftPanel, wpViewPanel, wpVertScrollBar, wpHorzScrollBar ];
FViewer.ViewOptions := [ wpViewThumbnails ];
FViewer.PageModeDefault := wpPageModeThumbnails;
FViewer.SetBounds(1,1,Parent.Width-2,Parent.Height-2);