Class FormFlattener

Info

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

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"));
//Optional parameter for skip the field with name "Surname".
options.SkipFields.Add("Surname");
// Perform the process
FormFlattener.Process(options);

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

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&gt;

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&gt;

List of names in the PDF Document.

Process(FormFlattenerOptions) : Starts the Documentize.FormFlattener processing with the specified parameters.

public static ResultContainer Process(FormFlattenerOptions options)

Parameters

Returns

ResultContainer : An Documentize.ResultContainer object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll