Share and Save pdf documents from the PdfViewer Toolbar
Environment
Product Version | 2022.1 222.1 |
Product | PdfViewer for Xamarin |
Description
This artilce will show you how to save and share pdf documents loaded in the Telerik PdfViewer for Xamarin.
Solution
For Sharing files we will use the Xamarin.Essentials API
-
The Share and Save options will be added to the Telerik PdfViewer Toolbar. We will add two new
PdfViewerToolbarItemBase
. Here is the XAMl definition: -
And the namespace used:
-
Then we will load a document in the PdfViewer as embedded resource:
Save and Share pdf documents.
We will need a ViewModel for the bindings we have. PdfViewer.Document
property which we will use for saving the pdf document, and for the two commands we have.
ViewModel with ShareDocumentCommand
and SaveDocumentCommand
implementation:
Share Doument Result:
Save Document Result: