Class SfPdfViewer
Represents a view control that displays PDF documents.
Inheritance
System.Object
SfPdfViewer
Implements
System.IDisposable
Assembly: Syncfusion.SfPdfViewer.XForms.dll
public class SfPdfViewer : ContentView, IParentThemeElement, IThemeElement, IDisposable
Constructors
Declaration
Fields
Declaration
public static readonly BindableProperty BookmarkPaneVisibleProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
A bindable property that determines if the bookmark pane is visible.
|
CurrentSearchTextOccurrenceProperty
Declaration
public static readonly BindableProperty CurrentSearchTextOccurrenceProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty EnableScrollHeadProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty HorizontalOffsetProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty InputFileStreamProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty IsToolbarVisibleProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty MaximumZoomPercentageProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
A bindable property which is used to get or set the maximum zoom percentage.
|
Declaration
public static readonly BindableProperty MinimumZoomPercentageProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
PageCountProperty
Declaration
public static readonly BindableProperty PageCountProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
A bindable property that gets the page count of the PDF viewer.
|
PageNumberProperty
Declaration
public static readonly BindableProperty PageNumberProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
A bindable property that gets or sets the page number in the PDF viewer.
|
PageViewModeProperty
Declaration
public static readonly BindableProperty PageViewModeProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
TotalSearchTextOccurrencesProperty
Declaration
public static readonly BindableProperty TotalSearchTextOccurrencesProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty VerticalOffsetProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Declaration
public static readonly BindableProperty ZoomPercentageProperty
Field Value
Type |
Description |
Xamarin.Forms.BindableProperty |
|
Properties
Gets or sets a value to perform hyperlink navigation.
Declaration
public bool AllowHyperlinkNavigation { get; set; }
Property Value
Type |
Description |
System.Boolean |
Default value is true.
|
Gets or sets the type of annotation to be drawn in SfPdfViewer.
Declaration
public AnnotationMode AnnotationMode { get; set; }
Property Value
Type |
Description |
AnnotationMode |
The annotation mode that provides type of annotation to be drawn in sfpdfviewer.
|
Defines command to set the annotation mode in PDF viewer control.
Declaration
public ICommand AnnotationModeCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets or sets the default appearance of textmarkup annotation.
Declaration
public AnnotationSettings AnnotationSettings { get; set; }
Property Value
Type |
Description |
AnnotationSettings |
The annotation settings allows the user to customize the default appearance of the textmarkup annotation.
|
Gets or sets the value that indicates whether bookmark navigation is enabled.
Declaration
public bool BookmarkNavigationEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets the value that indicates whether the bookmark pane is visible.
Declaration
public bool BookmarkPaneVisible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CancelSearchTextCommand
Defines command to cancel the text search operation.
Declaration
public ICommand CancelSearchTextCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the flag to notify whether we can perform redo operation in SfPdfViewer.
Declaration
public bool CanRedo { get; }
Property Value
Type |
Description |
System.Boolean |
The flag that specifies whether the redo operation can be perform or not in sfpdfviewer.
|
Defines command that notifies whether we can perform redo operation in PDF viewer control.
Declaration
public ICommand CanRedoCommand { get; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the flag to notify whether we can perform ink session redo operation in SfPdfViewer.
Declaration
public bool CanRedoInk { get; }
Property Value
Type |
Description |
System.Boolean |
The flag that specifies whether the ink session redo operation can be perform or not in sfpdfviewer.
|
Gets the flag that notifies whether we can perform undo operation in SfPdfViewer.
Declaration
public bool CanUndo { get; }
Property Value
Type |
Description |
System.Boolean |
The flag that specifies whether the undo operation can be perform or not in sfpdfviewer.
|
Defines command that notifies whether we can perform undo operation in PDF viewer control.
Declaration
public ICommand CanUndoCommand { get; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the flag that notifies whether we can perform ink session undo operation in SfPdfViewer.
Declaration
public bool CanUndoInk { get; }
Property Value
Type |
Description |
System.Boolean |
The flag that specifies whether the ink session undo operation can be perform or not in sfpdfviewer.
|
Defines command for clear annotation in PDF viewer control.
Declaration
public ICommand ClearAllAnnotationsCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
CurrentSearchTextOccurrence
Gets the current search text occurrence.
Declaration
public int CurrentSearchTextOccurrence { get; }
Property Value
Type |
Description |
System.Int32 |
|
Gets or sets the functionality to render the PDF document using third party renderers in a SfPdfViewer.
Declaration
public object CustomPdfRenderer { get; set; }
Property Value
Type |
Description |
System.Object |
|
EditFreeTextAnnotationCommand
Defines command to edit the text of free text annotation in PDF viewer control.
Declaration
public ICommand EditFreeTextAnnotationCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Enable or disable the TOC of PDF document.
Declaration
public bool EnableDocumentLinkAnnotation { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value that indicates whether the PDF should be zoomed when it is double tapped in iOS.
Declaration
public bool EnableDoubleTapZooming { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
If set to true enables the displaying, editing and saving of form fields. Otherwise, the form fields are not displayed at all. Default value is true.
Declaration
public bool EnableFormFilling { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value that indicates whether the scroll head should be enabled.
Declaration
public bool EnableScrollHead { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
GoToNextPageCommand
Defines command to navigates to the next page of the PDF document.
Declaration
public ICommand GoToNextPageCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
GoToPageCommand
Defines command to navigates to the specified page of the PDF document.
Declaration
public ICommand GoToPageCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
GoToPreviousPageCommand
Defines command to navigates to the previous page of the PDF document.
Declaration
public ICommand GoToPreviousPageCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the current horizontal scroll position of SfPdfViewer.
Declaration
public float HorizontalOffset { get; set; }
Property Value
Type |
Description |
System.Single |
|
Declaration
public Stream InputFileStream { get; set; }
Property Value
Type |
Description |
System.IO.Stream |
A stream that is used to load and retrieve PDF document in the PDF viewer.
|
IsPageFlipEnabled
Declaration
public bool IsPageFlipEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a flag value that indicates whether password UI view should be enabled or disabled.
Declaration
public bool IsPasswordViewEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
false Password UI view is disabled; otherwise, true.The default value is true.
|
IsTextSearchEnabled
Gets or sets a value that indicates whether text search is enabled.
Declaration
public bool IsTextSearchEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
false if text search is disabled; otherwise, true.The default value is true.
|
IsTextSelectionEnabled
Gets or sets a value that indicates whether text selection is enabled.
Declaration
public bool IsTextSelectionEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
false if text selection is disabled; otherwise, true.The default value is true.
|
Gets or sets a value that indicates whether the built-in toolbar should be visible. Default value is true.
Declaration
public bool IsToolbarVisible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets a value which indicates whether the loaded PDF contains XFA form which cannot be viewed in SfPdfViewer.
Declaration
public bool IsXFAForm { get; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or Sets the maximum zoom percentage.
Declaration
public float MaximumZoomPercentage { get; set; }
Property Value
Type |
Description |
System.Single |
A float that represent the maximum extent to which the document can be magnified. The default value is 400 for Android and 300 for iOS and UWP.
|
Gets or Sets the minimum zoom percentage.
Declaration
public float MinimumZoomPercentage { get; set; }
Property Value
Type |
Description |
System.Single |
A float that represent the minimum extent to which the document can be zoomed out.The default value is 100 for Android and UWP and fitwidth zoom percentage value for iOS .
|
PageCount
Gets the total page count of the PDF document loaded to SfPdfViewer.
Declaration
public int PageCount { get; }
Property Value
Type |
Description |
System.Int32 |
An integer that provides the total number of pages in the loaded PDF document.
|
PageNumber
Gets or sets the number of the current page being displayed in SfPdfViewer.
Declaration
public int PageNumber { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
PageViewMode
Gets or sets the value indicating whether the SfPdfViewer is in continuous reading mode or page-by-page reading mode. Default value is Continuous.
Declaration
public PageViewMode PageViewMode { get; set; }
Property Value
Defines command for the redo action of the annotation in PDF viewer control.
Declaration
public ICommand PerformRedoCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Defines command for the undo action of the annotation in PDF viewer control.
Declaration
public ICommand PerformUndoCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
If set to true, device orientation is maintained when signature mode begins.If set to false, orientation is changed to Landscape. Default value is false. This property is applicable only to phone.
Declaration
public bool PreserveSignaturePadOrientation { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Defines command for the redo action of the ink session in PDF viewer control.
Declaration
public ICommand RedoInkCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Defines command to delete the selected annotation in PDF viewer control.
Declaration
public ICommand RemoveAnnotationCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
SearchNextTextCommand
Defines command to find the next occurrence of the text being searched.
Declaration
public ICommand SearchNextTextCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
SearchPreviousTextCommand
Defines command to find the previous occurrence of the text being searched.
Declaration
public ICommand SearchPreviousTextCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
SearchTextCommand
Defines command to find all occurrences of the given text in the PDF document.
Declaration
public ICommand SearchTextCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the selected annotation type.
Declaration
public IAnnotation SelectedAnnotation { get; }
Property Value
Type |
Description |
IAnnotation |
The selected annotation allows the user to customize appearance of the selected annotation.
|
SelectedText
Gets the text selected in the page of the PDF document.
Declaration
public string SelectedText { get; }
Property Value
Type |
Description |
System.String |
A string that provides the text that is being selected.
|
Gets or sets the selection mode in SfPdfViewer is made by annotation or not.
Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
ShowPageNumber
Gets or sets the value to toggling visibility of page number label while scrolling in PDF viewer control.
Declaration
public bool ShowPageNumber { get; set; }
Property Value
Type |
Description |
System.Boolean |
The flag that specifies the visibility of the page number label while scrolling in PDF viewer control.
|
TextSearchSettings
Declaration
public TextSearchSettings TextSearchSettings { get; set; }
Property Value
Type |
Description |
TextSearchSettings |
The text search settings allows the user to customize the color in which the highlighted matches are filled.
|
TextSelectionSettings
Declaration
public TextSelectionSettings TextSelectionSettings { get; set; }
Property Value
Type |
Description |
TextSelectionSettings |
The text selection settings allows the user to customize the color in which selection is made, color of the bubble head and so on.
|
Gets or sets the properties of toolbar in SfPdfViewer.
Declaration
public Toolbar Toolbar { get; set; }
Property Value
TotalSearchTextOccurrences
Gets the total search text occurances.
Declaration
public int TotalSearchTextOccurrences { get; }
Property Value
Type |
Description |
System.Int32 |
|
Defines command for the undo action of the ink session in PDF viewer control.
Declaration
public ICommand UndoInkCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Defines command to Unload the PDF viewer control.
Declaration
public ICommand UnloadCommand { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
Gets the current vertical scroll position of SfPdfViewer.
Declaration
public float VerticalOffset { get; set; }
Property Value
Type |
Description |
System.Single |
|
Declaration
public ViewMode ViewMode { get; set; }
Property Value
Gets or sets the current zoom percentage of SfPdfViewer.
Declaration
public float ZoomPercentage { get; set; }
Property Value
Type |
Description |
System.Single |
|
Methods
Declaration
public void add_AnnotationMovedOrResized(AnnotationMovedOrResizedEventHandler value)
Parameters
Declaration
public void add_CanRedoInkModified(CanRedoInkModifiedEventHandler value)
Parameters
Declaration
public void add_CanRedoModified(CanRedoModifiedEventHandler value)
Parameters
Declaration
public void add_CanUndoInkModified(CanUndoInkModifiedEventHandler value)
Parameters
Declaration
public void add_CanUndoModified(CanUndoModifiedEventHandler value)
Parameters
Declaration
public void add_DocumentLoaded(DocumentLoadedEventHandler value)
Parameters
Declaration
public void add_DocumentSaveInitiated(DocumentSaveInitiatedEventHandler value)
Parameters
add_FreeTextAnnotationAdded(FreeTextAnnotationAddedEventHandler)
Declaration
public void add_FreeTextAnnotationAdded(FreeTextAnnotationAddedEventHandler value)
Parameters
add_FreeTextAnnotationDeselected(FreeTextAnnotationDeselectedEventHandler)
Declaration
public void add_FreeTextAnnotationDeselected(FreeTextAnnotationDeselectedEventHandler value)
Parameters
add_FreeTextAnnotationEdited(FreeTextAnnotationEditedEventHandler)
Declaration
public void add_FreeTextAnnotationEdited(FreeTextAnnotationEditedEventHandler value)
Parameters
add_FreeTextAnnotationLongPressed(FreeTextAnnotationLongPressedEventHandler)
Declaration
public void add_FreeTextAnnotationLongPressed(FreeTextAnnotationLongPressedEventHandler value)
Parameters
add_FreeTextAnnotationMovedOrResized(FreeTextAnnotationMovedOrResizedEventHandler)
Declaration
public void add_FreeTextAnnotationMovedOrResized(FreeTextAnnotationMovedOrResizedEventHandler value)
Parameters
add_FreeTextAnnotationRemoved(FreeTextAnnotationRemovedEventHandler)
Declaration
public void add_FreeTextAnnotationRemoved(FreeTextAnnotationRemovedEventHandler value)
Parameters
add_FreeTextAnnotationSelected(FreeTextAnnotationSelectedEventHandler)
Declaration
public void add_FreeTextAnnotationSelected(FreeTextAnnotationSelectedEventHandler value)
Parameters
add_FreeTextAnnotationTapped(FreeTextAnnotationTappedEventHandler)
Declaration
public void add_FreeTextAnnotationTapped(FreeTextAnnotationTappedEventHandler value)
Parameters
add_FreeTextPopupAppearing(FreeTextPopupAppearingEventHandler)
Declaration
public void add_FreeTextPopupAppearing(FreeTextPopupAppearingEventHandler value)
Parameters
add_FreeTextPopupDisappeared(FreeTextPopupDisappearedEventHandler)
Declaration
public void add_FreeTextPopupDisappeared(FreeTextPopupDisappearedEventHandler value)
Parameters
Declaration
public void add_HyperlinkClicked(HyperlinkClickedEventHandler value)
Parameters
Declaration
public void add_InkAdded(InkAddedEventHandler value)
Parameters
Declaration
public void add_InkDeselected(InkDeselectedEventHandler value)
Parameters
Declaration
public void add_InkEdited(InkEditedEventHandler value)
Parameters
Declaration
public void add_InkRemoved(InkRemovedEventHandler value)
Parameters
Declaration
public void add_InkSelected(InkSelectedEventHandler value)
Parameters
Declaration
public void add_InkTapped(InkTappedEventHandler value)
Parameters
add_PageChanged(PageChangedEventHandler)
Declaration
public void add_PageChanged(PageChangedEventHandler value)
Parameters
Declaration
public void add_RedoPerformed(RedoPerformedEventHandler value)
Parameters
add_SearchCompleted(TextSearchCompletedEventHandler)
Declaration
public void add_SearchCompleted(TextSearchCompletedEventHandler value)
Parameters
add_SearchInitiated(TextSearchInitiatedEventHandler)
Declaration
public void add_SearchInitiated(TextSearchInitiatedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationAdded(ShapeAnnotationAddedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationDeselected(ShapeAnnotationDeselectedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationEdited(ShapeAnnotationEditedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationRemoved(ShapeAnnotationRemovedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationSelected(ShapeAnnotationSelectedEventHandler value)
Parameters
Declaration
public void add_ShapeAnnotationTapped(ShapeAnnotationTappedEventHandler value)
Parameters
add_TextMarkupAdded(TextMarkupAddedEventHandler)
Declaration
public void add_TextMarkupAdded(TextMarkupAddedEventHandler value)
Parameters
add_TextMarkupDeselected(TextMarkupDeselectedEventHandler)
Declaration
public void add_TextMarkupDeselected(TextMarkupDeselectedEventHandler value)
Parameters
add_TextMarkupEdited(TextMarkupEditedEventHandler)
Declaration
public void add_TextMarkupEdited(TextMarkupEditedEventHandler value)
Parameters
add_TextMarkupLongPressed(TextMarkupLongPressedEventHandler)
Declaration
public void add_TextMarkupLongPressed(TextMarkupLongPressedEventHandler value)
Parameters
add_TextMarkupRemoved(TextMarkupRemovedEventHandler)
Declaration
public void add_TextMarkupRemoved(TextMarkupRemovedEventHandler value)
Parameters
add_TextMarkupSelected(TextMarkupSelectedEventHandler)
Declaration
public void add_TextMarkupSelected(TextMarkupSelectedEventHandler value)
Parameters
add_TextMarkupTapped(TextMarkupTappedEventHandler)
Declaration
public void add_TextMarkupTapped(TextMarkupTappedEventHandler value)
Parameters
add_TextMatchFound(TextMatchFoundEventHandler)
Declaration
public void add_TextMatchFound(TextMatchFoundEventHandler value)
Parameters
add_TextSelectionCompleted(TextSelectionEventHandler)
Declaration
public void add_TextSelectionCompleted(TextSelectionEventHandler value)
Parameters
Declaration
public void add_UndoPerformed(UndoPerformedEventHandler value)
Parameters
Declaration
public void add_UnhandledConditionOccurred(UnhandledConditionEventHandler value)
Parameters
Declaration
public void AddHandwrittenSignature(HandwrittenSignature signature, Dictionary<int, List<Point>> positionCollection)
Parameters
Type |
Name |
Description |
HandwrittenSignature |
signature |
|
System.Collections.Generic.Dictionary<System.Int32, System.Collections.Generic.List<System.Drawing.Point>> |
positionCollection |
|
Declaration
public void AddHandwrittenSignature(HandwrittenSignature signature, Point position, int pageNumber = -1)
Parameters
Type |
Name |
Description |
HandwrittenSignature |
signature |
|
System.Drawing.Point |
position |
|
System.Int32 |
pageNumber |
|
Declaration
public void AddHandwrittenSignature(HandwrittenSignature signature, int pageNumber = -1)
Parameters
To include the custom Stamp to the page.
Declaration
public void AddStamp(View customView, int pageNumber)
Parameters
Type |
Name |
Description |
Xamarin.Forms.View |
customView |
|
System.Int32 |
pageNumber |
|
To include the custom Stamp to the page.
Declaration
public void AddStamp(View customView, int pageNumber, Point position)
Parameters
Type |
Name |
Description |
Xamarin.Forms.View |
customView |
|
System.Int32 |
pageNumber |
|
Xamarin.Forms.Point |
position |
|
To include the custom Stamp to the page.
Declaration
public void AddStamp(View customView, int pageNumber, Rectangle bounds)
Parameters
Type |
Name |
Description |
Xamarin.Forms.View |
customView |
|
System.Int32 |
pageNumber |
|
Xamarin.Forms.Rectangle |
bounds |
|
Cancels the text Search operation.
Declaration
public void CancelSearch()
Delete all the annotations in the whole PDF document.
Declaration
public void ClearAllAnnotations()
Delete all the annotations in the given page.
Declaration
public void ClearAllAnnotations(int pageNumber)
Parameters
Type |
Name |
Description |
System.Int32 |
pageNumber |
The page in which all the annotations to be cleared.
|
Declaration
public void ClearUndoRedoStack()
Disposes the managed resources.
Declaration
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
EditFreeTextAnnotation()
Edits the selected free text annotation in the PDF document.
Declaration
public void EditFreeTextAnnotation()
Save or unsave session ink.
Declaration
public void EndInkSession(bool save)
Parameters
Type |
Name |
Description |
System.Boolean |
save |
The.
|
Exports the annotation data into the specified format.
Declaration
public Stream ExportAnnotations(AnnotationDataFormat format)
Parameters
Type |
Name |
Description |
AnnotationDataFormat |
format |
The format in which the exported data are going to be saved.
|
Returns
Type |
Description |
System.IO.Stream |
|
Exports the annotation data into the specified format asynchronously.
Declaration
public Task<Stream> ExportAnnotationsAsync(AnnotationDataFormat format, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
AnnotationDataFormat |
format |
The format in which the annotation data has to be exported.
|
System.Threading.CancellationToken |
cancellationToken |
A cancellation token to receive notice of cancellation.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream> |
|
Exports the page with the given index as an image.
Declaration
public Stream ExportAsImage(int pageIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
Index of the page to be exported.
|
Returns
Type |
Description |
System.IO.Stream |
|
Exports the pages with indices in the given range as images.
Declaration
public Stream[] ExportAsImage(int pageStartIndex, int pageEndIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
pageStartIndex |
Start index in the range of pages to be exported.
|
System.Int32 |
pageEndIndex |
End index in the range of pages to be exported.
|
Returns
Type |
Description |
System.IO.Stream[] |
|
Exports the pages with indices in the given range as images and scales the images by the given factor.
Declaration
public Stream[] ExportAsImage(int pageStartIndex, int pageEndIndex, float scaleFactor)
Parameters
Type |
Name |
Description |
System.Int32 |
pageStartIndex |
Start index in the range of pages to be exported.
|
System.Int32 |
pageEndIndex |
End index in the range of pages to be exported.
|
System.Single |
scaleFactor |
The factor by which the images’ dimensions are to be scaled.
|
Returns
Type |
Description |
System.IO.Stream[] |
|
Exports the page with the given index as an image and scales the image by the given factor.
Declaration
public Stream ExportAsImage(int pageIndex, float scaleFactor)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
Index of the page to be exported.
|
System.Single |
scaleFactor |
The factor by which the image dimensions are to be scaled.
|
Returns
Type |
Description |
System.IO.Stream |
|
Exports the page with the given index as an image asynchrously.
Declaration
public Task<Stream> ExportAsImageAsync(int pageIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
Index of the page to be exported.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream> |
|
Exports the pages with indices in the given range as images asynchrously.
Declaration
public Task<Stream[]> ExportAsImageAsync(int pageStartIndex, int pageEndIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
pageStartIndex |
Start index in the range of pages to be exported.
|
System.Int32 |
pageEndIndex |
End index in the range of pages to be exported.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream[]> |
|
Exports the pages with indices in the given range as images asynchrously and scales the images by the given factor.
Declaration
public Task<Stream[]> ExportAsImageAsync(int pageStartIndex, int pageEndIndex, float scaleFactor)
Parameters
Type |
Name |
Description |
System.Int32 |
pageStartIndex |
Start index in the range of pages to be exported.
|
System.Int32 |
pageEndIndex |
End index in the range of pages to be exported.
|
System.Single |
scaleFactor |
The factor by which the images’ dimensions are to be scaled.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream[]> |
|
Exports the page with the given index as an image asynchrously and scales the image by the given factor.
Declaration
public Task<Stream> ExportAsImageAsync(int pageIndex, float scaleFactor)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
Index of the page to be exported.
|
System.Single |
scaleFactor |
The factor by which the image dimensions are to be scaled.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream> |
|
Exports the form field values into the specified format.
Declaration
public Stream ExportFormData(DataFormat format, string name)
Parameters
Type |
Name |
Description |
DataFormat |
format |
The format in which the exported data are going to be saved.
|
System.String |
name |
Name of the PDF file whose form fields the exported forms data file fills.
|
Returns
Type |
Description |
System.IO.Stream |
|
Navigates the PdfViewer to the location specified by the given bookmark destination.
Declaration
public void GoToBookmark(PdfBookmark bookmark)
Parameters
Type |
Name |
Description |
PdfBookmark |
bookmark |
The bookmark to navigate to.
|
GoToNextPage()
Navigates to the next page of the PDF document.
Declaration
public void GoToNextPage()
GoToPage(Int32)
Navigates to the specified page of the PDF document.
Declaration
public void GoToPage(int pageNumber)
Parameters
Type |
Name |
Description |
System.Int32 |
pageNumber |
The number of the page to navigate to.
|
GoToPreviousPage()
Navigates to the previous page of the PDF document.
Declaration
public void GoToPreviousPage()
Imports the annotation data in the specified format into the PDF.
Declaration
public void ImportAnnotations(Stream inputStream, AnnotationDataFormat format)
Parameters
Type |
Name |
Description |
System.IO.Stream |
inputStream |
Stream read from the annotation data file.
|
AnnotationDataFormat |
format |
The format of the annotation data file from which the inputStream is read.
|
Imports the form data in the specified format into the form fields of the PDF.
Declaration
public void ImportFormData(Stream inputStream, DataFormat format)
Parameters
Type |
Name |
Description |
System.IO.Stream |
inputStream |
Stream read from the form data file.
|
DataFormat |
format |
The format of the form data file from which the inputStream is read.
|
Layout the childviews present in SfPdfViewer.
Declaration
protected override void LayoutChildren(double x, double y, double width, double height)
Parameters
Type |
Name |
Description |
System.Double |
x |
X co-ordinate of SfPdfViewer.
|
System.Double |
y |
X co-ordinate of SfPdfViewer.
|
System.Double |
width |
Width of SfPdfViewer.
|
System.Double |
height |
Height of SfPdfViewer.
|
Loads a PDF document to SfPdfViewer from the specified stream.
Declaration
public void LoadDocument(Stream stream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
The stream that contains the data of the PDF document.
|
Declaration
public void LoadDocument(Stream stream, string password)
Parameters
Type |
Name |
Description |
System.IO.Stream |
stream |
|
System.String |
password |
|
Declaration
public Task<Task> LoadDocumentAsync(Stream documentStream, string password, CancellationTokenSource cancellationTokenSource)
Parameters
Type |
Name |
Description |
System.IO.Stream |
documentStream |
|
System.String |
password |
|
System.Threading.CancellationTokenSource |
cancellationTokenSource |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Threading.Tasks.Task> |
|
Loads the PDF document from the specified stream asynchronously. It has the same effect as the LoadDocument(Stream) method.
Declaration
public Task<Task> LoadDocumentAsync(Stream documentStream, CancellationTokenSource cancellationTokenSource)
Parameters
Type |
Name |
Description |
System.IO.Stream |
documentStream |
|
System.Threading.CancellationTokenSource |
cancellationTokenSource |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Threading.Tasks.Task> |
|
Declaration
public void OnDocumentLoaded(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
The instance of SfPdfViewer which is the source of the event.
|
System.EventArgs |
e |
The System.EventArgs that contains the event data.
|
OnPageChanged(Object, PageChangedEventArgs)
Declaration
public void OnPageChanged(object sender, PageChangedEventArgs e)
Parameters
Declaration
public void PerformRedo()
Declaration
public void PerformUndo()
Declaration
Prints the PDF with given file name.
Declaration
public void Print(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
The name with which the printed PDF will be saved.
|
Perform redo opeartion on ink session.
Declaration
Declaration
public void remove_AnnotationMovedOrResized(AnnotationMovedOrResizedEventHandler value)
Parameters
Declaration
public void remove_CanRedoInkModified(CanRedoInkModifiedEventHandler value)
Parameters
Declaration
public void remove_CanRedoModified(CanRedoModifiedEventHandler value)
Parameters
Declaration
public void remove_CanUndoInkModified(CanUndoInkModifiedEventHandler value)
Parameters
Declaration
public void remove_CanUndoModified(CanUndoModifiedEventHandler value)
Parameters
Declaration
public void remove_DocumentLoaded(DocumentLoadedEventHandler value)
Parameters
Declaration
public void remove_DocumentSaveInitiated(DocumentSaveInitiatedEventHandler value)
Parameters
remove_FreeTextAnnotationAdded(FreeTextAnnotationAddedEventHandler)
Declaration
public void remove_FreeTextAnnotationAdded(FreeTextAnnotationAddedEventHandler value)
Parameters
remove_FreeTextAnnotationDeselected(FreeTextAnnotationDeselectedEventHandler)
Declaration
public void remove_FreeTextAnnotationDeselected(FreeTextAnnotationDeselectedEventHandler value)
Parameters
remove_FreeTextAnnotationEdited(FreeTextAnnotationEditedEventHandler)
Declaration
public void remove_FreeTextAnnotationEdited(FreeTextAnnotationEditedEventHandler value)
Parameters
remove_FreeTextAnnotationLongPressed(FreeTextAnnotationLongPressedEventHandler)
Declaration
public void remove_FreeTextAnnotationLongPressed(FreeTextAnnotationLongPressedEventHandler value)
Parameters
remove_FreeTextAnnotationMovedOrResized(FreeTextAnnotationMovedOrResizedEventHandler)
Declaration
public void remove_FreeTextAnnotationMovedOrResized(FreeTextAnnotationMovedOrResizedEventHandler value)
Parameters
remove_FreeTextAnnotationRemoved(FreeTextAnnotationRemovedEventHandler)
Declaration
public void remove_FreeTextAnnotationRemoved(FreeTextAnnotationRemovedEventHandler value)
Parameters
remove_FreeTextAnnotationSelected(FreeTextAnnotationSelectedEventHandler)
Declaration
public void remove_FreeTextAnnotationSelected(FreeTextAnnotationSelectedEventHandler value)
Parameters
remove_FreeTextAnnotationTapped(FreeTextAnnotationTappedEventHandler)
Declaration
public void remove_FreeTextAnnotationTapped(FreeTextAnnotationTappedEventHandler value)
Parameters
remove_FreeTextPopupAppearing(FreeTextPopupAppearingEventHandler)
Declaration
public void remove_FreeTextPopupAppearing(FreeTextPopupAppearingEventHandler value)
Parameters
remove_FreeTextPopupDisappeared(FreeTextPopupDisappearedEventHandler)
Declaration
public void remove_FreeTextPopupDisappeared(FreeTextPopupDisappearedEventHandler value)
Parameters
Declaration
public void remove_HyperlinkClicked(HyperlinkClickedEventHandler value)
Parameters
Declaration
public void remove_InkAdded(InkAddedEventHandler value)
Parameters
Declaration
public void remove_InkDeselected(InkDeselectedEventHandler value)
Parameters
Declaration
public void remove_InkEdited(InkEditedEventHandler value)
Parameters
Declaration
public void remove_InkRemoved(InkRemovedEventHandler value)
Parameters
Declaration
public void remove_InkSelected(InkSelectedEventHandler value)
Parameters
Declaration
public void remove_InkTapped(InkTappedEventHandler value)
Parameters
remove_PageChanged(PageChangedEventHandler)
Declaration
public void remove_PageChanged(PageChangedEventHandler value)
Parameters
Declaration
public void remove_RedoPerformed(RedoPerformedEventHandler value)
Parameters
remove_SearchCompleted(TextSearchCompletedEventHandler)
Declaration
public void remove_SearchCompleted(TextSearchCompletedEventHandler value)
Parameters
remove_SearchInitiated(TextSearchInitiatedEventHandler)
Declaration
public void remove_SearchInitiated(TextSearchInitiatedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationAdded(ShapeAnnotationAddedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationDeselected(ShapeAnnotationDeselectedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationEdited(ShapeAnnotationEditedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationRemoved(ShapeAnnotationRemovedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationSelected(ShapeAnnotationSelectedEventHandler value)
Parameters
Declaration
public void remove_ShapeAnnotationTapped(ShapeAnnotationTappedEventHandler value)
Parameters
remove_TextMarkupAdded(TextMarkupAddedEventHandler)
Declaration
public void remove_TextMarkupAdded(TextMarkupAddedEventHandler value)
Parameters
remove_TextMarkupDeselected(TextMarkupDeselectedEventHandler)
Declaration
public void remove_TextMarkupDeselected(TextMarkupDeselectedEventHandler value)
Parameters
remove_TextMarkupEdited(TextMarkupEditedEventHandler)
Declaration
public void remove_TextMarkupEdited(TextMarkupEditedEventHandler value)
Parameters
remove_TextMarkupLongPressed(TextMarkupLongPressedEventHandler)
Declaration
public void remove_TextMarkupLongPressed(TextMarkupLongPressedEventHandler value)
Parameters
remove_TextMarkupRemoved(TextMarkupRemovedEventHandler)
Declaration
public void remove_TextMarkupRemoved(TextMarkupRemovedEventHandler value)
Parameters
remove_TextMarkupSelected(TextMarkupSelectedEventHandler)
Declaration
public void remove_TextMarkupSelected(TextMarkupSelectedEventHandler value)
Parameters
remove_TextMarkupTapped(TextMarkupTappedEventHandler)
Declaration
public void remove_TextMarkupTapped(TextMarkupTappedEventHandler value)
Parameters
remove_TextMatchFound(TextMatchFoundEventHandler)
Declaration
public void remove_TextMatchFound(TextMatchFoundEventHandler value)
Parameters
remove_TextSelectionCompleted(TextSelectionEventHandler)
Declaration
public void remove_TextSelectionCompleted(TextSelectionEventHandler value)
Parameters
Declaration
public void remove_UndoPerformed(UndoPerformedEventHandler value)
Parameters
Declaration
public void remove_UnhandledConditionOccurred(UnhandledConditionEventHandler value)
Parameters
Clears the selected annotation.
Declaration
public void RemoveAnnotation(IAnnotation annotation)
Parameters
Type |
Name |
Description |
IAnnotation |
annotation |
Selected annotation to be deleted.
|
Saves the PDF document using SfPdfViewer.
Declaration
public Stream SaveDocument()
Returns
Type |
Description |
System.IO.Stream |
Saved PDF document stream.
|
Saves the document and returns the stream.
Declaration
public Stream SaveDocument(bool flattenForm)
Parameters
Type |
Name |
Description |
System.Boolean |
flattenForm |
Value indicating whether the form fields in the PDF are to be flattened while saving. Default value is false .
|
Returns
Type |
Description |
System.IO.Stream |
Saved PDF document as stream.
|
Declaration
public Task<Stream> SaveDocumentAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.IO.Stream> |
|
Scrolls the SfPdfViewer to a position relative to the horizontal offset and vertical offset values.
Declaration
public void ScrollToOffset(float horizontalOffset, float verticalOffset)
Parameters
Type |
Name |
Description |
System.Single |
horizontalOffset |
The value to which the control scrolls horizontally.
|
System.Single |
verticalOffset |
The value to which the control scrolls vertically.
|
Finds the next occurrence of the text being searched.
Declaration
Finds the next occurrence of the text being searched.
Declaration
public void SearchNext(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text to be searched.
|
Finds the previous occurrence of the text being searched.
Declaration
public void SearchPrevious()
Finds the previous occurrence of the text being searched.
Declaration
public void SearchPrevious(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text to be searched.
|
SearchText(String)
Finds all occurrences of the given text in the PDF document.
Declaration
public void SearchText(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text to be searched.
|
Perform undo opeartion on ink session.
Declaration
Unloads the PDF viewer control.
Declaration
Events
Occurs when an ink is moved.
Declaration
public event AnnotationMovedOrResizedEventHandler AnnotationMovedOrResized
Event Type
Occurs when a bookmark is navigated to
Declaration
public event EventHandler<BookmarkNavigationOccurredEventArgs> BookmarkNavigationOccurred
Event Type
Occurs when an redo property is modified.
Declaration
public event CanRedoInkModifiedEventHandler CanRedoInkModified
Event Type
Occurs when an redo property is modified.
Declaration
public event CanRedoModifiedEventHandler CanRedoModified
Event Type
Occurs when an undo property is modified.
Declaration
public event CanUndoInkModifiedEventHandler CanUndoInkModified
Event Type
Occurs when an undo property is modified.
Declaration
public event CanUndoModifiedEventHandler CanUndoModified
Event Type
Occurs when a PDF document is finished loading to SfPdfViewer.
Declaration
public event DocumentLoadedEventHandler DocumentLoaded
Event Type
Occurs when an document is saved
Declaration
public event DocumentSaveInitiatedEventHandler DocumentSaveInitiated
Event Type
Occurs when double tapped.
Declaration
public event EventHandler<TouchInteractionEventArgs> DoubleTapped
Event Type
FreeTextAnnotationAdded
Occurs when free text annotation is added.
Declaration
public event FreeTextAnnotationAddedEventHandler FreeTextAnnotationAdded
Event Type
FreeTextAnnotationDeselected
Occurs when free text annotation is deselected.
Declaration
public event FreeTextAnnotationDeselectedEventHandler FreeTextAnnotationDeselected
Event Type
FreeTextAnnotationEdited
Occurs when an undo operation is performed.
Declaration
public event FreeTextAnnotationEditedEventHandler FreeTextAnnotationEdited
Event Type
FreeTextAnnotationLongPressed
Occurs when free text annotation is long pressed.
Declaration
public event FreeTextAnnotationLongPressedEventHandler FreeTextAnnotationLongPressed
Event Type
FreeTextAnnotationMovedOrResized
Occurs when free text annotation is moved or resized.
Declaration
public event FreeTextAnnotationMovedOrResizedEventHandler FreeTextAnnotationMovedOrResized
Event Type
FreeTextAnnotationRemoved
Occurs when free text annotation is removed.
Declaration
public event FreeTextAnnotationRemovedEventHandler FreeTextAnnotationRemoved
Event Type
FreeTextAnnotationSelected
Occurs when free text annotation is selected.
Declaration
public event FreeTextAnnotationSelectedEventHandler FreeTextAnnotationSelected
Event Type
FreeTextAnnotationTapped
Occurs when free text annotation is tapped.
Declaration
public event FreeTextAnnotationTappedEventHandler FreeTextAnnotationTapped
Event Type
Occurs when edit text popup view is appearing
Declaration
public event FreeTextPopupAppearingEventHandler FreeTextPopupAppearing
Event Type
Occurs when edit text popup is disappearing
Declaration
public event FreeTextPopupDisappearedEventHandler FreeTextPopupDisappeared
Event Type
Occurs when hyperlink click operation is performed.
Declaration
public event HyperlinkClickedEventHandler HyperlinkClicked
Event Type
Occurs when an ink is added.
Declaration
public event InkAddedEventHandler InkAdded
Event Type
Occurs when an ink is deselected.
Declaration
public event InkDeselectedEventHandler InkDeselected
Event Type
Occurs when an ink is edited.
Declaration
public event InkEditedEventHandler InkEdited
Event Type
Occurs when an ink is removed.
Declaration
public event InkRemovedEventHandler InkRemoved
Event Type
Occurs when an ink is selected.
Declaration
public event InkSelectedEventHandler InkSelected
Event Type
Occurs when an ink is tapped.
Declaration
public event InkTappedEventHandler InkTapped
Event Type
Occurs when long pressed.
Declaration
public event EventHandler<TouchInteractionEventArgs> LongPressed
Event Type
PageChanged
Occurs when the value of PageNumber property changes.
Declaration
public event PageChangedEventHandler PageChanged
Event Type
PageViewModeChanged
Declaration
public event EventHandler<PageViewModeChangedEventArgs> PageViewModeChanged
Event Type
Occurs when Password Error encountered.
Declaration
public event EventHandler<PasswordErrorOccurredEventArgs> PasswordErrorOccurred
Event Type
Occurs when password view cancel operation is performed.
Declaration
public event EventHandler PasswordViewCancelButtonClicked
Event Type
Type |
Description |
System.EventHandler |
|
Occurs when an redo operation is performed.
Declaration
public event RedoPerformedEventHandler RedoPerformed
Event Type
Occurs when a text search operation is completed.
Declaration
public event TextSearchCompletedEventHandler SearchCompleted
Event Type
Occurs when a text search operation is initiated.
Declaration
public event TextSearchInitiatedEventHandler SearchInitiated
Event Type
Occurs when a shape annotation added.
Declaration
public event ShapeAnnotationAddedEventHandler ShapeAnnotationAdded
Event Type
Occurs when a shape annotation Deselected.
Declaration
public event ShapeAnnotationDeselectedEventHandler ShapeAnnotationDeselected
Event Type
Occurs when a shape annotation edited.
Declaration
public event ShapeAnnotationEditedEventHandler ShapeAnnotationEdited
Event Type
Occurs when a shape annotation removed.
Declaration
public event ShapeAnnotationRemovedEventHandler ShapeAnnotationRemoved
Event Type
Occurs when a shape annotation Selected.
Declaration
public event ShapeAnnotationSelectedEventHandler ShapeAnnotationSelected
Event Type
Occurs when a shape annotation tapped.
Declaration
public event ShapeAnnotationTappedEventHandler ShapeAnnotationTapped
Event Type
Occurs when a customview is added.
Declaration
public event EventHandler<StampAnnotationAddedEventArgs> StampAnnotationAdded
Event Type
Occurs when a custom view is deselected
Declaration
public event EventHandler<StampAnnotationDeselectedEventArgs> StampAnnotationDeselected
Event Type
Occurs when a custom view properties are modified
Declaration
public event EventHandler<StampAnnotationMovedOrResizedEventArgs> StampAnnotationMovedOrResized
Event Type
Occurs when a custom view is removed
Declaration
public event EventHandler<StampAnnotationRemovedEventArgs> StampAnnotationRemoved
Event Type
Occurs when a customview is selected.
Declaration
public event EventHandler<StampAnnotationSelectedEventArgs> StampAnnotationSelected
Event Type
Occurs when a customview is tapped.
Declaration
public event EventHandler<StampAnnotationTappedEventArgs> StampAnnotationTapped
Event Type
Declaration
public event EventHandler<TouchInteractionEventArgs> Tapped
Event Type
TextMarkupAdded
Occurs when an textmarkup annotation is added.
Declaration
public event TextMarkupAddedEventHandler TextMarkupAdded
Event Type
TextMarkupDeselected
Occurs when an textmarkup annotation is deselected.
Declaration
public event TextMarkupDeselectedEventHandler TextMarkupDeselected
Event Type
TextMarkupEdited
Occurs when an textmarkup annotation is edited.
Declaration
public event TextMarkupEditedEventHandler TextMarkupEdited
Event Type
TextMarkupLongPressed
Occurs when an textmarkup annotation is long pressed.
Declaration
public event TextMarkupLongPressedEventHandler TextMarkupLongPressed
Event Type
TextMarkupRemoved
Occurs when an textmarkup annotation is removed.
Declaration
public event TextMarkupRemovedEventHandler TextMarkupRemoved
Event Type
TextMarkupSelected
Occurs when an textmarkup annotation is selected.
Declaration
public event TextMarkupSelectedEventHandler TextMarkupSelected
Event Type
TextMarkupTapped
Occurs when an textmarkup annotation is selected.
Declaration
public event TextMarkupTappedEventHandler TextMarkupTapped
Event Type
TextMatchFound
Occurs when a match for the searched text found.
Declaration
public event TextMatchFoundEventHandler TextMatchFound
Event Type
TextSelectionCompleted
Occurs when text selection is completed.
Declaration
public event TextSelectionEventHandler TextSelectionCompleted
Event Type
Occurs when an undo operation is performed.
Declaration
public event UndoPerformedEventHandler UndoPerformed
Event Type
Occurs when an unhandled condition occurs.
Declaration
public event UnhandledConditionEventHandler UnhandledConditionOccurred
Event Type
Implements
System.IDisposable