Performs various operations on the form based on the specified parameters.
Param is a PdfParam object or parameter string containing various
Boolean parameters, all optional, including:
- RemoveXFA - this parameter is equivalent to calling the RemoveXFA method.
- Flatten - this parameter is equivalent to calling the Flatten method.
- FlattenAnnots - this parameter flattens items that are not technically form fields but
field-like annotations.
- RemoveJavaScript - this parameter removes all JavaScript from the document's catalog. This prevents the message "This PDF form
requires a newer version of Adobe Acrobat" from popping up.
- Reset - this parameter resets the current graphics state for all pages of the document. This may be useful
if the flattening procedure produces unexpected output or no output at all. This parameter was introduced in Version 3.4.0.2.
This method was introduced in Version 2.9.
Usage:
Set Doc = Pdf.OpenDocument("c:\path\1040nr.pdf")
Doc.Form.Modify "Flatten=true; RemoveJavaScript=true"
Doc.Save "c:\path\flattened.pdf"
For more information, see Section 11a.6 - JavaScript Removal and Other Features.