[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Collapse]Office File API
  Demo Application
  Redistribution and Deployment
 [Expand]Spreadsheet Document API
 [Expand]Word Processing Document API
 [Collapse]PDF Document API
   Getting Started
   Coordinate Systems
   Document Generation
  [Expand]PDF Graphics
  [Expand]Document Manipulation
  [Expand]Additional Content
  [Expand]Interactive Forms
   Text Markup Annotations
  [Expand]Document Security
  [Expand]Examples
 [Expand]Excel Export Library
 [Expand]Snap Report API
 [Expand]Zip Compression and Archive API
 [Expand]Barcode Generation API
 [Expand]Unit Conversion API
 [Expand]API Reference
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Text Markup Annotations

The PDF Document API component allows you to create, modify or remove text markup annotations.

You can apply underline, highlight, strikeout, and squiggly underline markup annotation types to a text.

The document consists of the following sections:

Expanded Create Markup Annotations

The PdfDocumentProcessor.AddTextMarkupAnnotation method allows you to add a markup annotation to the specified page area, rectangle or position on the page. This method returns the PdfTextMarkupAnnotationData object that represents the markup annotation data.

Note

If a specified page area does not correspond to the text on the page, the annotation is not created and the PdfDocumentProcessor.AddTextMarkupAnnotation methods return null.

Tip

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T545395.

This example shows how to create a text markup annotation that highlights text in a document and specify the annotation properties.

Expanded Edit Markup Annotations

The following API allows you to change the markup annotation's settings.

API

Description

PdfDocumentProcessor.GetMarkupAnnotationData

Returns all markup annotations from the specified page.

PdfMarkupAnnotationData.Author

Gets or sets the annotation's author.

PdfMarkupAnnotationData.Contents

Specifies the annotation's tooltip text (appears when the mouse hovers over an annotation)

PdfMarkupAnnotationData.Color

Defines the annotation's color

PdfMarkupAnnotationData.Opacity

Gets or sets the annotation's opacity.

This example shows how to change an existing markup annotation's settings in a PDF document.

Expanded Delete Markup Annotations

Call the PdfDocumentProcessor.DeleteMarkupAnnotations method to remove all markup annotations from the specified page.

To delete a specific markup annotation from a page, call the PdfDocumentProcessor.DeleteMarkupAnnotation method. Pass the target PdfMarkupAnnotationData object as an parameter to this method.

This example shows how to delete text markup annotations created by a particular author.

Is this topic helpful?​​​​​​​