Click or drag to resize

PDFViewCtrl Class

PDFViewCtrl is a utility class that can be used for interactive rendering of PDF documents. PDFViewCtrl is derived from Windows.UI.Xaml.Controls.ContentControl and it can be used like a regular Control (see PDFViewCtrlDemo for a concrete example). PDFViewCtrl defines several coordinate spaces and it is important to understand their differences: Page Space refers to the space in which a PDF page is defined. It is determined by a page itself and the origin is at the lower-left corner of the page. Note that Page Space is independent of how a page is viewed in PDFView and each page has its own Page space. Canvas Space refers to the tightest axis-aligned bounding box of all the pages given the current page presentation mode in PDFView. For example, if the page presentation mode is e_single_continuous, all the pages are arranged vertically with one page in each row, and therefore the Canvas Space is rectangle with possibly large height value. For this reason, Canvas Space is also, like Page Space, independent of the zoom factor. Also note that since PDFView adds gaps between adjacent pages, the Canvas Space is larger than the space occupied by all the pages. The origin of the Canvas Space is located at the upper-left corner. Screen Space (or Client Space) is the space occupied by PDFView and its origin is at the upper-left corner. Note that the virtual size of this space can extend beyond the visible region. Scrollable Space is the virtual space within which PDFView can scroll. It is determined by the Canvas Space and the current zoom factor. Roughly speaking, the dimensions of the Scrollable Space is the dimensions of the Canvas Space timed by the zoom. Therefore, a large zoom factor will result in a larger Scrollable region given the same Canvas region. For this reason, Scrollable Space might also be referred to as Zoomed Canvas Space. Note that since PDFView adds gaps between pages in Canvas Space and these gaps are not scaled when rendered, the scrollable range is not exactly what the zoom factor times the Canvas range. For functions such as SetHScrollPos(), SetVScrollPos(), GetCanvasHeight(), and GetCanvasWidth(), it is the Scrollable Space that is involved.
Remarks
Due to the Nature of C++/CX, subscribing to any event of the PDFViewCtrl will create a reference cycle. Therefore, it is important to unsubscibe to these events when the PDFViewCtrl is no longer needed. In general, this can be done in the OnNavigatedFrom function of a Windows.UI.Xaml.Controls.Page.
Inheritance Hierarchy
SystemObject
  DependencyObject
    UIElement
      FrameworkElement
        Control
          ContentControl
            pdftron.PDFPDFViewCtrl

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class PDFViewCtrl : ContentControl, 
	IClosable

The PDFViewCtrl type exposes the following members.

Constructors
  NameDescription
Public methodPDFViewCtrl
Default PDFViewCtrl constructor.
Top
Properties
  NameDescription
Public propertyAccessKey (Inherited from UIElement.)
Public propertyAccessKeyScopeOwner (Inherited from UIElement.)
Public propertyActualHeight (Inherited from FrameworkElement.)
Public propertyActualOffset (Inherited from UIElement.)
Public propertyActualSize (Inherited from UIElement.)
Public propertyActualTheme (Inherited from FrameworkElement.)
Public propertyActualWidth (Inherited from FrameworkElement.)
Public propertyAllowDrop (Inherited from UIElement.)
Public propertyAllowFocusOnInteraction (Inherited from FrameworkElement.)
Public propertyAllowFocusWhenDisabled (Inherited from FrameworkElement.)
Public propertyAnimateAllPageFlipping
Gets or sets whether to use animations when flipping pages using non-touch
Public propertyStatic memberAnimateAllPageFlippingProperty
Dependency property to animate page flipping when not using touch
Public propertyBackground (Inherited from Control.)
Public propertyBackgroundSizing (Inherited from Control.)
Public propertyBaseUri (Inherited from FrameworkElement.)
Public propertyBorderBrush (Inherited from Control.)
Public propertyBorderThickness (Inherited from Control.)
Public propertyCacheMode (Inherited from UIElement.)
Public propertyCanBeScrollAnchor (Inherited from UIElement.)
Public propertyCanDrag (Inherited from UIElement.)
Public propertyCanFlipPages
Gets or sets whether flipping pages in non-continuous modes using a finger is possible
Public propertyStatic memberCanFlipPagesProperty
Dependency property to enable or disable flipping pages in non-continuous modes using a finger
Public propertyCenterPoint (Inherited from UIElement.)
Public propertyCharacterSpacing (Inherited from Control.)
Public propertyClip (Inherited from UIElement.)
Public propertyCompositeMode (Inherited from UIElement.)
Public propertyContent (Inherited from ContentControl.)
Public propertyContentTemplate (Inherited from ContentControl.)
Public propertyContentTemplateRoot (Inherited from ContentControl.)
Public propertyContentTemplateSelector (Inherited from ContentControl.)
Public propertyContentTransitions (Inherited from ContentControl.)
Public propertyContextFlyout (Inherited from UIElement.)
Public propertyConvertedPages
Gets the number of pages that have been converted since starting the conversion with OpenUniversalDocument
Public propertyCornerRadius (Inherited from Control.)
Public propertyDataContext (Inherited from FrameworkElement.)
Public propertyDefaultStyleResourceUri (Inherited from Control.)
Public propertyDesiredSize (Inherited from UIElement.)
Public propertyDispatcher (Inherited from DependencyObject.)
Public propertyElementSoundMode (Inherited from Control.)
Public propertyExitDisplayModeOnAccessKeyInvoked (Inherited from UIElement.)
Public propertyFlowDirection (Inherited from FrameworkElement.)
Public propertyFocusState (Inherited from Control.)
Public propertyFocusVisualMargin (Inherited from FrameworkElement.)
Public propertyFocusVisualPrimaryBrush (Inherited from FrameworkElement.)
Public propertyFocusVisualPrimaryThickness (Inherited from FrameworkElement.)
Public propertyFocusVisualSecondaryBrush (Inherited from FrameworkElement.)
Public propertyFocusVisualSecondaryThickness (Inherited from FrameworkElement.)
Public propertyFontFamily (Inherited from Control.)
Public propertyFontSize (Inherited from Control.)
Public propertyFontStretch (Inherited from Control.)
Public propertyFontStyle (Inherited from Control.)
Public propertyFontWeight (Inherited from Control.)
Public propertyForeground (Inherited from Control.)
Public propertyHasDocument
Gets whether or not the PDFViewCtrl has a document. Useful as a first stop when marshaling the UI thread to interact with the PDFViewCtrl
Public propertyHeight (Inherited from FrameworkElement.)
Public propertyHighContrastAdjustment (Inherited from UIElement.)
Public propertyHorizontalAlignment (Inherited from FrameworkElement.)
Public propertyHorizontalContentAlignment (Inherited from Control.)
Public propertyIsAccessKeyScope (Inherited from UIElement.)
Public propertyIsConverting
Gets whether or not the PDFViewCtrl is currently converting a document to PDF. Use the OnConversionChanged event to detect changes to this property
Public propertyIsCurrentlyFlipping
Gets whether the PDFViewCtrl is currently in motion flipping pages in a non-continuous mode
Public propertyIsCurrentlyZooming
Gets whether the PDFViewCtrl is currently going through a zoom motion, for example through pinch or smart zoom animation During this time, many functions will not work as expected
Public propertyIsDoubleTapEnabled (Inherited from UIElement.)
Public propertyIsEnabled (Inherited from Control.)
Public propertyIsFocusEngaged (Inherited from Control.)
Public propertyIsFocusEngagementEnabled (Inherited from Control.)
Public propertyIsHitTestVisible (Inherited from UIElement.)
Public propertyIsHoldingEnabled (Inherited from UIElement.)
Public propertyIsLoaded (Inherited from FrameworkElement.)
Public propertyIsRightTapEnabled (Inherited from UIElement.)
Public propertyIsTabStop (Inherited from Control.)
Public propertyIsTapEnabled (Inherited from UIElement.)
Public propertyIsTextScaleFactorEnabled (Inherited from Control.)
Public propertyKeyboardAcceleratorPlacementMode (Inherited from UIElement.)
Public propertyKeyboardAcceleratorPlacementTarget (Inherited from UIElement.)
Public propertyKeyboardAccelerators (Inherited from UIElement.)
Public propertyKeyTipHorizontalOffset (Inherited from UIElement.)
Public propertyKeyTipPlacementMode (Inherited from UIElement.)
Public propertyKeyTipTarget (Inherited from UIElement.)
Public propertyKeyTipVerticalOffset (Inherited from UIElement.)
Public propertyLanguage (Inherited from FrameworkElement.)
Public propertyLights (Inherited from UIElement.)
Public propertyManipulationMode (Inherited from UIElement.)
Public propertyMargin (Inherited from FrameworkElement.)
Public propertyMaxHeight (Inherited from FrameworkElement.)
Public propertyMaxWidth (Inherited from FrameworkElement.)
Public propertyMinHeight (Inherited from FrameworkElement.)
Public propertyMinWidth (Inherited from FrameworkElement.)
Public propertyName (Inherited from FrameworkElement.)
Public propertyOpacity (Inherited from UIElement.)
Public propertyOpacityTransition (Inherited from UIElement.)
Public propertyPadding (Inherited from Control.)
Public propertyParent (Inherited from FrameworkElement.)
Public propertyPointerCaptures (Inherited from UIElement.)
Public propertyPreviousAndNextButtonVisibility
Gets or sets whether to show the previous and next buttons when using a mouse
Public propertyStatic memberPreviousAndNextButtonVisibilityProperty
Dependency property to show the previous and next buttons when using a mouse
Public propertyProjection (Inherited from UIElement.)
Public propertyRenderSize (Inherited from UIElement.)
Public propertyRenderTransform (Inherited from UIElement.)
Public propertyRenderTransformOrigin (Inherited from UIElement.)
Public propertyRequestedTheme (Inherited from FrameworkElement.)
Public propertyRequiresPointer (Inherited from Control.)
Public propertyResources (Inherited from FrameworkElement.)
Public propertyRotation (Inherited from UIElement.)
Public propertyRotationAxis (Inherited from UIElement.)
Public propertyRotationTransition (Inherited from UIElement.)
Public propertyScale (Inherited from UIElement.)
Public propertyScaleTransition (Inherited from UIElement.)
Public propertyShadow (Inherited from UIElement.)
Public propertyStyle (Inherited from FrameworkElement.)
Public propertyTabFocusNavigation (Inherited from UIElement.)
Public propertyTabIndex (Inherited from Control.)
Public propertyTabNavigation (Inherited from Control.)
Public propertyTag (Inherited from FrameworkElement.)
Public propertyTemplate (Inherited from Control.)
Public propertyThumbnailResponseHandler
Gets a PDFViewCtrlThumbnailRequestHandler that can be used to receive Thumbnails from the PDFViewCtrl in a background thread.
Public propertyTransform3D (Inherited from UIElement.)
Public propertyTransformMatrix (Inherited from UIElement.)
Public propertyTransitions (Inherited from UIElement.)
Public propertyTranslation (Inherited from UIElement.)
Public propertyTranslationTransition (Inherited from UIElement.)
Public propertyTriggers (Inherited from FrameworkElement.)
Public propertyUIContext (Inherited from UIElement.)
Public propertyUseLayoutRounding (Inherited from UIElement.)
Public propertyUseSystemFocusVisuals (Inherited from Control.)
Public propertyVerticalAlignment (Inherited from FrameworkElement.)
Public propertyVerticalContentAlignment (Inherited from Control.)
Public propertyVisibility (Inherited from UIElement.)
Public propertyWidth (Inherited from FrameworkElement.)
Public propertyXamlRoot (Inherited from UIElement.)
Public propertyXYFocusDown (Inherited from Control.)
Public propertyXYFocusDownNavigationStrategy (Inherited from UIElement.)
Public propertyXYFocusKeyboardNavigation (Inherited from UIElement.)
Public propertyXYFocusLeft (Inherited from Control.)
Public propertyXYFocusLeftNavigationStrategy (Inherited from UIElement.)
Public propertyXYFocusRight (Inherited from Control.)
Public propertyXYFocusRightNavigationStrategy (Inherited from UIElement.)
Public propertyXYFocusUp (Inherited from Control.)
Public propertyXYFocusUpNavigationStrategy (Inherited from UIElement.)
Top
Methods
  NameDescription
Public methodActivate
Reactivates the PDFViewCtrl after a call to Deactivate. Rendering, FindText, thumbnail requests, etc, will not work until the PDFViewWPF has been reactivated.
Public methodAddHandler (Inherited from UIElement.)
Public methodAllowScrollOnKeyPresses
Tells PDFViewCtrl whether or not it should handle Scrolling when for example an arrow key is pressed
Public methodApplyTemplate (Inherited from Control.)
Public methodArrange (Inherited from UIElement.)
Public methodCancelAllThumbRequests
Cancels all thumbnail requests initiated by GetThumbAsync(int pageNum). See GetThumbAsync(int pageNum) for more information.
Public methodCancelDirectManipulations (Inherited from UIElement.)
Public methodCancelFindText
Public methodCancelRendering
Cancels rendering in progress. If PDFViewCtrl is not busy rendering the page, the function has no side effects.
Public methodCanRedo
Checks if redo operation is available
Public methodCanUndo
Checks if undo operation is available
Public methodCapturePointer (Inherited from UIElement.)
Public methodClearSelection
Remove any text selection.
Public methodClearThumbCache
Remove all thumbnails from the persistent disk cache.
Public methodClearValue (Inherited from DependencyObject.)
Public methodClose
Public methodCloseDoc
Closes the document currently opened in PDFViewCtrl.
Public methodConnectDocAndResume
This will load a document and start rendering it again without affecting the visual layout of the PDFViewCtrl. Use this after the app resumes after being suspended.
Public methodConvAnnotationCanvasPtToScreenPt
Converts a point expressed in AnnotationCanvas (GetAnnotationCanvas()) space to a point in screen space.
Public methodConvCanvasPtToPagePt
Converts a point expressed in canvas space to a point on a page space.
Public methodConvCanvasPtToScreenPt(DoubleRef, DoubleRef)
Converts a point expressed in canvas space to a point in sceen space.
Public methodConvCanvasPtToScreenPt(DoubleRef, DoubleRef, Int32)
Converts a point expressed in canvas space to a point in sceen space.
Public methodConvPagePtToCanvasPt
Converts a point expressed in a page space to a point in canvas space.
Public methodConvPagePtToScreenPt
Converts a point in a page space to a point in screen space.
Public methodConvScreenPtToAnnotationCanvasPt(DoubleRef, DoubleRef)
Converts a point expressed in screen space to a point in AnnotationCanvas (GetAnnotationCanvas()) space.
Public methodConvScreenPtToAnnotationCanvasPt(DoubleRef, DoubleRef, Int32)
Converts a point expressed in screen space to a point in AnnotationCanvas (GetAnnotationCanvas()) space.
Public methodConvScreenPtToCanvasPt(DoubleRef, DoubleRef)
Converts a point expressed in screen space to a point in canvas space.
Public methodConvScreenPtToCanvasPt(DoubleRef, DoubleRef, Int32)
Converts a point expressed in screen space to a point in canvas space.
Public methodConvScreenPtToPagePt
Converts a point in screen space to a point in a page space.
Public methodCopySelectedTextToClipboardAsUnicode
Copys the text current selected text to clipboard as unicode.
Public methodDeactivate
This will stop rendering and then remove any content that is not visible on the screen. Use Activate to reactivate the PDFViewCtrl.
Public methodDocLock
Locks the PDFDoc instance used by PDFViewCtrl. Simultaneous access to a PDFDoc instance is not allowed. Since PDFViewCtrl renders a PDFDoc in a rendering thread, UI access to the same PDFDOc instance should lock the document first and then unlock it with DocUnlock afterwards.
Public methodDocLockRead
Locks the PDFDoc instance used by PDFViewCtrl to prevent competing write threads (using Lock()) from accessing the document at the same time. Other reader threads however, will be allowed to access the document. Threads attempting to obtain write access to the document will wait in suspended state until the thread that owns the lock calls doc.UnlockRead().
Public methodDocTryLock
Tries to lock the PDFDoc instance used by PDFViewCtrl in non-blocking manner.
Public methodDocTryLock(Int32)
Tries to lock the PDFDoc instance used by PDFViewCtrl in non-blocking manner.
Public methodDocTryLockRead
Tries to obtain a read lock for the PDFDoc instance used by PDFViewCtrl for reading in non-blocking manner.
Public methodDocTryLockRead(Int32)
Tries to obtain a read lock for the PDFDoc instance used by PDFViewCtrl for reading in non-blocking manner.
Public methodDocUnlock
Unlocks the PDFDoc instance used by PDFViewCtrl and restarts the rendering thread if it was canceled by calling DocLock.
Public methodDocUnlockRead
Removes the read lock from the PDFDoc instance used by PDFViewCtrl
Public methodEnableExternalAnnotManager(String)
Public methodEnableExternalAnnotManager(String, ExternalAnnotManagerMode)
Public methodEnableUndoRedo
Enables Undo/Redo on the document.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecuteAction(Action)
Requests action object to be executed by PDFViewCtrl. Action must belong to the document currently displayed in PDFViewCtrl.
Public methodExecuteAction(ActionParameter)
Requests action object to be executed by PDFViewCtrl. Action must belong to the document currently displayed in PDFViewCtrl.
Public methodFindName (Inherited from FrameworkElement.)
Public methodFindTextAsync(String, Boolean, Boolean, Boolean, Boolean)
Selects text by searching for a given string of text. Note that to cancel the text search, use PDFViewCtrl.CancelFindText, as opposed to canceling the operation that is returned.
Public methodFindTextAsync(String, Boolean, Boolean, Boolean, Boolean, Int32)
Selects text by searching for a given string of text. Note that to cancel the text search, use PDFViewCtrl.CancelFindText, as opposed to canceling the operation that is returned.
Public methodFocus (Inherited from Control.)
Public methodFreeResources
This will clean up all native resources, as well as file handles and similar. However, managed resources will remain until cleaned up by the garbage collector.
Public methodGetAnimationBaseValue (Inherited from DependencyObject.)
Public methodGetAnnotAt(Int32, Int32)
Gets the annotation at the (x, y) position expressed in screen coordinates.
Public methodGetAnnotAt(Int32, Int32, Double, Double)
Gets the annotation at the (x, y) position expressed in screen coordinates.
Public methodGetAnnotationCanvas
Gets the canvas that floats above the PDF for use in drawing temporary annotations.
Public methodGetAnnotationCanvasHorizontalOffset
Gets the current horizontal scroll position of the AnnotationCanvas. Note: Due to a problem with the ScrollViewer, content at offsets greater than 2^21 are not shown inside the ScrollViewer Therefore, we have had to change the structure a little, while preserving the visual appearance of the ScrollViewer, the actual visual tree might look different. Therefore, when adding UI elements to the AnnotationCanvas, use this instead of GetHSrollPos() to calculate the position when, for example, converting from screen space to the Annotation canvas's space.
Public methodGetAnnotationCanvasTopLeftCorner
Gets the offset of the AnnotationCanvas from the top left of the PDFViewCtrl (Relevant if zoomed out far).
Public methodGetAnnotationCanvasVerticalOffset
Gets the current vertical scroll position of the AnnotationCanvas. Note: Due to a problem with the ScrollViewer, content at offsets greater than 2^21 are not shown inside the ScrollViewer Therefore, we have had to change the structure a little, while preserving the visual appearance of the ScrollViewer, the actual visual tree might look different. Therefore, when adding UI elements to the AnnotationCanvas, use this instead of GetVSrollPos() to calculate the position when, for example, converting from screen space to the Annotation canvas's space.
Public methodGetAnnotationListAt
Gets the list of annotations at line (x1, y1, x2, y2) expressed in screen coordinates
Public methodGetBindingExpression (Inherited from FrameworkElement.)
Public methodGetCanvasHeight
Gets the height of the scrollable space.
Public methodGetCanvasWidth
Gets the width of the scrollable space.
Public methodGetColorPostProcessMode
Public methodGetContentBoundingBox
Gets a tight bounding box around all the pages on the current canvas.
Public methodGetCurrentPage
Gets the current page displayed in the view.
Public methodGetDeviceTransform
Gets device transformation matrix from current page
Public methodGetDeviceTransform(Int32)
Gets device transformation matrix from current page
Public methodGetDoc
Gets Currently associated document with this PDFViewCtrl.
Public methodGetExternalAnnotManager
Public methodGetFindTextProgress
Returns the progress of the FindTextAsync
Public methodGetFindTextProgressAsFactor
Returns the progress of the FindTextAsync
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetHScrollPos
Gets the current horizontal scroll position in scrollable space.
Public methodGetLinkAt
Gets the link info at a given point, specified in client space.
Public methodGetNextRedoInfo
Obtains the meta info associated with the next Redo state.
Public methodGetNextUndoInfo
Obtains the meta info associated with the next Undo state.
Public methodGetOCGContext
Public methodGetPageBox
Gets the box used by PDFViewCtrl for rasterizing.
Public methodGetPageCount
Gets the total number of pages in the document.
Public methodGetPageNumberFromScreenPoint
Gets the number of the page located under the given screen coordinate. A positive number indicates a valid page, whereas a number less than 1 indicates no page was found.
Public methodGetPagePresentationMode
Gets the current page presentation mode.
Public methodGetPageRectForAnnot
Return the annotation rect in screen points
Public methodGetPageRefViewMode
Gets the reference page view mode. See more details about reference page view mode in SetPageRefViewMode(int).
Public methodGetPageViewMode
Gets the current page view mode. Note: It is possible for the view to appear to have a specifiv view mode, while it is in e_zoom. If this is a concern, use GetZoomForViewMode and comapre it to the current zoom.
Public methodGetPostProcessedColor
Returns the resulting color of post processing colorPoint as specified through SetColorPostProcessMode or SetColorPostProcessColors
Public methodGetProgressiveRendering
Gets whether the control will render progressively or will just draw once the entire view has been rendered.
Public methodGetRightToLeftLanguage
Returns true if the PDFViewCtrl is currently in right to left reading mode. false otherwise.
Public methodGetRotation
Gets the current rotation of this PDFViewCtrl.
Public methodGetScreenRectForAnnot
Return the annotation rect in screen points
Public methodGetScrollBarVisibility
Gets the visibility settings for the PDFViewCtrl's ScrollBars.
Public methodGetScrollEnabled
Gets if scroll is currently enabled or disabled.
Public methodGetScrollViewer
Gets the internal PDFViewCtrl ScrollViewer used to scroll the PDF pages.
Public methodGetSelection
Gets Current text selection for a given page. If there is only selection on one page, then page number does not need to be provided.
Public methodGetSelection(Int32)
Gets the selection on the given page number
Public methodGetSelectionBeginPage
Gets the first page number that has text selection on it. Useful when there are selections on multiple pages at the same time.
Public methodGetSelectionEndPage
Gets the last page number that has text selection on it. Useful when there are selections on multiple pages at the same time.
Public methodGetThumbAsync
This will request a thumbnail for the page given by pageNum. When the thumbnail is ready, the OnThumbnailGenerated event will be raised with the finished thumbnail. If multiple requests are made, the thumbnail requests will be processed starting with the last request. The exception is that the current thumbnail being rendered will always finish. It is recommended to cancel all thumbnail requests once they are not needed any more, using PDFViewCtrl.CancelAllThumbRequests(); If caching is enabled, this request will be much faster once the thumb has been rendered once. You can enable caching by using pdftron.PDFNet.SetViewerCache and pdftron.PDFNet.SetDefaultDiskCachingEnabled(true);
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue (Inherited from DependencyObject.)
Public methodGetViewHeight
Gets the width of the main view in pixels.
Public methodGetViewWidth
Gets the width of the main view in pixels.
Public methodGetVisiblePages
Gets the pages that are currently visible on the screen
Public methodGetVScrollPos
Gets the current vertical scroll position in scrollable space.
Public methodGetZoom
Gets current zoom (or scaling) component used to display the page content.
Public methodGetZoomAnimationTarget
If IsAnimatingZoom returns true, then this function will return the zoom factor that is the target for the animation.
Public methodGetZoomEnabled
Gets if zoom is currently enabled or disabled.
Public methodGetZoomForViewMode
Calculates the zoom the current view would get if mode was used in SetPageViewMode
Public methodGotoFirstPage
Sets the current page to the first page in the document.
Public methodGotoLastPage
Sets the current page to the last page in the document.
Public methodGotoNextPage
Sets the current page to the next page in the document.
Public methodGotoPreviousPage
Sets the current page to the previous page in the document.
Public methodHasSelection
checks if there is selection
Public methodHasSelectionOnPage
checks if given page number has any text selection on it. Useful when there are selections on multiple pages at the same time.
Public methodHideAnnotation
Disable rendering of a particular annotation. This does not change the annotation itself, just how it is displayed in this viewer instance.
Public methodInvalidateArrange (Inherited from UIElement.)
Public methodInvalidateMeasure (Inherited from UIElement.)
Public methodIsAnimatingZoom
Returns true if the PDFViewCtrl is currently animating to a new positon throught SmartZoom, SetPageViewMode, or SetZoom, when the 'animate' flag is set to true.
Public methodIsFinishedRendering
checks if the rendering thread has finished.
Public methodIsFinishedRendering(Boolean)
checks if the rendering thread has finished or the current visible region has been fully rendered.
Public methodMeasure (Inherited from UIElement.)
Public methodOpenUniversalDocument
Sets the PDF document to be displayed.
Public methodOpenURLAsync(String)
Open a PDF file at the given url. This works best with PDF's that are linearized, as pages can be downloaded and viewed in random access order, without the need to download the entire document.
Public methodOpenURLAsync(String, String, String)
Open a PDF file at the given url. This works best with PDF's that are linearized, as pages can be downloaded and viewed in random access order, without the need to download the entire document. A viewing session can also be persisted across multiple viewing/application sessions to remove redundant downloads and improve overall performance by using the optional cache_pdf parameter.
Public methodOpenURLAsync(String, String, String, HTTPRequestOptions)
Open a PDF file at the given url. This works best with PDF's that are linearized, as pages can be downloaded and viewed in random access order, without the need to download the entire document. A viewing session can also be persisted across multiple viewing/application sessions to remove redundant downloads and improve overall performance by using the optional cache_pdf parameter.
Public methodPauseAndDisconnectDoc
This will close the document, but leave the visual appearance of the PDFViewCtrl intact. This can be used when the App is being suspended so that the Stream associated with the document can be released. Use this in conjunction with ConnectDocAndResume to repopulate the PDFViewCtrl when the app gets resumed.
Public methodPopulatePropertyInfo (Inherited from UIElement.)
Public methodReadLocalValue (Inherited from DependencyObject.)
Public methodRedo
Performs Redo.
Public methodRefreshAndUpdate
Helper function that will refresh annotation and/or field appearance if needed, and then render modified page areas, all based on the content of the view_change parameter.
Public methodStatic memberRegisterDependencyProperties
Occurs when the pointer device initiates a Press action within this element. (Inherited from UIElement)
Public methodRegisterPropertyChangedCallback (Inherited from DependencyObject.)
Public methodReleasePointerCapture (Inherited from UIElement.)
Public methodReleasePointerCaptures (Inherited from UIElement.)
Public methodRemoveFocusEngagement (Inherited from Control.)
Public methodRemoveHandler (Inherited from UIElement.)
Public methodRequestRendering
Requests that PDFViewCtrl start rendering, if necessary.
Public methodRevertAllChanges
Discards all changes.
Public methodRotateClockwise
Rotates all pages in the document 90 degrees clockwise.
Public methodRotateCounterClockwise
Rotates all pages in the document 90 degrees counter-clockwise.
Public methodSelect(Highlights)
Selects texts identified by Highlights.
Public methodSelect(PDFViewCtrlSelection)
Selects a region according to a PDFViewSelection object.
Public methodSelect(Double, Double, Double, Double)
Selects text within the given region using the current text selection mode.
Public methodSelect(Double, Double, Int32, Double, Double, Int32)
Selects text using structural mode given two points on two pages.
Public methodSelectAll
Selects all text on the page.
Public methodSelectWithSmartSnapping
Public methodSelectWithSnapping
Public methodSetAntiAliasing
Enable or disable anti-aliasing. Anti-Aliasing is a technique used to improve the visual quality of images when displaying them on low resolution devices (for example, low DPI computer monitors).
Public methodSetBackgroundColor
Sets the default background color used to paint the area surrounding each page.
Public methodSetBinding (Inherited from FrameworkElement.)
Public methodSetCaching
Enables of disables caching of images, fonts, and other resources. Disabling caching can lower memory requirements at the expense of rendering speed.
Public methodSetColorPostProcessColors
Set the color post processing transformation. This transform is applied to the rasterized bitmap as the final step in the rasterization process, and is applied directly to the resulting bitmap(disregarding any color space information). Color post processing only supported for RGBA output. This mode will map the brightness of the original rasterized bitmap to a gradient between whiteColor and blackColor
Public methodSetColorPostProcessMode
Set the color post processing transformation. This transform is applied to the rasterized bitmap as the final step in the rasterization process, and is applied directly to the resulting bitmap (disregarding any color space information). Color post processing only supported for RGBA output.
Public methodSetCurrentPage
Sets the current page to the given page.
Public methodSetDefaultPageColor
Sets the default 'paper' color used to draw background of each page.
Public methodSetDoc
Associates this PDFViewCtrl with a given PDF document.
Public methodSetDrawAnnotations
Enable or disable annotation and forms rendering. By default, all annotations and form fields are rendered.
Public methodSetGamma
Sets the gamma factor used for anti-aliased rendering. Gamma correction can be used to improve the quality of anti-aliased image output and can (to some extent) decrease the appearance common anti-aliasing artifacts (such as pixel width lines between polygons).
Public methodSetHighlightFields
Enable or disable highlighting form fields. Default is disabled.
Public methodSetHorizontalAlign
Sets the horizontal alignment used for rendering pages within the view.
Public methodSetHScrollPos
Sets the horizontal scroll position in scrollable space.
Public methodSetImageSmoothing
Enable or disable image smoothing. The rasterizer allows a trade-off between rendering quality and rendering speed. This function can be used to indicate the preference between rendering speed and quality.
Public methodSetOCGContext
Public methodSetOverprint
Enable or disable support for overprint. Overprint is a device dependent feature and the results will vary depending on the output color space and supported colorants (i.e. CMYK, CMYK+spot, RGB, etc). By default overprint is enabled for only PDF/X files.
Public methodSetPageBorderVisibility
Enables or disables drawing of a thin border around each page.
Public methodSetPageBox
Selects the PageBox to rasterize. PDFViewCtrl will clip pages according to their PageBox as selected here.
Public methodSetPagePresentationMode
Sets the current page presentation mode.
Public methodSetPageRefViewMode
Sets the reference page view mode. In a non-continous page presentation mode, the reference page view mode is used to determine the page view mode upon a page change event. For example, if the reference page view mode is set to e_fit_width, the new page coming in will be displayed with width-fit mode. If the reference view mode is set to e_zoom, it means that zoom will be maintained between pages.
Public methodSetPageSpacing
Sets the vertical and horizontal padding and column spacing between adjacent pages in the view.
Public methodSetPageTransparencyGrid
Enables or disables the transparency grid (check board pattern) to reflect page transparency.
Public methodSetPageViewMode(PDFViewCtrlPageViewMode)
Sets the new page viewing mode. The default PageView mode is e_fit_width.
Public methodSetPageViewMode(PDFViewCtrlPageViewMode, Double, Double, Boolean)
Sets the new page viewing mode. The default PageView mode is e_fit_width. Will maintain the position of x, y
Public methodSetPathHinting
Enable or disable path hinting. Path hinting is used to slightly adjust paths in order to avoid or alleviate artifacts of hair line cracks between certain graphical elements. This option is turned on by default.
Public methodSetProgressiveRendering
Sets whether the control will render progressively or will just draw once the entire view has been rendered. Progressive rendering is useful when a PDF page contain lots of elements (e.g. many vector paths, text, or many little images). When progressive rendering is enabled PDFNet will use painter algorithm to draw the page. This way user may be able to see partially rendered page. If a page contains only a single large image, there would be no visible benefit from progressive rendering.
Public methodSetProgressiveRenderingInterval
Sets the interval at which the rendering will be updated
Public methodSetRelativeZoomLimits
Sets the minimum and maximum zoom bounds of PDFViewCtrl relative to referenceViewMode min_zoom and max_zoom are relative to the zoom level when the current page is displayed in referenceViewMod. For instance, if referenceViewMode is e_fit_page, min_zoom = 1.0, and max_zoom = 3, it means that the minimum zoom allowed by PDFViewCtrl is the same as the zoom when a page is fit and the maximum zoom allowed is three times that of when the page is fit.
Public methodSetRenderedContentCacheSize
Sets the suggested memory size of rendered content. PDFViewCtrl keeps invisible content in order to achieve smoother viewing experience; however, this increases memory usage. Based on the memory footprint of your app, you may want to customize it. Note that the built in controls (FlipView and ScrollView) will likely cache some content as well, meaning that the PDFViewCtrl will use more memory than this number suggests. Setting this size to 0 will cause only rendering of directly visible content.
Public methodSetRequiredFieldBorderColor
Set the border color for required fields This option only has an effect if field highlighting is turned on using `SetHighlightFields(true)`.
Public methodSetRightToLeftLanguage
Tells PDFViewCtrl the content in the viewed PDF document reads from right to left.
Public methodSetScrollBarVisibility
Sets how ScrollBars in the PDFViewCtrl should be shown. This affects both the horizontal and vertical ScrollBars. The default is Auto.
Public methodSetScrollEnabled
Sets if scroll is enabled or disabled.
Public methodSetSnappingMode
Set the snapping mode for the SnapToNearestInDoc method. The default is snap to line endpint, midpoints and intersections
Public methodSetTextSelectionMode
Selects all words that intersect the given selection rectangle.
Public methodSetThinLineAdjustment
Set thin line adjustment parameters.
Public methodSetupThumbnails
Enables or disables thumbnail view features. Thumbnail view is used before a PDF page is fully rendered. If runtime thumb view generation is enabled, PDFViewCtrl generates thumbnail views at runtime. If a PDF file already contains the thumbnail views, runtime thumb view generation can be turned off, which is more efficient. If runtime thumb view generation is enabled, the thumbMaxSideLength will be used as a reference to calculate the thumbnail resolution.
Public methodSetUrlExtraction
Enables or disables URL extraction. Default is disabled.
Public methodSetValue (Inherited from DependencyObject.)
Public methodSetVerticalAlign
Sets the vertical alignment used for rendering pages within the view.
Public methodSetVScrollPos
Sets the vertical scroll position in scrollable space.
Public methodSetZoom(Double)
Sets the zoom factor to a new value. The function zooms to a point at the center of the rendering buffer.
Public methodSetZoom(Int32, Int32, Double)
Sets the zoom factor to a new value using the given pixel coordinate (x,y) as a zoom center, which will stay fixed on the screen. The zoom point (x,y) is represented in the screen coordinate system, which starts in the upper-left corner of the client window. Should you want to move (x, y) to the center of the client window, you can use the OnScroll() subsequently:
Public methodSetZoom(Int32, Int32, Double, Boolean)
Sets the zoom factor to a new value using the given pixel coordinate (x,y) as a zoom center, which will stay fixed on the screen. The zoom point (x,y) is represented in the screen coordinate system, which starts in the upper-left corner of the client window. Should you want to move (x, y) to the center of the client window, you can use the OnScroll() subsequently:
Public methodSetZoomEnabled
Sets if zoom is enabled or disabled.
Public methodSetZoomLimits
Sets the minimum and maximum zoom bounds of PDFViewCtrl.
Public methodShowAnnotation
Enable rendering of a particular annotation. Only has an effect if HideAnnotation() has previously been called on the same annot.
Public methodShowRect
Changes the viewing area to fit a rectangle rect on page page_num. Rectangle must be specified in page coordinates. This will adjust current page and zoom appropriately.
Public methodSmartZoom(Int32, Int32)
Sets the zoom factor to a new value using the given pixel coordinate (x,y) to find an intersecting paragraph. The width of the paragraph helps to determine the zoom value, center of the paragraph is used as a zoom center. Paragraph has to contain more than one line and be wider than 1/5th of a page width. When performing a smart zoom would not significantly change the zoom level, it will be ignored. Note: This call should not be made while any pointer is interacting with the PDFViewCtrl, as that might cause some issues. If this is done on a tap, or click, you can add a delay by marshaling a callback for the UI thread.
Public methodSmartZoom(Int32, Int32, Boolean)
Sets the zoom factor to a new value using the given pixel coordinate (x,y) to find an intersecting paragraph. The width of the paragraph helps to determine the zoom value, center of the paragraph is used as a zoom center. Paragraph has to contain more than one line and be wider than 1/5th of a page width. When performing a smart zoom would not significantly change the zoom level, it will be ignored. Note: This call should not be made while any pointer is interacting with the PDFViewCtrl, as that might cause some issues. If this is done on a tap, or click, you can add a delay by marshaling a callback for the UI thread.
Public methodSnapToNearestInDoc
Public methodStartAnimation (Inherited from UIElement.)
Public methodStartBringIntoView (Inherited from UIElement.)
Public methodStartBringIntoView(BringIntoViewOptions) (Inherited from UIElement.)
Public methodStartDragAsync (Inherited from UIElement.)
Public methodStopAnimation (Inherited from UIElement.)
Public methodTakeSnapshot
Takes snapshot of the current document state for Undo/Redo.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransformToVisual (Inherited from UIElement.)
Public methodTryInvokeKeyboardAccelerator (Inherited from UIElement.)
Public methodUndo
Performs Undo.
Public methodUnregisterPropertyChangedCallback (Inherited from DependencyObject.)
Public methodUpdate
Redraws the contents in the visible region.
Public methodUpdate(Boolean)
Redraws the contents.
Public methodUpdate(Field)
Redraws the areas covered by all Form annotations associated with the field
Public methodUpdate(Rect)
Redraws the given area in the buffer.
Public methodUpdateLayout (Inherited from UIElement.)
Public methodUpdateOCGContext
Deprecated: PDFViewCtrl does this automatically now.
Public methodUpdatePageLayout
Updates the page layout withing the view. This function must be called after document page sequence is modified (such as when a page is being added to or removed from a document) or after changes to page dimensions (e.g. after a page is rotated or resized).
Public methodUpdateWithAnnot
Redraws the area covered with the provided annotation.
Top
Events
  NameDescription
Public eventAccessKeyDisplayDismissed (Inherited from UIElement.)
Public eventAccessKeyDisplayRequested (Inherited from UIElement.)
Public eventAccessKeyInvoked (Inherited from UIElement.)
Public eventActualThemeChanged (Inherited from FrameworkElement.)
Public eventBringIntoViewRequested (Inherited from UIElement.)
Public eventCharacterReceived (Inherited from UIElement.)
Public eventContextCanceled (Inherited from UIElement.)
Public eventContextRequested (Inherited from UIElement.)
Public eventDataContextChanged (Inherited from FrameworkElement.)
Public eventDoubleTapped (Inherited from UIElement.)
Public eventDragEnter (Inherited from UIElement.)
Public eventDragLeave (Inherited from UIElement.)
Public eventDragOver (Inherited from UIElement.)
Public eventDragStarting (Inherited from UIElement.)
Public eventDrop (Inherited from UIElement.)
Public eventDropCompleted (Inherited from UIElement.)
Public eventEffectiveViewportChanged (Inherited from FrameworkElement.)
Public eventFocusDisengaged (Inherited from Control.)
Public eventFocusEngaged (Inherited from Control.)
Public eventGettingFocus (Inherited from UIElement.)
Public eventGotFocus (Inherited from UIElement.)
Public eventHolding (Inherited from UIElement.)
Public eventIsEnabledChanged (Inherited from Control.)
Public eventKeyDown (Inherited from UIElement.)
Public eventKeyUp (Inherited from UIElement.)
Public eventLayoutUpdated (Inherited from FrameworkElement.)
Public eventLoaded (Inherited from FrameworkElement.)
Public eventLoading (Inherited from FrameworkElement.)
Public eventLosingFocus (Inherited from UIElement.)
Public eventLostFocus (Inherited from UIElement.)
Public eventManipulationCompleted (Inherited from UIElement.)
Public eventManipulationDelta (Inherited from UIElement.)
Public eventManipulationInertiaStarting (Inherited from UIElement.)
Public eventManipulationStarted (Inherited from UIElement.)
Public eventManipulationStarting (Inherited from UIElement.)
Public eventNoFocusCandidateFound (Inherited from UIElement.)
Public eventOnAction
Occurs when the PDFViewCtrl is about to execute an action. In order to prevent the viewer from executing the action internally, you can set ActionEventArgs.Handled to true;
Public eventOnConversionChanged
Called when an update is available. Note that the DocumentConversion passed in as a parameter might be ahead of the PDFViewCtrl in terms of how many pages are converted. This event reports how many pages the PDFViewCtrl is currently aware of.
Public eventOnDownloadChanged
Occurs after using OpenURLAsync and contains the latest information regarding the state of downloading. The exact information provided in the event depends on the event enum type.
Public eventOnLayoutChanged
Occurs when the document currently shown by PDFViewCtrl changes its page sequence(e.g. when a page is inserted) or after changes to page dimensions (e.g. after a page is rotated or resized).
Public eventOnPageFlipFinished
Occur when the PDFViewCtrl settles after flipping pages using touch in a non-continuous mode.
Public eventOnPageNumberChanged
Occurs when the current page has changed.
Public eventOnRenderFinished
Tells the delegate that a render job is complete.
Public eventOnScale
Occurs when zoom factor of the document has changed. Note that this event does not fire during zooming, but only after the zooming motion has finished.
Public eventOnSetDoc
Occurs after PDFViewCtrl.SetDoc(PDFDoc) is called and the document is set within PDFViewCtrl. When this callback occurs, the document is ready for actions such as SetHScrollPos or GoToPage.
Public eventOnSize
Occurs when PDFViewCtrl has changed size, such as after a rotation of the tablet.
Public eventOnThumbnailGenerated
Occurs when a thumbnail that was requested though GetThumbAsync(int pageNum) is ready. See GetThumbAsync(int pageNum) for more information.
Public eventOnViewChanged
Occurs when the scrollable content is being manipulated. Note that this event is raised repeatedly during manipulation of the scrollable content.
Public eventPointerCanceled (Inherited from UIElement.)
Public eventPointerCaptureLost (Inherited from UIElement.)
Public eventPointerEntered (Inherited from UIElement.)
Public eventPointerExited (Inherited from UIElement.)
Public eventPointerMoved (Inherited from UIElement.)
Public eventPointerPressed (Inherited from UIElement.)
Public eventPointerReleased (Inherited from UIElement.)
Public eventPointerWheelChanged (Inherited from UIElement.)
Public eventPreviewKeyDown (Inherited from UIElement.)
Public eventPreviewKeyUp (Inherited from UIElement.)
Public eventProcessKeyboardAccelerators (Inherited from UIElement.)
Public eventRightTapped (Inherited from UIElement.)
Public eventSizeChanged (Inherited from FrameworkElement.)
Public eventTapped (Inherited from UIElement.)
Public eventUnloaded (Inherited from FrameworkElement.)
Top
See Also