Class FormFlattener

Info

Represents Documentize.FormFlattener plugin. Used to Flatten fields in PDF documents.

[Obsolete("The class will be deleted soon. Please use PdfForm class.")]
public static class FormFlattener

Inheritance

objectFormFlattener

Inherited Members

Examples

The example demonstrates how to Flatten fields in PDF file.

// Create FormFlattenerOptions object to set instructions
var options = new FormFlattenerOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
FormFlattener.Process(options);

The example demonstrates how to Flatten fields in PDF file and skip first field.

// Get Fields Names
var fieldNames = FormFlattener.GetFieldNames("path_to_your_pdf_file.pdf");
// Create FormFlattenerOptions object to set instructions
var options = new FormFlattenerOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Skip 1 field.
options.SkipFields.Add(fieldNames[0]);
// Perform the process
FormFlattener.Process(options);

The example demonstrates how to Get Field Names from PDF file.

// Get Fields Names
var fieldNames = FormFlattener.GetFieldNames("path_to_your_pdf_file.pdf");

Methods

GetFieldNames(string)

Get Field Names in the PDF Document.

public static List<string> GetFieldNames(string path)

Parameters

  • path string: The Path to PDF Document.

Returns

List<string>

List of names in the PDF Document.

GetFieldNames(Stream) : Get Field Names in the PDF Document.

public static List<string> GetFieldNames(Stream stream)

Parameters

  • stream Stream: The Stream with PDF Document.

Returns

List<string>

List of names in the PDF Document.

Process(FlattenFieldsOptions) : Flatten Form fields in PDF document.

public static ResultContainer Process(FlattenFieldsOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

 English