Document Processing (Office File API) — Early Access Preview (v25.1) — Redaction API, Export Enhancements and More
This post outlines what’s inside our current Early Access Preview build (v25.1), which is available for download for our Universal and DXperience subscribers.
Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please back up your project and other important data before installing Early Access and CTP builds. This EAP may not include all features/products we expect to ship in our v25.1 release cycle. As its name implies, the EAP offers an early preview of what we expect to ship in two months.
For additional information on new Document Processing/Office File API capabilities we expect to ship in June, please refer to our v25.1 roadmap.
PDF Redaction API (Discuss This Feature)
v25.1 will include new APIs to create and manage redaction annotations in PDF documents. This new capability makes it possible to completely remove sensitive or private content from your documents and add a colored overlay with text over the redacted area.
The redaction process includes two steps: create a redaction annotation with the required appearance in the PDF page area, and apply the redaction annotations by clearing the content in the redacted area and applying the overlay from the appearance settings. These steps are independent so you can implement the following usage scenarios:
- Review workflow: Create redaction annotations, save the document, and send it for review. The recipient can approve or comment on the redactions before applying them.
- On-demand redaction: Load a document with redaction annotations, inspect redacted areas and comments, and apply redactions if necessary.
- Direct redaction: Create and apply all redaction annotations in your PDF document at once.
Below I'll describe how you can implement these usage scenarios in code.
Create a Redaction Annotation
The Redaction functionality is available via the PDF Facade API. To create a redaction annotation, obtain the PdfDocumentFacade
instance, retrieve the required PDF page from the PdfDocumentFacade.Pages
collection and call the PdfPageFacade.AddRedactAnnotation
method. The AddRedactAnnotation
method returns the PdfRedactAnnotationFacade
object, which you can use to adjust the appearance settings for the redaction annotation. The appearance includes the overlay text, text font settings (font name, color, size, and style) and additional settings like text repeating, alignment and background color.
PdfDocumentProcessor pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.LoadDocument("Demo.pdf");
PdfDocumentFacade documentFacade = pdfProcessor.DocumentFacade;
PdfRectangle pageCropBox = pdfProcessor.Document.Pages[0].CropBox;
PdfRectangle redactBounds =
new PdfRectangle(0, pageCropBox.Height-50, 200, pageCropBox.Height);
// Add a redaction annotation at the top left corner of the first document page
PdfRedactAnnotationFacade redactAnnotation =
documentFacade.Pages[0].AddRedactAnnotation(redactBounds);
redactAnnotation.Author = "Jane Doe";
// Setup the redaction annotation appearance
redactAnnotation.FillColor = new PdfRGBColor(0, 0, 0);
redactAnnotation.FontColor = new PdfRGBColor(1, 1, 1);
redactAnnotation.FontName = "Calibri";
redactAnnotation.FontSize = 0; // enables font auto-size
redactAnnotation.OverlayText = "Classified";
redactAnnotation.TextJustification = PdfTextJustification.Centered;
redactAnnotation.RepeatText = false;
// Save the document with the redaction annotation and send it for review
pdfProcessor.SaveDocument("output_to_review.pdf");
Apply Redaction Annotations
The new API allows you to apply a single redaction annotation, all annotations for a specific page, or all redaction annotations in the entire document. To complete, use the PdfRedactAnnotationFacade.Apply
, PdfPageFacade.ApplyRedactAnnotations
or PdfDocumentFacade.ApplyRedactAnnotations
method respectively.
Additionally, it is possible to use PdfClearContentOptions
to specify the type of the content that should be removed (text, graphics, images, or annotations) when you apply the redaction.
PdfDocumentProcessor pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.LoadDocument("Demo.pdf");
PdfDocumentFacade documentFacade = pdfProcessor.DocumentFacade;
// Review redaction annotations and apply
foreach (var page in documentFacade.Pages)
{
var redactionAnnotations =
page.Annotations.Where(annotation => annotation is PdfRedactAnnotationFacade).ToList();
foreach(PdfRedactAnnotationFacade annotation in redactionAnnotations)
{
if (annotation.Author == "Jane Doe")
annotation.Apply();
}
}
// Apply redaction annotations for a page
documentFacade.Pages[0].ApplyRedactAnnotations();
// Apply redaction annotations for the whole document
documentFacade.ApplyRedactAnnotations();
// Specify the clear content settings and apply redaction annotations
documentFacade.ApplyRedactAnnotations(new PdfClearContentOptions()
{
ClearAnnotations = true,
ClearImages = true,
ClearText = true,
ClearGraphics = false
});
Usage in WinForms and WPF PDF Viewer Controls
Of course, it is also possible to enhance your WinForms or WPF PDF Viewer application with the new redaction functionality. Once you obtain the PdfDocumentFacade
instance using the PdfViewer.GetDocumentFacade
extension method, you will be able to create and apply redaction annotation using the APIs I described above.
Note: The PdfDocumentFacade
class is defined in the DevExpress.Docs.v25.1.dll assembly. Add this assembly to your project or install the DevExpress.Document.Processor Nuget Package from the Offline Package source to use PdfDocumentFacade members. You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this class in production code.
We prepared the code example that illustrates how to select an area in a PDF document opened in a PDF Viewer application and apply the redaction annotation to this area. Here is the link for your reference: PDF Viewer for WinForms - Add Redaction Annotations Using Viewer Coordinates
AI-powered Behaviors in WinForms PDF Viewer (Discuss This Feature)
You can now integrate AI-powered Summarize, Translate and Ask AI features into our WinForms PDF Viewer. These functionalities allow you to summarize, translate to chosen languages and ask custom questions about the PDF content from the whole PDF document, active page or document selection. The target mode can be selected from the AI dialogs available via the PDF Viewer context menu.

AI-powered behaviors for WinForms PDF Viewer use the same prerequisites and integration mechanisms as other AI extensions in our WinForms product line. You can learn more about the AI usage and integration in our documentation: DevExpress AI-powered Extensions for WinForms
Word Processing Document API and Rich Text Editors for WinForms and WPF
DOC Format Export Enhancements
During the last release cycle, we received feedback related to the DOC format export in our word processing components. After a particular update, Microsoft Word started to interpret DOC files generated from other documents with complex structures as invalid. Considering the popularity and importance of the DOC file format in word-processing usage scenarios, we made it our primary goal to address this limitation in the upcoming release.
Good news—in v25.1, we redesigned our DOC format export engine and successfully addressed these limitations. Now, all of the documents and usage scenarios with DOC format conversion you shared with us are working as expected and provide valid DOC output.
We would appreciate your feedback on this matter. If you have experienced issues with DOC format conversion and subsequently opening documents in Microsoft Word, please take a moment to evaluate our update (these changes are also available for v24.2) and leave your feedback here: Ticket Discussion
Right-to-Left (RTL) Engine Enhancements
We enhanced our Right-to-Left text rendering engine in the Word Processing Document API library and WinForms and WPF Rich Text components. This functionality enables correct text order in paragraphs, numbering lists, tables and shapes with bi-directional text (mixed Right-to-Left and Left-to-Right text blocks). The enhanced behavior applies when you preview or edit bi-directional text in visual Rich Text controls, or when you generate a PDF or image output (in the User Interface or code).
Convert Word Content Controls to PDF AcroForms Fields (Discuss This Feature)
We enhanced the Word Document to PDF export engine and supported the built-in conversion of Word content controls to PDF AcroForm fields. With this functionality, you can now create fillable PDF forms from your Word documents with ease.
Our Word-processing tools automatically convert the following content control types:
- Plain Text;
- Rich Text;
- Picture;
- Check Box;
- Combo Box;
- Drop-Down List;
- Date Picker.
Note: Building Block and Repeating Section content controls are exported as regular text.
Due to PDF format specifics, PDF text fields generated from Rich Text content controls use formatting from the first word of the original Rich Text content control. Rich Text content controls that split between pages or contain complex objects (like tables) are exported as regular text.
To enable this feature, load your Word file with content controls or generate content controls in your document using the Word Processing Document API library or WinForms/WPF Rich Text Editor. Then, create a PdfExportOptions
instance, enable the PdfExportOptions.ExportEditingFieldsToAcroForms
property and call the ExportToPdf
method with this PdfExportOptions
object as a parameter. For visual controls, you can also enable this functionality from the User Interface using the Print Preview -> PDF Export Options dialog.
using DevExpress.XtraPrinting;
using DevExpress.XtraRichEdit;
using(RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
wordProcessor.LoadDocument("input_content_controls.docx");
PdfExportOptions options = new PdfExportOptions();
options.ExportEditingFieldsToAcroForms = true;
wordProcessor.ExportToPdf("output_with_acroform.pdf", options);
}

Your Feedback Matters
As always, we value your feedback. Please take a moment to respond to the feature discussion tickets linked above and let us know how we can best serve your needs. Should you encounter an issue while using this Early Access Preview build (v25.1), please submit a support ticket via the DevExpress Support Center.