Class FormFlattener
Информация
Представляет плагин Documentize.FormFlattener. Используется для уплощения полей в PDF‑документах.
[Obsolete("The class will be deleted soon. Please use PdfForm class.")]
public static class FormFlattenerInheritance
Inherited Members
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
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
pathstring: Путь к PDF‑документу.
Returns
Список имён в PDF‑документе.
GetFieldNames(Stream) : Get Field Names in the PDF Document.
public static List<string> GetFieldNames(Stream stream)Parameters
streamStream: Поток с PDF‑документом.
Returns
Список имён в PDF‑документе.
Process(FlattenFieldsOptions) : Flatten Form fields in PDF document.
public static ResultContainer Process(FlattenFieldsOptions options)Parameters
optionsFlattenFieldsOptions: Объект параметров, содержащий инструкции для операции.
Returns
ResultContainer : Объект, содержащий результат операции.
Exceptions
Если параметры не заданы.
Namespace: Documentize Assembly: Documentize.dll