Annotation visibility in the PDFViewer

Hello,

I started using the PdfViewerControl (winform C#) to load and annotate documents which works perfectly, except that the annotation is not visible in the PdfViewerControl?

  • I see the Markup annotation (Yellow) when I open the PDF using Adobe Acrobat
  • I see a hand mouse cursor when I hover over the annotation in the PdfViewerControl but nothing elese
Image_4906_1752752504640
The PDFViewerDocument

Image_9226_1752752541905


Am I missing something? thank you.

PdfTextMarkupAnnotation textMarkupAnnotation = new PdfTextMarkupAnnotation(allBounds[0])
                        {
                            TextMarkupAnnotationType = PdfTextMarkupAnnotationType.Highlight,
                            Color = new PdfColor(Color.Yellow),
                            Opacity = 0.5f,
                            Text = annotationComment,
                            TextMarkupColor = Color.Yellow
                        };
textMarkupAnnotation.Bounds = boundingBox;
                        page.Annotations.Add(textMarkupAnnotation);

4 Replies 1 reply marked as answer

YM Yathavakrishnan Mohan Syncfusion Team July 18, 2025 01:44 PM UTC

Hi Oussama,

In WinForms PdfViewer, Currently  we don't have support for viewing annotations. As a workaround, we need to flatten the annotations before loading the document in the PDFViewer. Please refer below code snippet for demonstrating how to flatten annotations and load the document:


 PdfLoadedDocument loadedDocument = new PdfLoadedDocument("D:\\Input.pdf");

 

//Flatten the annotations present in the PDF document

 loadedDocument.FlattenAnnotations();

 

 PDFViewer.Load(loadedDocument);

 


Additionally, we have created a sample for your reference and attached it below


We highly recommend using the WPF PdfViewer hosted in a WinForms application instead of the WinForms PdfViewer. The WPF PdfViewer allows you to view the Annotations in document . For your reference, we have provided a sample link demonstrating this integration.


Sample link: GitHub Sample Link


UG Link:
Enhance WinForms PdfViewer with WPF Features | Syncfusion®


Documentation Link: Annotations in WPF Pdf Viewer control | Syncfusion



For Annotations in WPF PdfViewer, please refer to the sample link below.


Sample Link: WPF-PDFViewer-Examples/Annotations at master · SyncfusionExamples/WPF-PDFViewer-Examples


Regards,
Yathavakrishnan M


Attachment: WinForms_PDFViewer_9728eed2.zip

Marked as answer

OM Oussama Melki July 18, 2025 09:04 PM UTC

Thanks a lot for your quick response :) 

I will try the WPF component first and will update the thread!


Thanks.



OM Oussama Melki August 16, 2025 05:42 PM UTC

hello there, just a friendly reminder for anyone having the same issue that using the WPF component worked like a charm :) 



KG Krithika Ganesan Syncfusion Team August 18, 2025 06:38 AM UTC

We are glad that you found the solution. Please let us know if you need any further assistance.


Loader.
Up arrow icon