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 display PDF document in Xamarin.Forms and draw the ink annotation over the PDF document?

Platform: Xamarin.Forms |
Control: PDF

At present we do not have support for displaying the PDF document in Xamarin. However, as a workaround we can export the PDF document to Images in Windows Azure Service and display the exported images of PDF document in Xamarin.Forms.

The following code snippet illustrates the conversion of PDF document to Images in Windows Azure service.


public MemoryStream GetPage(int pageNum)
if (pdfDocumentView != null && pageNum >= 0 && pageNum < pdfDocumentView.PageCount)
//Export the PDF pages to image
Bitmap bmp = pdfDocumentView.ExportAsImage(pageNum);
MemoryStream stream = new MemoryStream();
//Save the exported PDF page as Image
bmp.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
return stream;
return null;


Please find the Windows Azure Service sample that converts PDF page to image in the following link.

The following code snippet illustrates how to display the image of PDF page in Xamarin with the help of Windows Azure Service.


//Initialize the Windows Azure Service which exports the PDF document to images
net.cloudapp.pdfviewerexportservice.Service1 service = new net.cloudapp.pdfviewerexportservice.Service1();
bool result;
//Load the Pdf Document into service
service.LoadDocument("Object C succinity.pdf", out m_totalPage, out result);
//Convert the specified page of the PDF document to Image
m_currentBitmap = Xamarin.Forms.DependencyService.Get<IPdfImage>().GetPage(0);
//Set the exported image to display on the viewport


This application can also be extended to add ink annotation to the PDF document and save the changes in PDF document in Xamarin platform. The following link contains the sample application which allows the user to add ink annotations to the PDF document.


The following screenshots illustrates the operations that can be performed in the above sample.

To navigate between pages

To add Ink annotation

To save the PDF document




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