PDF – Sticky Notes and Comments

Office-Inspired Products
17 November 2020

As you may already know, our most recent release (v20.2) includes a couple of highly requested features for our .NET PDF product libraries. Both our .NET PDF Document API and our PDF Viewer (for WinForms and WPF) now support sticky notes (sticky notes represent text annotations linked to contents within a PDF document). PDF documents that include sticky notes can be printed and exported as necessary.

.NET PDF Document API

Our PDF Document API v20.2 allows you to:

  • Create sticky notes
  • Change sticky note parameters
  • Add replies (including nested responses) and review status for a specific annotation

The following code sample illustrates the ease with which you can create a sticky note in code, specify its parameters, add a reply, and review status:

using DevExpress.Pdf;
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
    //Load document:

    //Add sticky note on the first page:
    PdfTextAnnotationData textAnnotation = processor.AddTextAnnotation(1, new PdfPoint(100, 300));

    //Specify sticky note parameters:
    textAnnotation.Author = "Nancy Davolio";
    textAnnotation.Checked = true;
    textAnnotation.Color = new PdfRGBColor(0.8, 0.2, 0.1);
    textAnnotation.Contents = "Please proofread this document";
    textAnnotation.IconName = PdfTextAnnotationIconName.Check;

    //Save result:

PDF Viewer (for WinForms and WPF)

You can now create sticky notes in code or via our WinForms or WPF PDF Viewer’s UI. To create a sticky note using our PDF Viewer UI, select the Sticky Note tool in the Comment ribbon group and place the sticky note within the document. Specify the desired annotation color and opacity within the drop-down menu.

Call the PdfViewer.AddStickyNote (or PdfViewerControl.AddStickyNote for WPF) method to create a sticky note in code:

pdfViewer.AddStickyNote(new PdfDocumentPosition(1, new PdfPoint(29, 568)), "Comment", Color.Crimson);

You can handle the following PDF Viewer events to manage multiple sticky note-related actions:

  • AnnotationCreating
  • AnnotationCreated
  • AnnotationGotFocus
  • AnnotationLostFocus
  • AnnotationChanged
  • AnnotationDeleting
  • AnnotationDeleted (WPF)

Please note that we renamed existing events and changed associated event arguments to process these events in response to sticky note actions. Please refer to the following breaking change document for more information: T924471

Our PDF Viewers (for WinForms and WPF) now ship with an integrated Comments pane. This pane displays all markup annotations and related comments. You can sort, filter, and show annotations with a specific text string as needed.

When you select an annotation within the pane, the Reply editor is activated. Enter text in the editor and click Reply to add a response to the annotation. Double-click the annotation to edit its contents.

Right-click an annotation and select Set Status to specify the annotation or response review status.

Your Feedback Matters

As always, we welcome your thoughts. Please comment below and let us know what you think about our sticky notes implementation. Should you have technical questions, feel free to contact us via the DevExpress Support Center.

FREE DevExpress Xamarin UI Controls

Deliver high-impact native mobile apps with our feature-rich Data Grid, Scheduler, Chart, TabView, Editors, and utility controls. Reserve your free copy today!
Jim Foye
Jim Foye
We're getting ready to license (at high cost) a PDF viewer codebase written in C++, because the DevExpress viewer was just way too slow.
17 November 2020
Is there any way to export comments into separate file and load it back into pdf as needed?
19 November 2020
Alex B.G. (DevExpress)
Alex B.G. (DevExpress)
Our components don't have an API to export comments into a separate file out of the box.
But, you can implement it yourself using our PDF Document API. The following article should be of help:

Note: This API requires our Universal or Office File API subscription. If you have any other questions, please feel free to contact our Support Team. We will be happy to help you.

19 November 2020
Image To Pdf React Native – AisRafa

Pingback from  Image To Pdf React Native – AisRafa

31 January 2021

Please login or register to post comments.