Class FormFlattener

Информация

Представляет плагин Documentize.FormFlattener. Используется для уплощения полей в PDF‑документах.

[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)

Получить имена полей в PDF‑документе.

public static List<string> GetFieldNames(string path)

Parameters

  • path string: Путь к PDF‑документу.

Returns

List<string>

Список имён в PDF‑документе.

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

public static List<string> GetFieldNames(Stream stream)

Parameters

  • stream Stream: Поток с PDF‑документом.

Returns

List<string>

Список имён в PDF‑документе.

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

public static ResultContainer Process(FlattenFieldsOptions options)

Parameters

  • options FlattenFieldsOptions: Объект параметров, содержащий инструкции для операции.

Returns

ResultContainer : Объект, содержащий результат операции.

Exceptions

ArgumentException

Если параметры не заданы.

Namespace: Documentize Assembly: Documentize.dll

 Русский