Pdf |
The PdfViewer type exposes the following members.
| Name | Description | |
|---|---|---|
| Close | Releases the resources used by this control | |
| CloseDocument | Closes the document displayed in the viewer. | |
| Dispose |
Clean up any resources being used.
(Overrides ContainerControlDispose(Boolean)) | |
| Find(String) | Searches the displayed document for a text (not case sensitive, also inside words). See Find(String, Boolean, Boolean). | |
| Find(String, Boolean, Boolean) | Searches the displayed document for a text, highlights every match and scrolls the first match from the current page on into view. SearchCompleted is raised with the number of matches when the whole document is searched. An empty text removes the highlights of the previous search. | |
| FindNext | Selects the next match of the last search (after the last match, the first one) and scrolls it into view. SearchCompleted is raised with the selected match. | |
| FindPrevious | Selects the previous match of the last search (before the first match, the last one) and scrolls it into view. SearchCompleted is raised with the selected match. | |
| GetPageCount(Stream) | A fast method to obtain the page count of a specified PDF document. | |
| GetPageCount(String) | A fast method to obtain the page count of a specified PDF document. | |
| GoBackwardStack | Goes to the previous view in the navigation history (for example back from a link), if it exists. | |
| GoForwardStack | Goes to the next view in the navigation history, if it exists. | |
| GoToFirstPage | Goes to the first page in the document. | |
| GoToLastPage | Goes to the last page in the document. | |
| GoToNextPage | Goes to the next page in the document, if it exists. | |
| GoToPreviousPage | Goes to the previous page in the document, if it exists. | |
| InstallWebView2Runtime | Installs the Evergreen Microsoft Edge WebView2 Runtime for the current user with Microsoft's installer (WebView2BootstrapperPath, run silently; it downloads the runtime) and waits for it, for up to 5 minutes. Returns true when the installer succeeded and the runtime is installed. Call it from a background thread: it blocks while the runtime is installed. | |
| LoadBytes | Opens and displays the PDF document in the specified byte array. | |
| LoadFile | Opens and displays the specified PDF file. | |
| LoadStream | Opens and displays the PDF document in the specified stream. The stream is read when the method is called. | |
| OnCurrentPageChanged | Raises the CurrentPageChanged event. | |
| OnDocumentLoaded | Raises the DocumentLoaded event. | |
| OnHandleCreated |
Starts the viewer when the control gets its window.
(Overrides ControlOnHandleCreated(EventArgs)) | |
| OnLoadError | Raises the LoadError event. | |
| OnPasswordRequired | Raises the PasswordRequired event. | |
| OnSearchCompleted | Raises the SearchCompleted event. | |
| Prints the document according to the options selected in the print dialog. This method returns immediately, even if the printing has not completed. NOTE: If security settings do not allow printing, this method will be ignored. | ||
| PrintAll | Prints the entire document on the default printer without displaying a dialog. This method returns immediately, even if the printing has not completed. Use PrintAsync(Int32, Int32, String) to know the result. | |
| PrintAllFit | Prints the entire document on the default printer without displaying a dialog. This method returns immediately, even if the printing has not completed. | |
| PrintAsync | Prints pages of the document without displaying a dialog. | |
| PrintPages | Prints the specified pages on the default printer without displaying a dialog. This method returns immediately, even if the printing has not completed. | |
| PrintPagesFit | Prints the specified pages on the default printer without displaying a dialog. This method returns immediately, even if the printing has not completed. | |
| PrintWithDialog | Prints the document according to the options selected in the print dialog. This method returns immediately, even if the printing has not completed. NOTE: If security settings do not allow printing, this method will be ignored. | |
| ReloadPdfDocument | Call this method to reload the currently loaded PDF document after changing the PdfViewerPreferences or the PdfSecurityOptions. | |
| RemoveProductLogo | Call this method to remove the product logo image when no PDF document is loaded in the viewer. | |
| SetCurrentHighlight | Highlights the specified rectangle on the current page. A rectangle with no width or height removes the highlight. | |
| SetCurrentPage | Goes to the specified page in the document. | |
| SetLayoutMode | Sets the layout mode for a page view according to the specified string. | |
| SetNamedDest | Changes the page view to the named destination in the specified string. | |
| SetPageMode | Sets the page mode according to the specified string. | |
| SetShowScrollbars | Determines whether scrollbars will appear in the document view. | |
| SetShowToolbar | Determines whether the toolbar will appear in the viewer. | |
| SetView | Sets the view of a page according to the specified string. | |
| SetViewRect | Scrolls and zooms the current page so that the specified rectangle fills the view. | |
| SetViewScroll | Sets the view of a page according to the specified string, and scrolls the page by the specified offset. | |
| SetZoom | Sets the magnification according to the specified value. | |
| SetZoomScroll | Sets the magnification according to the specified value, and scrolls the current page so that the specified point is at the top left corner of the view. |