19 Mar 20231 minute to read
To make migration from Xamarin SfPdfViewer to .NET MAUI SfPdfViewer easier, we kept most of the APIs from Xamarin SfPdfViewer in MAUI SfPdfViewer. However, to maintain the consistency of API naming in MAUI SfPdfViewer, we renamed some of the APIs. The APIs that have been changed in MAUI SfPdfViewer from Xamarin SfPdfViewer are detailed as follows.
Namespaces
Xamarin SfPdfViewer |
.NET MAUI SfPdfViewer |
Syncfusion.SfPdfViewer.XForms |
Syncfusion.Maui.PdfViewer |
Properties
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. |
Events
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. |
Methods
Xamarin SfPdfViewer |
.NET MAUI SfPdfViewer |
Description |
Unload
|
UnloadDocument
|
Unload the current PDF document. |
Upcoming Features
- Built-in toolbar
- Text selection and copy
- Themes
- Accessibility
- Text markup annotations
- Shape annotations
- Ink or Free hand drawing annotation
- Ink eraser tool
- Sticky note annotation
- Free text annotation
- Stamp annotation
- Handwritten signatures
- Lock annotations
- Form Filling
- Save – Form data and Annotations
- Undo/Redo – Form data and Annotations
- Export/Import – Form data and Annotations
- Thumbnail
- Single page view mode
- Print