Class PdfForm
Представляет плагин Documentize.PdfForm. Используется для уплощения, извлечения данных форм. Также позволяет получать имена полей.
Represents Documentize.PdfForm plugin. Used to Flatten, Extract Forms Data. Also allows you to Get Fields Names.
public static class PdfFormInheritance
Inherited Members
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Methods
Extract(ExtractFormDataToDsvOptions)
Extract Form Data from PDF document.
public static ResultContainer Extract(ExtractFormDataToDsvOptions options)Parameters
optionsExtractFormDataToDsvOptions: Объект параметров, содержащий инструкции для операции.
Returns
ResultContainer : An object containing the result of the operation.
Examples
The example demonstrates how to Export Form values to CSV file.
// Create ExtractFormDataToDsvOptions object to set instructions
var options = new ExtractFormDataToDsvOptions(',', true);
// 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_csv_file.csv"));
// Perform the process
PdfForm.Extract(options);Exceptions
If options not set.
Flatten(FlattenFieldsOptions)
Flatten fields in PDF document.
public static ResultContainer Flatten(FlattenFieldsOptions options)Parameters
optionsFlattenFieldsOptions: Объект параметров, содержащий инструкции для операции.
Returns
ResultContainer : An object containing the result of the operation.
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
PdfForm.Flatten(options);The example demonstrates how to Flatten fields in PDF file and skip first field.
// Get Fields Names
var fieldNames = PdfForm.GetFieldNames(new GetFieldNamesOptions("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
PdfForm.Flatten(options);Exceptions
If options not set.
GetNames(GetFieldNamesOptions)
Get field Names in PDF document.
public static List<string> GetNames(GetFieldNamesOptions options)Parameters
optionsGetFieldNamesOptions: Объект параметров, содержащий инструкции для операции.
Returns
List of names in PDF document.
Examples
The example demonstrates how to Get field Names from PDF file.
// Get Fields Names
var fieldNames = PdfForm.GetNames(new GetFieldNamesOptions("path_to_your_pdf_file.pdf"));Remove(RemoveFieldsOptions) : Remove Fields from PDF document.
public static ResultContainer Remove(RemoveFieldsOptions options)Parameters
optionsRemoveFieldsOptions: Объект параметров, содержащий инструкции для операции.
Returns
ResultContainer : An object containing the result of the operation.
Examples
The example demonstrates how to Remove fields from PDF file.
// Create RemoveFieldsOptions object to set instructions
var options = new RemoveFieldsOptions();
// 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
PdfForm.Remove(options);Exceptions
If options not set.
Пространство имен: Documentize
Сборка: Documentize.dll