Search results

PdfViewer

Represents the PDF viewer component.

<div id="pdfViewer"></div>
<script>
 var pdfViewerObj = new PdfViewer();
 pdfViewerObj.appendTo("#pdfViewer");
</script>

Properties

ajaxRequestSettings

AjaxRequestSettingsModel

Defines the ajax Request settings of the PdfViewer.

annotationToolbarSettings

AnnotationToolbarSettingsModel

Defines the settings of the PdfViewer annotation toolbar.

areaSettings

AreaSettingsModel

Defines the settings of area annotation.

arrowSettings

ArrowSettingsModel

Defines the settings of arrow annotation.

circleSettings

CircleSettingsModel

Defines the settings of circle annotation.

customStampSettings

CustomStampSettingsModel

Defines the settings of customStamp annotation.

distanceSettings

DistanceSettingsModel

Defines the settings of distance annotation.

documentPath

string

Sets the PDF document path for initial loading.

enableAnnotation

boolean

Enable or disable the annotation in the Pdfviewer.

Defaults to true

enableAnnotationToolbar

boolean

Opens the annotation toolbar when the PDF document is loaded in the PDF Viewer control initially.

Defaults to false

enableBookmark

boolean

Enables or disables the bookmark view in the PDF viewer

Defaults to true

enableDownload

boolean

Enable or disables the download option of PdfViewer.

Defaults to true

Enables or disables the hyperlinks in PDF document.

Defaults to true

enableMagnification

boolean

Enable or disables the Magnification module of PdfViewer.

Defaults to true

enableMeasureAnnotation

boolean

Enable or disables the calibrate annotation in the PdfViewer.

Defaults to true

enableNavigation

boolean

Enable or disables the Navigation module of PdfViewer.

Defaults to true

enableNavigationToolbar

boolean

Enable or disables the Navigation toolbar of PdfViewer.

Defaults to true

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enablePinchZoom

boolean

Enable or disables the Pinch zoom of PdfViewer.

Defaults to true

enablePrint

boolean

Enable or disables the print option of PdfViewer.

Defaults to true

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

enableShapeAnnotation

boolean

Enable or disables the shape annotation in the PdfViewer.

Defaults to true

enableStampAnnotations

boolean

Enables and disables the stamp annotations when the PDF viewer control is loaded initially.

Defaults to true

enableStickyNotesAnnotation

boolean

Enables and disables the stickyNotes annotations when the PDF viewer control is loaded initially.

Defaults to true

enableTextMarkupAnnotation

boolean

Enable or disables the text markup annotation in the PdfViewer.

Defaults to true

enableTextSearch

boolean

Enable or disables the text search in the PdfViewer.

Defaults to true

enableTextSelection

boolean

Enable or disables the text selection in the PdfViewer.

Defaults to true

enableThumbnail

boolean

Enables or disables the thumbnail view in the PDF viewer

Defaults to true

enableToolbar

boolean

Enable or disables the toolbar of PdfViewer.

Defaults to true

fileName

string

Gets or sets the document name loaded in the PdfViewer control.

height

string | number

Defines the scrollable height of the PdfViewer control.

Defaults to ‘auto’

highlightSettings

HighlightSettingsModel

Defines the settings of highlight annotation.

hyperlinkOpenState

string

Specifies the open state of the hyperlink in the PDF document.

Defaults to CurrentTab

interactionMode

string

Sets the interaction mode of the PdfViewer

Defaults to TextSelection

lineSettings

LineSettingsModel

Defines the settings of line annotation.

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

perimeterSettings

PerimeterSettingsModel

Defines the settings of perimeter annotation.

polygonSettings

PolygonSettingsModel

Defines the settings of polygon annotation.

radiusSettings

RadiusSettingsModel

Defines the settings of radius annotation.

rectangleSettings

RectangleSettingsModel

Defines the settings of rectangle annotation.

selectedItems

SelectorModel

Defines the collection of selected items, size and position of the selector

Defaults to {}

serverActionSettings

ServerActionSettingsModel

Defines the settings of the PdfViewer service.

serviceUrl

string

Defines the service url of the PdfViewer control.

stampSettings

StampSettingsModel

Defines the settings of stamp annotation.

stickyNotesSettings

StickyNotesSettingsModel

Defines the settings of stickyNotes annotation.

strikethroughSettings

StrikethroughSettingsModel

Defines the settings of strikethrough annotation.

toolbarSettings

ToolbarSettingsModel

Defines the settings of the PdfViewer toolbar.

underlineSettings

UnderlineSettingsModel

Defines the settings of underline annotation.

volumeSettings

VolumeSettingsModel

Defines the settings of volume annotation.

width

string | number

Defines the scrollable width of the PdfViewer control.

Defaults to ‘auto’

annotation Annotation

Gets the annotation object of the pdf viewer.

bookmark BookmarkView

Gets the bookmark view object of the pdf viewer.

currentPageNumber number

Returns the current page number of the document displayed in the PdfViewer control.

isDocumentEdited boolean

Checks whether the PDF document is edited.

magnification Magnification

Gets the magnification object of the pdf viewer.

Gets the navigation object of the pdf viewer.

pageCount number

Returns the page count of the document loaded in the PdfViewer control.

Gets the print object of the pdf viewer.

textSearch TextSearch

Gets the text search object of the pdf viewer.

thumbnailView ThumbnailView

Gets the thumbnail-view object of the pdf viewer.

toolbar Toolbar

Gets the toolbar object of the pdf viewer.

zoomPercentage number

Returns the current zoom percentage of the PdfViewer control.

Methods

addEventListener

Adds the handler to the given event listener.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

Destroys all managed resources used by this object.

Returns void

download

Downloads the PDF document being loaded in the ejPdfViewer control.

Returns void

load

Loads the given PDF document in the PDF viewer control

Parameter Type Description
document string Specifies the document name for load
password string Specifies the Given document password

Returns void

redo

Perform redo action for the edited annotations

Returns void

removeEventListener

Removes the handler from the given event listener.

Returns void

undo

Perform undo action for the edited annotations

Returns void

unload

Unloads the PDF document being displayed in the PDF viewer.

Returns void

updateViewerContainer

updates the PDF Viewer container width and height from externally.

Returns void

Inject

Dynamically injects the required modules to the component.

Returns void

Events

ajaxRequestFailed

EmitType<AjaxRequestFailureEventArgs>

Triggers when the AJAX request is failed.

annotationAdd

EmitType<AnnotationAddEventArgs>

Triggers when an annotation is added over the page of the PDF document.

annotationPropertiesChange

EmitType<AnnotationPropertiesChangeEventArgs>

Triggers when the property of the annotation is changed in the page of the PDF document.

annotationRemove

EmitType<AnnotationRemoveEventArgs>

Triggers when an annotation is removed from the page of the PDF document.

annotationResize

EmitType<AnnotationResizeEventArgs>

Triggers when an annotation is resized over the page of the PDF document.

annotationSelect

EmitType<AnnotationSelectEventArgs>

Triggers when an annotation is selected over the page of the PDF document.

annotations

PdfAnnotationBaseModel[]

Triggers when the property of the annotation is changed in the page of the PDF document.

documentLoad

EmitType<LoadEventArgs>

Triggers while loading document into PdfViewer.

documentLoadFailed

EmitType<LoadFailedEventArgs>

Triggers while loading document got failed in PdfViewer.

documentUnload

EmitType<UnloadEventArgs>

Triggers while close the document

hyperlinkClick

EmitType<HyperlinkClickEventArgs>

Triggers when hyperlink in the PDF Document is clicked

pageChange

EmitType<PageChangeEventArgs>

Triggers when there is change in current page number.

pageClick

EmitType<PageClickEventArgs>

Triggers when the mouse click is performed over the page of the PDF document.

zoomChange

EmitType<ZoomChangeEventArgs>

Triggers when there is change in the magnification value.