Skip to main content

TdxPDFCustomViewer Class

The base class for the PDF Viewer control.

Declaration

TdxPDFCustomViewer = class(
    TdxPDFDocumentCustomViewer,
    IdxSkinSupport,
    IcxLockedStatePaint
)

Remarks

The PDF Viewer (TdxPDFViewer) control is designed to view, manage, sign, and encrypt Portable Document Format (PDF) files in your application.

VCL PDF Viewer: A PDF Viewer-Based Application Example

Getting Started

Review the following sections to get started with the TdxPDFViewer component:

PDF Viewer Project and Form Templates

The VCL Template Kit ships with automatically installed Project and Form templates for the ExpressPDFViewer Suite. These templates are designed to reduce time spent on repetitive project and form setups, as well as improve onboarding for new VCL developers and boost productivity in experienced teams.

VCL PDF Viewer: Run and Test the Generated App

Tip

Refer to the following help topic for detailed information: Use PDF Viewer Project and Form Templates.

To see the TdxPDFViewer component in action, run the PDF Viewer demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Click different items in the sidebar on the left to switch between demo features.

Download: Compiled VCL Demos

Compiled DevExpress demos ship with source code installed in the Public Documents folder (%PUBLIC%) for all users (default). You can find all project and source code files for the PDF Viewer demo in the following folder:

%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressPDFViewer\

Main API Members

The list below outlines key members of the TdxPDFCustomViewer class. These members allow you to manage, view, and navigate PDF documents in code as well as configure related end-user functionality.

Appearance Settings

DialogsLookAndFeel
Allows you to override global skin and palette settings for all built-in dialogs displayed by the PDF Viewer control.
LookAndFeel
Allows you to override global skin and palette settings at the control level.
OptionsLockedStateImage
Provides access to Locked View image settings. The Locked View is displayed during document load operations.
OptionsView
Provides access to general appearance settings.
Transparent
Specifies if the control is transparent in GDI render mode.

Document Management APIs

Clear
Unloads the currently displayed PDF document.
IsDocumentLoaded
Identifies if a PDF document is loaded.
Document

Provides access to an internal container (a TdxPDFDocument instance) that stores the loaded PDF document and manages document content.

For example, you can call the Document.SaveToFile procedure to save the document.

LoadFromFile | LoadFromStream
Load a PDF document from a file or stream.
OnGetPassword
Allows you to specify a password for an encrypted PDF document without user interaction.
PageCount
Returns the number of pages in the displayed PDF document. You can also use this property to limit the number of displayed pages.
CurrentPageIndex
Specifies the current document page index.
GoToFirstPage | GoToLastPage
Display the first or last page of the current document.
GoToNextPage | GoToPrevPage
Navigate between adjacent document pages.
HandTool
Allows you to switch between Hand and Content Selection tools.
Highlights
Allows you to highlight document content.
IsFindPanelVisible
Identifies if the Find Panel is displayed.
OptionsFindPanel
Provides access to Find Panel settings.
OptionsNavigationPane
Provides access to Navigation Pane settings. To display the Navigation Pane, set the OptionsNavigationPane.Visible property to True.
ShowFindPanel | HideFindPanel
Display or hide the Find Panel.
TextSearch
Allows you to search text in the displayed document.
OnAttachmentOpen | OnAttachmentSave
Allow you to respond to operations with PDF document attachments.
OnHyperlinkClick
Allows you to override or complement the built-in hyperlink activation routine.
OnSelectionChanged
Allows you to track content selection changes.
OnSearchProgress
Allows you to track text search position/progress.
OnShowFindPanel | OnHideFindPanel
Allow you to respond to Find Panel visibility changes.
OptionsBehavior
Provides access to general component behavior and user interaction settings.
OptionsForm
Provides access to interactive PDF form-related settings.
OptionsZoom
Provides access to zoom-related settings.
PasswordAttemptsLimit

Specifies the number of password input attempts to load an encrypted PDF document.

Tip

You can handle the OnGetPassword event to specify required passwords for encrypted documents automatically.

RotationAngle | RotateClockwise | RotateCounterclockwise
Rotate the document view.
Selection
Allows you to manage content selection.
ZoomIn | ZoomOut
Zoom document content in or out.

Document View State Management APIs

The PDF Viewer control records every document view change (navigation, zoom, rotation, etc.) and allows users to retrace view steps.

CanGoToNextView | CanGoToPrevView
Identify whether the next and previous document view states are available.
ClearViewStateHistory
Deletes all recorded document view states.
GoToNextView | GoToPrevView
Navigate between recorded document view states.

General-Purpose API Members

BeginUpdate | CancelUpdate | EndUpdate
Allow you to avoid excessive redraw operations during batch document state and setting changes.
HitTest
Allows you to identify the visual element under the mouse pointer.

PDF Document API

You can create and use a TdxPDFDocument container separately from the TdxPDFViewer control to work with PDF documents in code without user interaction. Refer to the following topics for detailed information and code examples:

The TdxPDFViewerReportLink class implements print functionality for the TdxPDFViewer component.

Terminal TdxPDFCustomViewer Class Descendant

Do not use the TdxPDFCustomViewer class directly. Use the TdxPDFViewer control instead.

See Also