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

Annotations added are not visible when the file is opened

Hello all,

I have added some annotations to a PDF file. When I navigate in the documents folder where the PDF is stored on the device and open it on my computer, I can see the annotations fine. However, when I view the exact same PDF file using the CustomWebView as described by Xamarin (Display a Local PDF File in a WebView) the annotations cannot be found on the PDF anymore. Is that an issue with how the PDF is rendered using the HTML5 canvas element by Xamarin or do I need to do all the work and somehow pull the annotations and somehow render them on the file by using their Location property?


1 Reply

PH Praveenkumar H Syncfusion Team May 24, 2016 05:29 AM UTC

Hi Costas, 

Thank you for using syncfusion products, 

At default the custom web view doesn’t have support to display PDF with annotation so we are suggesting you to flatten the annotation before display it in web view, please refer the below code snippet to flatten the annotation 

PdfLoadedDocument doc = new PdfLoadedDocument(); 
doc.Pages[0].Annotations[0].Flatten = true; 
Please try the above code snippet in your side and let us know the result. 

With Regards, 

Live Chat Icon For mobile
Up arrow icon