Category / Section
How to Include Popup Annotation in PDF document using PDF Viewer in Windows Forms?
1 min read
Currently, there is no support to include pop-up annotation in Windows Forms using the PdfViewerControl. However, the following workaround has the support for the same action in Windows Forms.
C#
//Create a new popup annotation PdfPopupAnnotation popupAnnotation = new PdfPopupAnnotation(bounds, textBox.Text); // Set the location popupAnnotation.Location =new System.Drawing.PointF(Point.X, Point.Y); // Set the properties popupAnnotation.Border.Width = 4; //Set the pdf popup icon popupAnnotation.Icon = PdfPopupIcon.Note; //Add this annotation to a new page ldoc.Pages[currentPageIndex].Annotations.Add(popupAnnotation);
Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewerPopup766861027
Steps to be followed:
- Drag the text box control, which is available at the left to the displayed document at the required position.
- Using the text box, you can enter and edit the text and also move and delete the text box control.
- To save the annotations in the document, go to File, and click Save. It will save the text as PopupAnnotation on the saved PDF file in the Output folder.
- To open a new document, go to File, and click Save.