Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfViewerBase

    Show / Hide Table of Contents

    Class PdfViewerBase

    Represents the methods of PDF Viewer component.

    Inheritance
    System.Object
    SfBaseComponent
    PdfViewerBase
    SfPdfViewer
    Inherited Members
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.PdfViewer
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PdfViewerBase : SfBaseComponent

    Constructors

    PdfViewerBase()

    Declaration
    public PdfViewerBase()

    Properties

    AjaxRequestSettings

    Customize the AJAX request header.

    Declaration
    public PdfViewerAjaxRequestSettings AjaxRequestSettings { get; set; }
    Property Value
    Type Description
    PdfViewerAjaxRequestSettings
    Remarks

    AjaxRequestSettings is applicable for Web assembly blazor alone.

    AnnotationSettings

    Defines the annotation settings for PDF Viewer. It used to customize the author, max/min width and height of the annotations.

    Declaration
    public PdfViewerAnnotationSettings AnnotationSettings { get; set; }
    Property Value
    Type Description
    PdfViewerAnnotationSettings

    AreaSettings

    Defines the settings of area annotation. It used to customize the area annotation properties.

    Declaration
    public PdfViewerAreaSettings AreaSettings { get; set; }
    Property Value
    Type Description
    PdfViewerAreaSettings

    ArrowSettings

    Defines the settings of arrow annotation. It used to customize the arrow annotation properties.

    Declaration
    public PdfViewerArrowSettings ArrowSettings { get; set; }
    Property Value
    Type Description
    PdfViewerArrowSettings

    CanRedo

    Gets a value that indicates whether the most recent action can be undone.

    Declaration
    public bool CanRedo { get; set; }
    Property Value
    Type Description
    System.Boolean

    false

    Examples
    <SfPdfViewerServer CanRedo=true >
    </SfPdfViewerServer>

    CanRedoChanged

    Gets or sets a callback that updates the CanRedo bound value.

    Declaration
    public EventCallback<bool> CanRedoChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Boolean>

    CanUndo

    Gets a value indicating whether the user can undo the previous operation in the PDF Viewer control.

    Declaration
    public bool CanUndo { get; set; }
    Property Value
    Type Description
    System.Boolean

    false

    Examples
    <SfPdfViewerServer CanUndo=true >
    </SfPdfViewerServer>

    CanUndoChanged

    Gets or sets a callback that updates the CanUndo bound value.

    Declaration
    public EventCallback<bool> CanUndoChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Boolean>

    ChildContent

    ChildContent used to define child elements for the root component.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    CircleSettings

    Defines the settings of circle annotation. It used to customize circle annotation properties.

    Declaration
    public PdfViewerCircleSettings CircleSettings { get; set; }
    Property Value
    Type Description
    PdfViewerCircleSettings

    CommentPanelVisible

    Defines the visibility of the comment panel in the PDF Viewer.

    Declaration
    public bool CommentPanelVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    false

    Examples
    <SfPdfViewerServer CommentPanelVisible=true >
    </SfPdfViewerServer>

    CommentPanelVisibleChanged

    EventCallback to update the CommentPanelVisible value in the parent component.

    Declaration
    public EventCallback<bool> CommentPanelVisibleChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Boolean>

    ContextMenuSettings

    Defines the settings of context menu for the PDF Viewer. It used to customize the context menu options to visibles in the PDF Viewer.

    Declaration
    public PdfViewerContextMenuSettings ContextMenuSettings { get; set; }
    Property Value
    Type Description
    PdfViewerContextMenuSettings

    CssClass

    Defines single or multiple classes (separated by space) to be used for customization styles of viewer.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    CurrentPageNumber

    Gets or sets the current page number of the PDF Viewer.

    Declaration
    public int CurrentPageNumber { get; set; }
    Property Value
    Type Description
    System.Int32

    CurrentPageNumberChanged

    Gets the event callback for CurrentPageNumber.

    Declaration
    public EventCallback<int> CurrentPageNumberChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Int32>

    CurrentPageNumberExpression

    Gets the expression for CurrentPageNumber.

    Declaration
    public Expression<Func<int>> CurrentPageNumberExpression { get; set; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression<System.Func<System.Int32>>

    CustomStampSettings

    Defines the settings of customStamp annotation. It use to customize the custom annoation support for the PDF Viewer.

    Declaration
    public PdfViewerCustomStampSettings CustomStampSettings { get; set; }
    Property Value
    Type Description
    PdfViewerCustomStampSettings

    DistanceSettings

    Defines the settings of distance annotation. It used to customize distance annotation properties.

    Declaration
    public PdfViewerDistanceSettings DistanceSettings { get; set; }
    Property Value
    Type Description
    PdfViewerDistanceSettings

    DocumentPath

    Sets the PDF document path for initial loading.

    Declaration
    public string DocumentPath { get; set; }
    Property Value
    Type Description
    System.String

    DownloadFileName

    Sets the name of the file to be downloaded.

    Declaration
    public string DownloadFileName { get; set; }
    Property Value
    Type Description
    System.String

    EnableAnnotation

    If it is set as false, then the annotation support in the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableAnnotationToolbar

    If it is set as false, then the edit annotation option in the toolbar will be disabled. By default it is true.

    Declaration
    public bool EnableAnnotationToolbar { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableAutoComplete

    If it is set as false, auto complete behavior of form fields will be disabled. Be default it is true.

    Declaration
    public bool EnableAutoComplete { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableBookmarkPanel

    If it is set as false, the bookmark panel on the left side of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableBookmarkPanel { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableCommentPanel

    If it is set as false, then text selection in the PDF Viewer will be disabled, By default it is true.

    Declaration
    public bool EnableCommentPanel { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableDesktopMode

    Gets or sets a boolean value to show or hide desktop toolbar in mobile devices. FALSE by default.

    Declaration
    public bool EnableDesktopMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableDownload

    If it is set as false, then the download option in the toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableDownload { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableErrorDialog

    If it is set as false, then error dialogue display in PDF Viewer will be disabled, By default it is true.

    Declaration
    public bool EnableErrorDialog { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableFormFields

    If it is set as false, form fields in the PDF document can't be interacted or edited. By default it is true.

    Declaration
    public bool EnableFormFields { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableFormFieldsValidation

    If it is set as true, validate form fields will be triggered. By default it is false.

    Declaration
    public bool EnableFormFieldsValidation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableFreeText

    If it is set as false, then the free text annotation tool in the annotation toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableFreeText { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableHandwrittenSignature

    if it is set as false, then the handwritten signature tool in the annotation toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableHandwrittenSignature { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableHyperlink

    If it is set as false, then hyperlink in the PDF Viewer will be disabled, By default it is true.

    Declaration
    public bool EnableHyperlink { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableImportAnnotationMeasurement

    Enable or disables the customization of measure values in PdfViewer.

    Declaration
    public bool EnableImportAnnotationMeasurement { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableInkAnnotation

    If it is set as false, then the ink annotation support in the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableInkAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableMagnification

    If it is set as false, then all the zoom operations in the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableMagnification { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableMeasureAnnotation

    If it is set as false, then the measurement annotation tool in the annotation toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableMeasureAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableNavigation

    If it is set as false, then page navigation of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableNavigation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableNavigationToolbar

    If it is set as false, then left side toolbar(bookmark, thumbnail navigation toolbar) will not be visible. By default it is true and visible.

    Declaration
    public bool EnableNavigationToolbar { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePinchZoom

    If it is set as false, then pinch zoom of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnablePinchZoom { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePrint

    If it is set as false, then the print option in the toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnablePrint { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePrintRotation

    If it is set as FALSE, will suppress the page rotation of Landscape document on print action. By default it is TRUE.

    Declaration
    public bool EnablePrintRotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    If it is set as true, then PDF Viewer will render in right to left direction. By default it will render in left to right direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableShapeAnnotation

    If it is set as false, then the shape annotation tool in the annotation toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableShapeAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableShapeLabel

    If it is set as true, label for shape and measure annotations can be added. It used to display the text content about the shape or measure annotation.

    Declaration
    public bool EnableShapeLabel { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableStampAnnotations

    If it is set as false, then the stamp annotation tool in the annotation toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableStampAnnotations { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableStickyNotesAnnotation

    If it is set as false, then the sticky notes annotation tool in the toolbar of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableStickyNotesAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableTextMarkupAnnotation

    If it is set as false, then the textmarkup tools (highlight, strikethrough, and underline) are disabled in annotation toolbar. By default it is true.

    Declaration
    public bool EnableTextMarkupAnnotation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableTextSearch

    If it is set as false, then text search support in the PDF Viewer will be disabled, By default it is true.

    Declaration
    public bool EnableTextSearch { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableTextSelection

    If it is set as false, then text selection in the PDF Viewer will be disabled, By default it is true.

    Declaration
    public bool EnableTextSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableThumbnailPanel

    If it is set as false, the thumbnail panel on the left side of the PDF Viewer will be disabled. By default it is true.

    Declaration
    public bool EnableThumbnailPanel { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableToolbar

    If it is set as false, then toolbar of the PDF Viewer will not be visible. By default it is true and visible.

    Declaration
    public bool EnableToolbar { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableZoomOptimization

    If it is set as false, then page image will be fetched for each zoom percentage values. Otherwise, page image will be fetched only when the zoom percentages are 100 %,200 %,300 %, and 400 %. By default it is true.

    Declaration
    public bool EnableZoomOptimization { get; set; }
    Property Value
    Type Description
    System.Boolean

    ExportAnnotationFileName

    Gets or sets the file name of annotations to be exported.

    Declaration
    public string ExportAnnotationFileName { get; set; }
    Property Value
    Type Description
    System.String

    FallbackFontCollection

    It is used to import the custom fonts into PDF Viewer.

    Declaration
    public Dictionary<string, Stream> FallbackFontCollection { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.IO.Stream>

    FreeTextSettings

    Defines the settings of free text annotation. It used to customize the free text annotation properties.

    Declaration
    public PdfViewerFreeTextSettings FreeTextSettings { get; set; }
    Property Value
    Type Description
    PdfViewerFreeTextSettings

    HandwrittenSignatureSettings

    Defines the settings of handwritten signature annotation. It used to customize the handwritten signature annotation properties.

    Declaration
    public PdfViewerHandwrittenSignatureSettings HandwrittenSignatureSettings { get; set; }
    Property Value
    Type Description
    PdfViewerHandwrittenSignatureSettings

    Height

    Gets or sets the scrollable height of the PDF Viewer.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    HighlightSettings

    Defines the settings of highlight annotation. It used to customize the highlight annotation properties.

    Declaration
    public PdfViewerHighlightSettings HighlightSettings { get; set; }
    Property Value
    Type Description
    PdfViewerHighlightSettings

    HyperlinkOpenState

    Indicates whether the URL is opened in current tab, new tab, new window . By default it is current tab.

    Declaration
    public LinkTarget HyperlinkOpenState { get; set; }
    Property Value
    Type Description
    LinkTarget

    ID

    Gets or sets the ID for the PDF Viewer parent DOM elemet div.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    InkAnnotationSettings

    Defines the ink annotation settings for PDF Viewer.It used to customize the strokeColor, thickness, opacity of the ink annotation.

    Declaration
    public PdfViewerInkAnnotationSettings InkAnnotationSettings { get; set; }
    Property Value
    Type Description
    PdfViewerInkAnnotationSettings

    InteractionMode

    Indicates whether the interaction is in selection(select tool) or pan mode. By default it it selection.

    Declaration
    public InteractionMode InteractionMode { get; set; }
    Property Value
    Type Description
    InteractionMode

    IsAnnotationToolbarVisible

    Gets the boolean value to identify whether the annotation Toolbar is visible or not. FALSE by default.

    Declaration
    public bool IsAnnotationToolbarVisible { get; }
    Property Value
    Type Description
    System.Boolean

    IsCommentPanelOpen

    Indicates whether the comment panel is in expanded or collapsed state. If it set as true, then the thumbnail panel will be expanded or open state. By default it is false.

    Declaration
    public bool IsCommentPanelOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsDocumentEdited

    Gets the value to check whether the document has been edited or not. By default it is false. If the document edited, it returns true.

    Declaration
    public bool IsDocumentEdited { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsExtractText

    If it is set as true, the PDF Viewer will extract the text from the document asynchronously after the initial loading. Once the extraction process completed then ExtractTextCompleted event will be triggered. The extracted text can be accessed from event args of the ExtractTextCompleted event. By default it is false and text won't be extracted.

    Declaration
    public bool IsExtractText { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsFormFieldDocument

    Gets the value to check whether the loaded document have the form fields or not. By default it is false. If the document contains any form field it returns true.

    Declaration
    public bool IsFormFieldDocument { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsSignatureEditable

    If it is set as true, the signature included in the PDF Viewer will saved as ink annotation on download action in the PDF Viewer. Otherwise the signature will be flattened on downloading or saving. By default it is false.

    Declaration
    public bool IsSignatureEditable { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsThumbnailPanelOpen

    Indicates whether the thumbnail panel is in expanded or collapsed state. If it set as true, then the thumbnail panel will be expanded or open state . By default it is false.

    Declaration
    public bool IsThumbnailPanelOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    jsProperty

    Declaration
    protected virtual string jsProperty { get; set; }
    Property Value
    Type Description
    System.String

    LineSettings

    Defines the settings of line annotation. It used to customize the line annotation properties.

    Declaration
    public PdfViewerLineSettings LineSettings { get; set; }
    Property Value
    Type Description
    PdfViewerLineSettings

    Locale

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

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    MeasurementSettings

    Defines the settings of measurement annotation. It used to customize the measurement annotation properties.

    Declaration
    public PdfViewerMeasurementSettings MeasurementSettings { get; set; }
    Property Value
    Type Description
    PdfViewerMeasurementSettings

    nameSpace

    Declaration
    protected virtual string nameSpace { get; set; }
    Property Value
    Type Description
    System.String

    PageCount

    Gets the total page count of the loaded PDF document.

    Declaration
    public int PageCount { get; set; }
    Property Value
    Type Description
    System.Int32

    PageCountChanged

    Gets the event callback for PageCount.

    Declaration
    public EventCallback<int> PageCountChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Int32>

    PageCountExpression

    Gets the expression for PageCount.

    Declaration
    public Expression<Func<int>> PageCountExpression { get; set; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression<System.Func<System.Int32>>

    PerimeterSettings

    Defines the settings of perimeter annotation. It used to customize the perimeter annotation properties.

    Declaration
    public PdfViewerPerimeterSettings PerimeterSettings { get; set; }
    Property Value
    Type Description
    PdfViewerPerimeterSettings

    PolygonSettings

    Defines the settings of polygon annotation. It used to customize the polygon annotation properties.

    Declaration
    public PdfViewerPolygonSettings PolygonSettings { get; set; }
    Property Value
    Type Description
    PdfViewerPolygonSettings

    PrintMode

    Specifies the print mode in the PDF Viewer.

    Declaration
    public PrintMode PrintMode { get; set; }
    Property Value
    Type Description
    PrintMode

    RadiusSettings

    Defines the settings of radius annotation. It used to customize the radius annotation properties.

    Declaration
    public PdfViewerRadiusSettings RadiusSettings { get; set; }
    Property Value
    Type Description
    PdfViewerRadiusSettings

    RectangleSettings

    Defines the settings of rectangle annotation. It used to customize the rectangle annotation properties.

    Declaration
    public PdfViewerRectangleSettings RectangleSettings { get; set; }
    Property Value
    Type Description
    PdfViewerRectangleSettings

    RestrictZoomRequest

    If it is set as true, then page image will be fetched only when the zoom percentage is 100. Otherwise, mutliple page image fetched for different zoom percentages on performing zoom operation. By default it is false.

    Declaration
    public bool RestrictZoomRequest { get; set; }
    Property Value
    Type Description
    System.Boolean

    RetryCount

    Gets or sets the retry count for PDF Viewer service call. By default retrycount is 1.

    Declaration
    public double RetryCount { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    This RetryCount is only applicable for Web Assembly projects alone.

    ScrollSettings

    Define the tile rendering settings. Tile rendering will render the PDF pages into mutiple tiles.

    Declaration
    public PdfViewerScrollSettings ScrollSettings { get; set; }
    Property Value
    Type Description
    PdfViewerScrollSettings

    ServerActionSettings

    Defines the settings of the PdfViewer service. It is used to map the server action method name for service calls.

    Declaration
    public PdfViewerServerActionSettings ServerActionSettings { get; set; }
    Property Value
    Type Description
    PdfViewerServerActionSettings
    Remarks

    This ServerActionSettings is applicable for web assembly project alone.

    ServiceUrl

    Sets the URL for service calls.

    Declaration
    public string ServiceUrl { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This ServiceUrl is applicable for web assembly project alone.

    ShapeLabelSettings

    Provide option to customize the label text for shape and measure annotations. It is applicable only if set EnableShapeLabel is true.

    Declaration
    public PdfViewerShapeLabelSettings ShapeLabelSettings { get; set; }
    Property Value
    Type Description
    PdfViewerShapeLabelSettings

    ShowDigitalSignatureAppearance

    Gets or sets a value that indicates whether to show the digital signature appearance in the document.

    Declaration
    public bool ShowDigitalSignatureAppearance { get; set; }
    Property Value
    Type Description
    System.Boolean

    true

    Examples
    <SfPdfViewerServer ShowDigitalSignatureAppearance=true >
    </SfPdfViewerServer>

    StampSettings

    Defines the settings of stamp annotation.It is used to customize the stamp annoations settings, stamp menu items to be visible in annotation toolbar.

    Declaration
    public PdfViewerStampSettings StampSettings { get; set; }
    Property Value
    Type Description
    PdfViewerStampSettings

    StickyNotesSettings

    Defines the settings of stickyNotes annotation.

    Declaration
    public PdfViewerStickyNotesSettings StickyNotesSettings { get; set; }
    Property Value
    Type Description
    PdfViewerStickyNotesSettings

    StrikethroughSettings

    Defines the settings of strikethrough annotation. It used to customize the strikethrough annotation properties.

    Declaration
    public PdfViewerStrikethroughSettings StrikethroughSettings { get; set; }
    Property Value
    Type Description
    PdfViewerStrikethroughSettings

    TextSearchColorSettings

    Configure the search text and highlight text color for the PDF Viewer.

    Declaration
    public PdfViewerTextSearchColorSettings TextSearchColorSettings { get; set; }
    Property Value
    Type Description
    PdfViewerTextSearchColorSettings

    TileRenderingSettings

    Define the tile rendering settings. Tile rendering will render the PDF pages into mutiple tiles.

    Declaration
    public PdfViewerTileRenderingSettings TileRenderingSettings { get; set; }
    Property Value
    Type Description
    PdfViewerTileRenderingSettings

    ToolbarSettings

    Defines the builtin toolbar and annotation toolbar option to be visible in the PDF Viewer.

    Declaration
    public PdfViewerToolbarSettings ToolbarSettings { get; set; }
    Property Value
    Type Description
    PdfViewerToolbarSettings

    UnderlineSettings

    Defines the settings of underline annotation. It is used to customize the properties of the underline annotation.

    Declaration
    public PdfViewerUnderlineSettings UnderlineSettings { get; set; }
    Property Value
    Type Description
    PdfViewerUnderlineSettings

    VolumeSettings

    Defines the settings of volumne annotation. It is used to customize the properties of the volume annotation.

    Declaration
    public PdfViewerVolumeSettings VolumeSettings { get; set; }
    Property Value
    Type Description
    PdfViewerVolumeSettings

    Width

    Gets or sets the scrollable width of the PDF Viewer.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    ZoomMode

    Indicates whether the PDF page will be rendered in fit to page, fit to width or based on the zoom percentage value(default) in the PDF Viewer. By default it value is Default and it represent the page rendered based on the zoom percentage.

    Declaration
    public ZoomMode ZoomMode { get; set; }
    Property Value
    Type Description
    ZoomMode

    ZoomValue

    Gets or sets the Zoom Percentage value of the PDF Viewer. It's range varies from 10 to 400.

    Declaration
    public int ZoomValue { get; set; }
    Property Value
    Type Description
    System.Int32

    ZoomValueChanged

    Gets the event callback for ZoomValue.

    Declaration
    public EventCallback<int> ZoomValueChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Int32>

    ZoomValueExpression

    Gets the expression for ZoomValue.

    Declaration
    public Expression<Func<int>> ZoomValueExpression { get; set; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression<System.Func<System.Int32>>

    Methods

    CancelTextSearchAsync()

    Cancels the text search of the PDF Viewer.

    Declaration
    public Task CancelTextSearchAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ClearSelectionAsync()

    Clear the annotation selection in the PDF Viewer.

    Declaration
    public Task ClearSelectionAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ClearTextSelectionAsync()

    Clear the text selection.

    Declaration
    public Task ClearTextSelectionAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    DeleteAnnotationAsync()

    Delete the selected annotation in the PDF Viewer.

    Declaration
    public Task DeleteAnnotationAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    DeleteAnnotationsAsync()

    To delete the annotation Collections in the PDF Document.

    Declaration
    public Task DeleteAnnotationsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Dispose()

    Dispose the PDF Viewer and it's dependencies.

    Declaration
    public override void Dispose()
    Overrides
    SfBaseComponent.Dispose()

    Dispose(Boolean)

    Dispose the unmanaged resources from PDF Viewer component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    SfBaseComponent.Dispose(Boolean)

    DownloadAsync()

    Downloads the PDF document being loaded in the PDF Viewer.

    Declaration
    public Task DownloadAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    EditAnnotationAsync(PdfAnnotation)

    Edit the annotation.

    Declaration
    public Task EditAnnotationAsync(PdfAnnotation annotation)
    Parameters
    Type Name Description
    PdfAnnotation annotation

    Annootation object should have the modified properties.

    Returns
    Type Description
    System.Threading.Tasks.Task

    EnableToolbarItemsAsync(List<ToolbarItem>, Boolean)

    Enables or disables the the toolbar items in the PDF Viewer.

    Declaration
    public Task EnableToolbarItemsAsync(List<ToolbarItem> items, bool isEnable)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ToolbarItem> items
    System.Boolean isEnable
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExportAnnotationAsStreamAsync(AnnotationDataFormat)

    Perform export annotations as Stream in the PDF Viewer.

    Declaration
    public Task<Stream> ExportAnnotationAsStreamAsync(AnnotationDataFormat annotationDataFormat)
    Parameters
    Type Name Description
    AnnotationDataFormat annotationDataFormat
    Returns
    Type Description
    System.Threading.Tasks.Task<System.IO.Stream>

    ExportAnnotationAsync(AnnotationDataFormat)

    Perform export annotations action in the PDF Viewer.

    Declaration
    public Task ExportAnnotationAsync(AnnotationDataFormat annotationDataFormat)
    Parameters
    Type Name Description
    AnnotationDataFormat annotationDataFormat
    Returns
    Type Description
    System.Threading.Tasks.Task

    ExportAnnotationsAsObjectAsync()

    Perform export annotations action in the PDF Viewer.

    Declaration
    public Task<object> ExportAnnotationsAsObjectAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Object>

    ExportFormFieldsAsObjectAsync()

    Perform export annotations action in the PDF Viewer.

    Declaration
    public Task<Dictionary<string, string>> ExportFormFieldsAsObjectAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String, System.String>>

    ExportFormFieldsAsync(FormFieldDataFormat)

    Exports the form fields data as stream.

    Declaration
    public Task<Stream> ExportFormFieldsAsync(FormFieldDataFormat formattype)
    Parameters
    Type Name Description
    FormFieldDataFormat formattype

    Represents the form fields data format.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.IO.Stream>

    Returns the stream instance which contains the form data.

    ExportFormFieldsAsync(String)

    Perform export action in the PDF Viewer.

    Declaration
    public Task ExportFormFieldsAsync(string path)
    Parameters
    Type Name Description
    System.String path
    Returns
    Type Description
    System.Threading.Tasks.Task

    FitToPageAsync()

    Scales the page to fit with in the container of the PDF Viewer.

    Declaration
    public Task FitToPageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    FitToWidthAsync()

    Scales the page to fit the page width within container width of the PDF Viewer.

    Declaration
    public Task FitToWidthAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    GetAnnotationsAsync()

    Gets the annotations collection.

    Declaration
    public Task<List<PdfAnnotation>> GetAnnotationsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<PdfAnnotation>>

    GetBookmarksAsync()

    Get bookmarks of the PDF document being loaded in the PDF Viewer.

    Declaration
    public Task<List<Bookmark>> GetBookmarksAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<Bookmark>>

    GetDocumentAsync()

    Gets the loaded PDF document with the changes.

    Declaration
    public Task<byte[]> GetDocumentAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Byte[]>

    GetJSNamespace()

    Returns the PDF Viewer namespace

    Declaration
    public string GetJSNamespace()
    Returns
    Type Description
    System.String

    String

    GetPageCountAsync()

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

    Declaration
    public Task<int> GetPageCountAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>

    GetZoomPercentageAsync()

    Returns the current zoom percentage of the PdfViewer control.

    Declaration
    public Task<int> GetZoomPercentageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>

    GoToBookmarkAsync(Int32, Double)

    Navigate To current Bookmark location of the PDF document being loaded in the PDF Viewer.

    Declaration
    public Task GoToBookmarkAsync(int pageNumber, double y)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    Represents the bookmark pageindex of the loaded PDF document.

    System.Double y

    Represents the Y co-ordinate of the bookmark page of the loaded PDF document.

    Returns
    Type Description
    System.Threading.Tasks.Task

    GoToFirstPageAsync()

    Navigate to first page of the PDF document loaded in the PDF Viewer.

    Declaration
    public Task GoToFirstPageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    GoToLastPageAsync()

    Navigate to last page of the PDF document loaded in the PDF Viewer.

    Declaration
    public Task GoToLastPageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    GoToNextPageAsync()

    Navigate to Next page of the PDF document loaded in the PDF Viewer.

    Declaration
    public Task GoToNextPageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    GoToPageAsync(Int32)

    Navigate to given page number in loaded document of the PDF Viewer..

    Declaration
    public Task GoToPageAsync(int pageNumber)
    Parameters
    Type Name Description
    System.Int32 pageNumber
    Returns
    Type Description
    System.Threading.Tasks.Task
    Remarks

    In case if we have provided incorrect page number as argument it will retain the existing page.

    GoToPreviousPageAsync()

    Navigate to Previous page of the PDF document.

    Declaration
    public Task GoToPreviousPageAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ImportAnnotationAsync(Stream, AnnotationDataFormat)

    Perform imports annotations action in the PDF Viewer

    Declaration
    public Task ImportAnnotationAsync(Stream importData, AnnotationDataFormat annotationDataFormat)
    Parameters
    Type Name Description
    System.IO.Stream importData
    AnnotationDataFormat annotationDataFormat
    Returns
    Type Description
    System.Threading.Tasks.Task

    ImportAnnotationAsync(Object, AnnotationDataFormat)

    Perform imports annotations action in the PDF Viewer.

    Declaration
    public Task ImportAnnotationAsync(object importData, AnnotationDataFormat annotationDataFormat)
    Parameters
    Type Name Description
    System.Object importData
    AnnotationDataFormat annotationDataFormat
    Returns
    Type Description
    System.Threading.Tasks.Task

    ImportFormFieldsAsync(Dictionary<String, String>)

    Import the form fields.

    Declaration
    public Task ImportFormFieldsAsync(Dictionary<string, string> formFields)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.String> formFields

    Form fields details name and value will be in Dictionary format.

    Returns
    Type Description
    System.Threading.Tasks.Task

    ImportFormFieldsAsync(Stream, FormFieldDataFormat)

    Import the form fields data into the current PDF document.

    Declaration
    public Task ImportFormFieldsAsync(Stream data, FormFieldDataFormat formattype)
    Parameters
    Type Name Description
    System.IO.Stream data

    Represents the stream instance of form fields data.

    FormFieldDataFormat formattype

    Represents the form fields data format.

    Returns
    Type Description
    System.Threading.Tasks.Task

    LoadAsync(Byte[], String)

    Load a PDF Document from the byte array.

    Declaration
    public Task LoadAsync(byte[] bytes, string password = null)
    Parameters
    Type Name Description
    System.Byte[] bytes

    byte array of the PDF document to be loaded into the PDF Viewer.

    System.String password

    Password for the PDF Document.

    Returns
    Type Description
    System.Threading.Tasks.Task

    LoadAsync(Stream, String)

    Load a PDF Document from the stream.

    Declaration
    public Task LoadAsync(Stream stream, string password = null)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream of the PDF document to be loaded into the PDF Viewer.

    System.String password

    Password for the PDF Document.

    Returns
    Type Description
    System.Threading.Tasks.Task

    LoadAsync(String, String)

    Loads the given PDF document in the PDF Viewer.

    Declaration
    public Task LoadAsync(string document, string password = null)
    Parameters
    Type Name Description
    System.String document
    System.String password
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfBaseComponent.OnAfterRenderAsync(Boolean)

    OnColorPickerChange(ColorPickerEventArgs)

    Fill color of the annotations.

    Declaration
    public void OnColorPickerChange(ColorPickerEventArgs args)
    Parameters
    Type Name Description
    ColorPickerEventArgs args

    OnFillColorChange(ColorPickerEventArgs)

    Fill Color of the annotations.

    Declaration
    public void OnFillColorChange(ColorPickerEventArgs args)
    Parameters
    Type Name Description
    ColorPickerEventArgs args

    OnFontColorChange(ColorPickerEventArgs)

    Change Font Color of Free text.

    Declaration
    public void OnFontColorChange(ColorPickerEventArgs args)
    Parameters
    Type Name Description
    ColorPickerEventArgs args

    OnHybridInitialized()

    Declaration
    protected Task OnHybridInitialized()
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfBaseComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnStrokeColorChange(ColorPickerEventArgs)

    Stroke Color of the annotations.

    Declaration
    public void OnStrokeColorChange(ColorPickerEventArgs args)
    Parameters
    Type Name Description
    ColorPickerEventArgs args

    OnStrokePickerChange(ColorPickerEventArgs)

    Stroke Color of the annotations.

    Declaration
    public void OnStrokePickerChange(ColorPickerEventArgs args)
    Parameters
    Type Name Description
    ColorPickerEventArgs args

    OpenThumbnailPaneAsync()

    Open the thumbnail pane of the PDF Viewer.

    Declaration
    public Task OpenThumbnailPaneAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    PrintAsync()

    Print the PDF document being loaded in the PDF Viewer.

    Declaration
    public Task PrintAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    RedoAsync()

    Perform redo action for the edited annotations.

    Declaration
    public Task RedoAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    RetrieveFormFieldsAsync()

    To retrieve the form fields in the loaded PDF Document.

    Declaration
    public Task<List<FormField>> RetrieveFormFieldsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.List<FormField>>

    SaveAsync(String)

    Save the loaded the document with the changes in the given file path.

    Declaration
    public Task SaveAsync(string filePath)
    Parameters
    Type Name Description
    System.String filePath

    file path to save the document. filepath should have the .pdf file extension.

    Returns
    Type Description
    System.Threading.Tasks.Task

    SearchNextAsync()

    Searches the next occurrence of the searched text from the current occurrence of the PDF Viewer.

    Declaration
    public Task SearchNextAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    SearchPreviousAsync()

    Searches the previous occurrence of the searched text from the current occurrence of the PDF Viewer.

    Declaration
    public Task SearchPreviousAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    SearchTextAsync(String, Boolean)

    Searches the target text in the PDF document and highlights the occurrences in the PDF pages.

    Declaration
    public Task SearchTextAsync(string searchText, bool isMatchCase)
    Parameters
    Type Name Description
    System.String searchText
    System.Boolean isMatchCase
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectAnnotationAsync(PdfAnnotation)

    Select the annotations using or annotation Id.

    Declaration
    public Task SelectAnnotationAsync(PdfAnnotation annotation)
    Parameters
    Type Name Description
    PdfAnnotation annotation

    Annotation object to be deleted.

    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectAnnotationAsync(String)

    Select the annotations using or annotation Id.

    Declaration
    public Task SelectAnnotationAsync(string annotationId)
    Parameters
    Type Name Description
    System.String annotationId
    Returns
    Type Description
    System.Threading.Tasks.Task

    SelectTextRegionAsync(Int32, List<Bound>)

    Select Text region based on the given bounds.

    Declaration
    public Task SelectTextRegionAsync(int pageNumbers, List<Bound> bounds)
    Parameters
    Type Name Description
    System.Int32 pageNumbers

    page number of the text content to be selected.

    System.Collections.Generic.List<Bound> bounds
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetAnnotationModeAsync(AnnotationType)

    Set annotation type to be added in next user interaction of the loaded PDF Document in the PDF Viewer.

    Declaration
    public Task SetAnnotationModeAsync(AnnotationType type)
    Parameters
    Type Name Description
    AnnotationType type
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetAnnotationModeAsync(AnnotationType, Nullable<DynamicStampItem>, Nullable<SignStampItem>, Nullable<StandardBusinessStampItem>)

    Switch on the annotation mode.

    Declaration
    public Task SetAnnotationModeAsync(AnnotationType type, Nullable<DynamicStampItem> dynamicStampItem, Nullable<SignStampItem> signStampItem, Nullable<StandardBusinessStampItem> standardBusinessStampItem)
    Parameters
    Type Name Description
    AnnotationType type

    Specify the annotation type like Rectangle, Highlight, Stamp etc., to be added.

    System.Nullable<DynamicStampItem> dynamicStampItem

    Specify the type of dynamic stamp item to be added.

    System.Nullable<SignStampItem> signStampItem

    Specify the sign stamp item to be added.

    System.Nullable<StandardBusinessStampItem> standardBusinessStampItem

    Specify the standard business stamp item to be added..

    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowAnnotationToolbar(Boolean)

    Shows or hides the annotation toolbar in the PDF Viewer.

    Declaration
    public void ShowAnnotationToolbar(bool enableAnnotationToolbar)
    Parameters
    Type Name Description
    System.Boolean enableAnnotationToolbar

    ShowNavigationToolbarAsync(Boolean)

    Shows or hides the Navigation toolbar in the PDF Viewer.

    Declaration
    public Task ShowNavigationToolbarAsync(bool enableNavigationToolbar)
    Parameters
    Type Name Description
    System.Boolean enableNavigationToolbar
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowToolbarAsync(Boolean)

    Shows or hides the toolbar in the PDF Viewer.

    Declaration
    public Task ShowToolbarAsync(bool enableToolbar)
    Parameters
    Type Name Description
    System.Boolean enableToolbar
    Returns
    Type Description
    System.Threading.Tasks.Task

    ShowToolbarItemsAsync(List<ToolbarItem>, Boolean)

    Shows or hides the the toolbar items in the PDF Viewer.

    Declaration
    public Task ShowToolbarItemsAsync(List<ToolbarItem> items, bool isVisible)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ToolbarItem> items
    System.Boolean isVisible
    Returns
    Type Description
    System.Threading.Tasks.Task

    UndoAsync()

    Perform undo action for the edited annotations.

    Declaration
    public Task UndoAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    UnloadAsync()

    Unloads the PDF document being displayed in the PDF viewer.

    Declaration
    public Task UnloadAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateChildProperties(String, Object)

    Declaration
    public void UpdateChildProperties(string key, object value)
    Parameters
    Type Name Description
    System.String key
    System.Object value

    UpdateFormFieldsAsync(FormField)

    To update the form fields in the PDF Document.

    Declaration
    public Task UpdateFormFieldsAsync(FormField formField)
    Parameters
    Type Name Description
    FormField formField
    Returns
    Type Description
    System.Threading.Tasks.Task
    Remarks

    This method is used to update the isReadOnly of the form field.

    UpdateMeasurementSettingsAsync()

    Update measure settings for existing measure annotations.

    Declaration
    public Task UpdateMeasurementSettingsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    UpdateViewerContainerAsync()

    updates the PDF Viewer container width and height from externally.

    Declaration
    public Task UpdateViewerContainerAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ZoomAsync(Int32)

    Zoom the PDF document to the given zoom value. It's range varies from 10 to 400.

    Declaration
    public Task ZoomAsync(int zoomValue)
    Parameters
    Type Name Description
    System.Int32 zoomValue
    Returns
    Type Description
    System.Threading.Tasks.Task

    ZoomInAsync()

    Scale the page to the next value in the zoom drop down list. Drop down values are 10,25,50,75,100,125,150,200,400.

    Declaration
    public Task ZoomInAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ZoomOutAsync()

    Magnifies the page to the previous value in the zoom drop down list. Drop down values are 10,25,50,75,100,125,150,200,400.

    Declaration
    public Task ZoomOutAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved