Class PdfViewerBase
Represents the methods of PDF Viewer component.
Inheritance
System.Object
PdfViewerBase
Assembly: Syncfusion.Blazor.dll
Syntax
public class PdfViewerBase : SfBaseComponent
Constructors
PdfViewerBase()
Declaration
Properties
AjaxRequestSettings
Customize the AJAX request header.
Declaration
public PdfViewerAjaxRequestSettings AjaxRequestSettings { get; set; }
Property Value
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
AreaSettings
Defines the settings of area annotation. It used to customize the area annotation properties.
Declaration
public PdfViewerAreaSettings AreaSettings { get; set; }
Property Value
ArrowSettings
Defines the settings of arrow annotation. It used to customize the arrow annotation properties.
Declaration
public PdfViewerArrowSettings ArrowSettings { get; set; }
Property Value
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 |
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 |
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 |
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
Defines the visibility of the comment panel in the PDF Viewer.
Declaration
public bool CommentPanelVisible { get; set; }
Property Value
Type |
Description |
System.Boolean |
false
|
<SfPdfViewerServer CommentPanelVisible=true >
</SfPdfViewerServer>
EventCallback to update the CommentPanelVisible value in the parent component.
Declaration
public EventCallback<bool> CommentPanelVisibleChanged { get; set; }
Property Value
Type |
Microsoft.AspNetCore.Components.EventCallback<System.Boolean> |
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
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
CurrentPageNumber
Gets or sets the current page number of the PDF Viewer.
Declaration
public int CurrentPageNumber { get; set; }
Property Value
CurrentPageNumberChanged
Gets the event callback for CurrentPageNumber.
Declaration
public EventCallback<int> CurrentPageNumberChanged { get; set; }
Property Value
Type |
Microsoft.AspNetCore.Components.EventCallback<System.Int32> |
CurrentPageNumberExpression
Gets the expression for CurrentPageNumber.
Declaration
public Expression<Func<int>> CurrentPageNumberExpression { get; set; }
Property Value
Type |
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
DistanceSettings
Defines the settings of distance annotation. It used to customize distance annotation properties.
Declaration
public PdfViewerDistanceSettings DistanceSettings { get; set; }
Property Value
DocumentPath
Sets the PDF document path for initial loading.
Declaration
public string DocumentPath { get; set; }
Property Value
DownloadFileName
Sets the name of the file to be downloaded.
Declaration
public string DownloadFileName { get; set; }
Property Value
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
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
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
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
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
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
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
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
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
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
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
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
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
EnableImportAnnotationMeasurement
Enable or disables the customization of measure values in PdfViewer.
Declaration
public bool EnableImportAnnotationMeasurement { get; set; }
Property Value
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ExportAnnotationFileName
Gets or sets the file name of annotations to be exported.
Declaration
public string ExportAnnotationFileName { get; set; }
Property Value
FallbackFontCollection
It is used to import the custom fonts into PDF Viewer.
Declaration
public Dictionary<string, Stream> FallbackFontCollection { get; }
Property Value
Type |
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
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
Height
Gets or sets the scrollable height of the PDF Viewer.
Declaration
public string Height { get; set; }
Property Value
HighlightSettings
Defines the settings of highlight annotation. It used to customize the highlight annotation properties.
Declaration
public PdfViewerHighlightSettings HighlightSettings { get; set; }
Property Value
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
ID
Gets or sets the ID for the PDF Viewer parent DOM elemet div.
Declaration
public string ID { get; set; }
Property Value
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
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
Gets the boolean value to identify whether the annotation Toolbar is visible or not. FALSE by default.
Declaration
public bool IsAnnotationToolbarVisible { get; }
Property Value
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
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
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
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
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
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
jsProperty
Declaration
protected virtual string jsProperty { get; set; }
Property Value
jsRuntime
Declaration
protected IJSRuntime jsRuntime { get; set; }
Property Value
Type |
Microsoft.JSInterop.IJSRuntime |
LineSettings
Defines the settings of line annotation. It used to customize the line annotation properties.
Declaration
public PdfViewerLineSettings LineSettings { get; set; }
Property Value
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
MeasurementSettings
Defines the settings of measurement annotation. It used to customize the measurement annotation properties.
Declaration
public PdfViewerMeasurementSettings MeasurementSettings { get; set; }
Property Value
nameSpace
Declaration
protected virtual string nameSpace { get; set; }
Property Value
PageCount
Gets the total page count of the loaded PDF document.
Declaration
public int PageCount { get; set; }
Property Value
PageCountChanged
Gets the event callback for PageCount.
Declaration
public EventCallback<int> PageCountChanged { get; set; }
Property Value
Type |
Microsoft.AspNetCore.Components.EventCallback<System.Int32> |
PageCountExpression
Gets the expression for PageCount.
Declaration
public Expression<Func<int>> PageCountExpression { get; set; }
Property Value
Type |
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
PolygonSettings
Defines the settings of polygon annotation. It used to customize the polygon annotation properties.
Declaration
public PdfViewerPolygonSettings PolygonSettings { get; set; }
Property Value
PrintMode
Specifies the print mode in the PDF Viewer.
Declaration
public PrintMode PrintMode { get; set; }
Property Value
RadiusSettings
Defines the settings of radius annotation. It used to customize the radius annotation properties.
Declaration
public PdfViewerRadiusSettings RadiusSettings { get; set; }
Property Value
RectangleSettings
Defines the settings of rectangle annotation. It used to customize the rectangle annotation properties.
Declaration
public PdfViewerRectangleSettings RectangleSettings { get; set; }
Property Value
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
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
Define the tile rendering settings. Tile rendering will render the PDF pages into mutiple tiles.
Declaration
public PdfViewerScrollSettings ScrollSettings { get; set; }
Property Value
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
ServiceUrl
Sets the URL for service calls.
Declaration
public string ServiceUrl { get; set; }
Property Value
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
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
StickyNotesSettings
Defines the settings of stickyNotes annotation.
Declaration
public PdfViewerStickyNotesSettings StickyNotesSettings { get; set; }
Property Value
StrikethroughSettings
Defines the settings of strikethrough annotation. It used to customize the strikethrough annotation properties.
Declaration
public PdfViewerStrikethroughSettings StrikethroughSettings { get; set; }
Property Value
TextSearchColorSettings
Configure the search text and highlight text color for the PDF Viewer.
Declaration
public PdfViewerTextSearchColorSettings TextSearchColorSettings { get; set; }
Property Value
TileRenderingSettings
Define the tile rendering settings. Tile rendering will render the PDF pages into mutiple tiles.
Declaration
public PdfViewerTileRenderingSettings TileRenderingSettings { get; set; }
Property Value
Defines the builtin toolbar and annotation toolbar option to be visible in the PDF Viewer.
Declaration
public PdfViewerToolbarSettings ToolbarSettings { get; set; }
Property Value
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
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
Width
Gets or sets the scrollable width of the PDF Viewer.
Declaration
public string Width { get; set; }
Property Value
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
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
ZoomValueChanged
Gets the event callback for ZoomValue.
Declaration
public EventCallback<int> ZoomValueChanged { get; set; }
Property Value
Type |
Microsoft.AspNetCore.Components.EventCallback<System.Int32> |
ZoomValueExpression
Gets the expression for ZoomValue.
Declaration
public Expression<Func<int>> ZoomValueExpression { get; set; }
Property Value
Type |
System.Linq.Expressions.Expression<System.Func<System.Int32>> |
Methods
CancelTextSearchAsync()
Cancels the text search of the PDF Viewer.
Declaration
public Task CancelTextSearchAsync()
Returns
Type |
System.Threading.Tasks.Task |
ClearSelectionAsync()
Clear the annotation selection in the PDF Viewer.
Declaration
public Task ClearSelectionAsync()
Returns
Type |
System.Threading.Tasks.Task |
ClearTextSelectionAsync()
Clear the text selection.
Declaration
public Task ClearTextSelectionAsync()
Returns
Type |
System.Threading.Tasks.Task |
DeleteAnnotationAsync()
Delete the selected annotation in the PDF Viewer.
Declaration
public Task DeleteAnnotationAsync()
Returns
Type |
System.Threading.Tasks.Task |
DeleteAnnotationsAsync()
To delete the annotation Collections in the PDF Document.
Declaration
public Task DeleteAnnotationsAsync()
Returns
Type |
System.Threading.Tasks.Task |
Dispose()
Dispose the PDF Viewer and it's dependencies.
Declaration
public override void Dispose()
Overrides
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
DownloadAsync()
Downloads the PDF document being loaded in the PDF Viewer.
Declaration
public Task DownloadAsync()
Returns
Type |
System.Threading.Tasks.Task |
EditAnnotationAsync(PdfAnnotation)
Declaration
public Task EditAnnotationAsync(PdfAnnotation annotation)
Parameters
Type |
Name |
Description |
PdfAnnotation |
annotation |
Annootation object should have the modified properties.
|
Returns
Type |
System.Threading.Tasks.Task |
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 |
System.Threading.Tasks.Task |
Perform export annotations as Stream in the PDF Viewer.
Declaration
public Task<Stream> ExportAnnotationAsStreamAsync(AnnotationDataFormat annotationDataFormat)
Parameters
Returns
Type |
System.Threading.Tasks.Task<System.IO.Stream> |
Perform export annotations action in the PDF Viewer.
Declaration
public Task ExportAnnotationAsync(AnnotationDataFormat annotationDataFormat)
Parameters
Returns
Type |
System.Threading.Tasks.Task |
ExportAnnotationsAsObjectAsync()
Perform export annotations action in the PDF Viewer.
Declaration
public Task<object> ExportAnnotationsAsObjectAsync()
Returns
Type |
System.Threading.Tasks.Task<System.Object> |
Perform export annotations action in the PDF Viewer.
Declaration
public Task<Dictionary<string, string>> ExportFormFieldsAsObjectAsync()
Returns
Type |
System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String, System.String>> |
Exports the form fields data as stream.
Declaration
public Task<Stream> ExportFormFieldsAsync(FormFieldDataFormat formattype)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream> |
Returns the stream instance which contains the form data.
|
Perform export action in the PDF Viewer.
Declaration
public Task ExportFormFieldsAsync(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Type |
System.Threading.Tasks.Task |
FitToPageAsync()
Scales the page to fit with in the container of the PDF Viewer.
Declaration
public Task FitToPageAsync()
Returns
Type |
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 |
System.Threading.Tasks.Task |
GetAnnotationsAsync()
Gets the annotations collection.
Declaration
public Task<List<PdfAnnotation>> GetAnnotationsAsync()
Returns
Type |
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 |
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 |
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 |
System.Threading.Tasks.Task<System.Int32> |
GetZoomPercentageAsync()
Returns the current zoom percentage of the PdfViewer control.
Declaration
public Task<int> GetZoomPercentageAsync()
Returns
Type |
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 |
System.Threading.Tasks.Task |
GoToFirstPageAsync()
Navigate to first page of the PDF document loaded in the PDF Viewer.
Declaration
public Task GoToFirstPageAsync()
Returns
Type |
System.Threading.Tasks.Task |
GoToLastPageAsync()
Navigate to last page of the PDF document loaded in the PDF Viewer.
Declaration
public Task GoToLastPageAsync()
Returns
Type |
System.Threading.Tasks.Task |
GoToNextPageAsync()
Navigate to Next page of the PDF document loaded in the PDF Viewer.
Declaration
public Task GoToNextPageAsync()
Returns
Type |
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 |
System.Threading.Tasks.Task |
GoToPreviousPageAsync()
Navigate to Previous page of the PDF document.
Declaration
public Task GoToPreviousPageAsync()
Returns
Type |
System.Threading.Tasks.Task |
Perform imports annotations action in the PDF Viewer
Declaration
public Task ImportAnnotationAsync(Stream importData, AnnotationDataFormat annotationDataFormat)
Parameters
Returns
Type |
System.Threading.Tasks.Task |
Perform imports annotations action in the PDF Viewer.
Declaration
public Task ImportAnnotationAsync(object importData, AnnotationDataFormat annotationDataFormat)
Parameters
Returns
Type |
System.Threading.Tasks.Task |
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 |
System.Threading.Tasks.Task |
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 |
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 |
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 |
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 |
System.Threading.Tasks.Task |
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
System.Boolean |
firstRender |
|
Returns
Type |
System.Threading.Tasks.Task |
Overrides
Fill color of the annotations.
Declaration
public void OnColorPickerChange(ColorPickerEventArgs args)
Parameters
Fill Color of the annotations.
Declaration
public void OnFillColorChange(ColorPickerEventArgs args)
Parameters
Change Font Color of Free text.
Declaration
public void OnFontColorChange(ColorPickerEventArgs args)
Parameters
OnHybridInitialized()
Declaration
protected Task OnHybridInitialized()
Returns
Type |
System.Threading.Tasks.Task |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
System.Threading.Tasks.Task |
Overrides
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
System.Threading.Tasks.Task |
Stroke Color of the annotations.
Declaration
public void OnStrokeColorChange(ColorPickerEventArgs args)
Parameters
Stroke Color of the annotations.
Declaration
public void OnStrokePickerChange(ColorPickerEventArgs args)
Parameters
OpenThumbnailPaneAsync()
Open the thumbnail pane of the PDF Viewer.
Declaration
public Task OpenThumbnailPaneAsync()
Returns
Type |
System.Threading.Tasks.Task |
PrintAsync()
Print the PDF document being loaded in the PDF Viewer.
Declaration
Returns
Type |
System.Threading.Tasks.Task |
RedoAsync()
Perform redo action for the edited annotations.
Declaration
Returns
Type |
System.Threading.Tasks.Task |
To retrieve the form fields in the loaded PDF Document.
Declaration
public Task<List<FormField>> RetrieveFormFieldsAsync()
Returns
Type |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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
Returns
Type |
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 |
System.Threading.Tasks.Task |
Shows or hides the annotation toolbar in the PDF Viewer.
Declaration
public void ShowAnnotationToolbar(bool enableAnnotationToolbar)
Parameters
Type |
Name |
Description |
System.Boolean |
enableAnnotationToolbar |
|
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 |
System.Threading.Tasks.Task |
Shows or hides the toolbar in the PDF Viewer.
Declaration
public Task ShowToolbarAsync(bool enableToolbar)
Parameters
Type |
Name |
Description |
System.Boolean |
enableToolbar |
|
Returns
Type |
System.Threading.Tasks.Task |
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 |
System.Threading.Tasks.Task |
UndoAsync()
Perform undo action for the edited annotations.
Declaration
Returns
Type |
System.Threading.Tasks.Task |
UnloadAsync()
Unloads the PDF document being displayed in the PDF viewer.
Declaration
public Task UnloadAsync()
Returns
Type |
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 |
|
To update the form fields in the PDF Document.
Declaration
public Task UpdateFormFieldsAsync(FormField formField)
Parameters
Returns
Type |
System.Threading.Tasks.Task |
UpdateMeasurementSettingsAsync()
Update measure settings for existing measure annotations.
Declaration
public Task UpdateMeasurementSettingsAsync()
Returns
Type |
System.Threading.Tasks.Task |
UpdateViewerContainerAsync()
updates the PDF Viewer container width and height from externally.
Declaration
public Task UpdateViewerContainerAsync()
Returns
Type |
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 |
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 |
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 |
System.Threading.Tasks.Task |