Tallcomponents PDFControls.NET 2.0 v2.0.100.0 » Developer.Team - Developers Paradise!

Tallcomponents PDFControls.NET 2.0 v2.0.100.0

Tallcomponents PDFControls.NET 2.0 v2.0.100.0
Tallcomponents PDFControls.NET 2.0 v2.0.100.0


In essence, PDFControls.NET provides a number of WinForms Viewer Controls that allow one to View PDF documents. The professional edition adds the ability to manipulate and save PDF documents.

Viewer class hierarchy

These classes provide the following functionality:

DocumentViewer: this is the base class for all viewers that show PDF documents. Next to viewing, it offers basic navigation functionality such as zooming and panning.
ThumbnailsViewer: this is a special document viewer that shows all pages as thumbnails. If its PagesViewer property is set, it will mark the pages that are visible in the PagesViewer by means of red rectangle. In addition, clicking on a thumbnail will have the pages viewer navigate to that page.
PagesViewer: this is a special document viewer that adds the notion of a “current” page. In contrast to the StandardPagesViewer (see below), the PagesViewer can be used in the professional edition as a basis for a highly customized viewer. As a result, the PagesViewer is often of interest in the professional edition only.
StandardPagesViewer: this is special pages viewer that adds a number of convenient common features. These features resemble (and extend) the features of the version 1 PagesViewer. This makes it possible to easily obtain a very powerful viewer. In general however, it is more difficult to customize this viewer, as new features may conflict with existing ones. The latter however is only relevant for the professional edition.

Features
View, edit and print PDF documents
Navigate through bookmarks and links
Zooming, pan, select, copy and search text
Fill out fields and submit form data
Interactive notes and markup
jаvascript is executed as expected
Override painting and interaction
Background and progressive rendering
Render layers selectively

The code above is all that is needed to obtain a viewer that:

Show all pages of a PDF document
Allows scrolling via scroll bars
Allows panning by dragging the mouse
Supports page navigation by clicking on links
Allows Filling out form fields (professional only)

StandardPagesViewer
The StandardPagesViewer offers a viewer that derives from the PagesViewer class. It can be used in exactly the same way as the PagesViewer, but it offers a number of common extras:

A CursorMode. This mode controls how clicking and dragging operates. Next to a “normal” mode this includes a mode that allows one to select text (SelectText), various modes that allow one to zoom to a particular area (ZoomIn, ZoomOut, ZoomToSelection), and a mode that allows one to select and edit annotations (SelectAnnotations).
A ZoomMode that defines whether the viewer should maintain a particular zoomed view on the document. This includes FitEntirePage and FitPageWidth.
A TextSelectMode (when CursorMode == SelectText). This allows one to either select entire words, or separate characters.
A ZoomFactors property and ZoomIn()/ZoomOut() methods.
RotatePageLeft() and RotatePageRight() methods.
The EnableAnnotations property, which enables or disables all annotations at once.
The HighlightAnnotations property, which marks all annotations with a color when set.
The ShowOverflowMarker property which controls whether an overflow marker is shown when there is more text in a field than it can display.
Events that fire when annotations get resized (when CursorMode = SelectAnnotations).

The StandardPagesViewer implements these features via a custom LayoutManager, and - in the professional edition -, with custom interactor factories. We do not recommend changing these for the StandardPagesViewer, as this will lead to undefined behavior.

Thumbnails Viewer
Using a thumbnails viewer proceeds in much the same way. Note that both the PagesViewer and the ThumbnailsViewer classes derive from the same DocumentViewer class. So, one can view thumbnails by using exactly the same code as for the PagesViewer, after assigning a Document instance to the Document property of the ThumbnailsViewer.

If one also assigns a PagesViewer instance to the PagesViewer property of the thumbnails viewer, it will indicate which page is currently visible in the PagesViewer and when a user clicks on a thumbnail image, it will navigate the PagesViewer to that page.

Compile and run the ThumbnailsViewer sample to see this in action.

Bookmarks Viewer
The BookmarksViewer does not show PDF pages, but it shows the bookmark tree that is defined in the document (if any). Its use is completely analogous to that of the ThumbnailsViewer.

If one assigns a PagesViewer instance to the PagesViewer property of the BookmarksViewer, it will have the PagesViewer navigate to the right page when a user clicks in a bookmark.

Compile and run the BookmarksViewer sample to see this in action. Please note that you will have to open a PDF document with bookmarks in order for the BookmarksViewer to show anything.

Only for V.I.P
Warning! You are not allowed to view this text.