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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to attach the PDF document loaded in PDF viewer control to default mail service in Xamarin.Forms platform?

Platform: Xamarin.iOS |
Control: PdfViewer |
Published Date: April 17, 2018 |
Last Revised Date: February 19, 2019 |
.NET Framework: 4.5.1

You can compose a new mail using the native User Interface available in Xamarin.Forms (iOS, Android, and UWP). The following code snippets illustrate how to open the default mail service of the platform and attach the PDF to the mail.


Define the following interface in the portable project



Call the ComposeMail method in code behind using the DependencyService when the mail is to be composed, e.g., when a button is clicked.




Implement the interface in Android platform.




Implement the interface in iOS platform. At least, one email account must be enabled on the device.




Implement the interface in UWP platform.



Sample link:


2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile