We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to save loaded PDF document in application level?

The PDF document in the PDF viewer is saved in the application level. PDF viewer returns the PDF document along with the changes made (annotations addition and modification) as stream when tapping the save button in the default toolbar as an event argument of the DocumentSaveInitiated event. This stream is saved as a file locally in Xamarin Forms Android, iOS, and UWP platforms by using DependencyService in Xamarin.Forms. These platform specific saving options are used by defining an interface in the portable project. Refer to the following code snippets.

 

Portable

Define the following interface.

 

C#

 

Load the PDF to PdfViewer and invoke save method with the stream obtained from the DocumentSaveInitiated event using DependencyService. Then, give the name of the interface as type parameter to the method DependencyService.Get<T>().

 

C#

 

Implement the interface in the platform projects with the available platform specific saving options.

 

Android

 

C#

 

iOS

 

C#

 

UWP

 

C#

 

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/ze/SavePDFUsingNative-1744011712

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
9031 07/27/2018 07/27/2018 Xamarin.Forms PdfViewer
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.