Xamarin SfPdfViewer |
.NET MAUI SfPdfViewer |
Description |
InputFileStream
|
DocumentSource
|
Represents the source object to load PDF files from the stream or byte array. This property helps to load a PDF document during control initialization and switch the documents dynamically. |
ZoomPercentage
|
ZoomFactor
|
Returns and sets the zoom factor. The default value is 1, which represents 100% zoom. This value can be between 1 and 4. |
MinimumZoomPercentage
|
MinZoomFactor
|
Returns and sets the minimum zoom factor. The default value is 0.25. This value should not exceed `MaxZoomFactor`. |
MaximumZoomPercentage
|
MaxZoomFactor
|
Returns and sets the maximum zoom factor. The default value is 4. This value should not be lower than `MinZoomFactor`. |
EnableScrollHead
|
ShowScrollHead
|
Returns and sets the value indicating whether the scroll head can be shown or not. |
BookmarkPaneVisible
|
IsOutlineViewVisible
|
Gets or sets a value indicating whether the outline view is visible. |
EnableDocumentLinkAnnotation
|
EnableDocumentLinkNavigation
|
Gets or sets a value that indicates whether document link annotations (TOC) in the PDF can be interacted with. |
AllowHyperlinkNavigation
|
EnableHyperlinkNavigation
|
Gets or sets a value that indicates whether document link annotations (TOC) in the PDF can be interacted with. |
Bookmarks
|
DocumentOutline
|
Gets the outline for the document. |
IsTextSelectionEnabled
|
EnableTextSelection
|
Gets or sets a value that indicates whether the text selection is enabled or not. The default value is true. |
TextSelectionColor
|
HighlightColor
|
Gets or sets the color to highlight the selected text. The default value is Color.FromRgba(0, 0, 205, 80) . |
CurrentInstanceColor
|
CurrentMatchHighlightColor
|
Gets or sets the color for highlighting the current match of the searched text. The default value is Color.FromRgba(249, 125, 0, 80) .
|
OtherInstanceColor
|
OtherMatchesHighlightColor
|
Gets or sets the color for highlighting the other matches of the searched text. The default value is Color.FromRgba(255, 255, 0, 50) .
|
AnnotationMode
|
AnnotationMode
|
Gets or sets a value indicating the type of annotation that should be drawn using UI interaction on the PDF pages. |
Annotations
|
Annotations
|
Gets the list of annotations in the PDF. |
AnnotationSettings
|
AnnotationSettings
|
Gets or sets the default annotation settings. |
ClearAllAnnotationsCommand
|
RemoveAllAnnotationsCommand
|
The command that removes all annotations from the PDF document. |
PerformUndoCommand
|
UndoCommand
|
The command that performs the undo operation. |
PerformRedoCommand
|
RedoCommand
|
The command that performs the redo operation. |
InkPointsCollection
|
PointsCollection
|
Gets or sets the series of coordinates that represent the ink points of an ink annotation. |
InkAnnotationSettings.Thickness
|
InkAnnotationSettings.BorderWidth
|
Gets or sets the border thickness of an ink annotation. |
ShapeAnnotationSettings.Thickness
|
ShapeAnnotationSettings.BorderWidth
|
Gets or sets the border thickness of shape annotation. |
InkAnnotationSettings.EnableSeparateAttributesForEachStroke
|
InkAnnotationSettings.AggregateInkStrokes
|
Gets or sets a value indicating whether each ink strokes should be treated as separate ink annotations. |
ShapeAnnotationSettings.StrokeColor
|
ShapeAnnotationSettings.Color
|
Gets or sets the default stroke color of shape annotation. |
SelectorSettings.StrokeColor
|
AnnotationSelectorSettings.Color
|
Gets or sets the default color of annotation selector. |
LockedStrokeColor
|
LockedColor
|
Gets or sets the default color of annotation selector when the selected annotation is locked. |
LinePoints
|
LineAnnotation.Points
|
Gets or sets the series of coordinates that represent the starting point and ending point of a line annotation. |
Rectangle
|
ShapeAnnotationSettings.Square
|
Gets or sets the default settings for square annotations. |
Circle
|
AnnotationSettings.Circle
|
Gets or sets the default settings for circle annotations. |
Line
|
AnnotationSettings.Line
|
Gets or sets the default settings for line annotations. |
Arrow
|
AnnotationSettings.Arrow
|
Gets or sets the default settings for arrow annotations. |
Ink
|
AnnotationSettings.Ink
|
Gets or sets the default settings for ink annotations. |
Stamp
|
AnnotationSettings.Stamp
|
Gets or sets the default settings for stamp annotations. |
Selector
|
AnnotationSettings.Selector
|
Gets or sets the default settings for the annotation selector. |
FormField.CanEdit
|
FormField.ReadOnly
|
Gets or sets a value that indicates whether the form field can be edited or not. |
SignatureFormField.HandwrittenSignature
|
SignatureFormField.Signature
|
Gets or sets the ink annotation signature in the signature field. |
PageViewMode
|
PageLayoutMode
|
Gets or sets the layout mode in which the pages will be displayed. |
InkAnnotationSettings.TouchMode
|
InkAnnotationSettings.TouchScreenInputMode
|
Gets or sets a value that indicates the input mode in which the ink strokes should be allowed to be drawn. |
TouchMode.Direct
|
TouchScreenInputMode.FingerAndStylus
|
Allows drawing ink using both finger and stylus. |
IsToolbarVisible
|
ShowToolbars
|
Backing store for the ShowToolbars property. |
Xamarin SfPdfViewer |
.NET MAUI SfPdfViewer |
Description |
UnhandledConditionOccurred
|
DocumentLoadFailed
|
Occurs when the PDF Viewer fails to load a PDF document. That is, when any corrupted document is loaded, when any password-protected document is loaded with an invalid or empty password, or when any non-PDF document is loaded. |
SearchInitiated
, SearchCompleted
|
TextSearchProgress
|
Occurs when the text search is in progress. |
TextSelectionCompleted
|
TextSelectionChanged
|
Occurs when the text is selected or when the selected text is changed. |
|
AnnotationAdded
|
Occurs when an annotation is added to a page. |
|
AnnotationDeselected
|
Occurs when a selected annotation gets deselected. |
|
AnnotationEdited
|
Occurs when annotation is modified. |
|
AnnotationRemoved
|
Occurs when an annotation is removed from the page. |
|
AnnotationSelected
|
Occurs when an annotation is selected. |
|
PropertyChanged
|
Occurs when a property in the PDF Viewer is modified. It allows you to detect page changes occurred in the PDF Viewer. The example below demonstrates how to implement this:
C#
// Create an instance of the SfPdfViewer control
SfPdfViewer pdfViewer = new SfPdfViewer();
// Subscribe to the PropertyChanged event
pdfViewer.PropertyChanged += PdfViewer_PropertyChanged;
// Event handler for the PropertyChanged event
private void PdfViewer_PropertyChanged(object? sender, PropertyChangedEventArgs e)
{
// Typecast the sender to SfPdfViewer
if (sender is SfPdfViewer pdfViewer)
{
// Check if the changed property is PageNumber
if (e.PropertyName == nameof(SfPdfViewer.PageNumber))
{
// Get the current page number
int currentPageNumber = pdfViewer.PageNumber;
}
}
}
|