officefileapi-devexpress-dot-pdf-dot-pdfdocumentprocessor-72cd72d3.md
Flattens an entire interactive form.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Docs.v25.2.dll
NuGet Package : DevExpress.Document.Processor
public bool FlattenForm()
Public Function FlattenForm As Boolean
| Type | Description |
|---|---|
| Boolean |
true If the interactive form is flattened successfully; false If the document doesn’t contain an interactive form that should be flattened.
|
You can call the FlattenForm method the following way:
using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
processor.LoadDocument("Demo.pdf");
if (processor.FlattenForm())
processor.SaveDocument("Result.pdf");
}
Using processor As New PdfDocumentProcessor()
processor.LoadDocument("Demo.pdf")
If processor.FlattenForm() Then
processor.SaveDocument("Result.pdf")
End If
End Using
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FlattenForm() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
pdf-document-api-flatten-interactive-form/CS/FlattenInteractiveForm/Program.cs#L24
// Flatten a whole interactive form.
if (processor.FlattenForm())
pdf-document-api-flatten-interactive-form/VB/FlattenInteractiveForm/Program.vb#L22
' Flatten a whole interactive form.
If processor.FlattenForm() Then
' Save a document with the flattened form.
See Also