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)
PDF ドキュメントからフォームデータを抽出します。
public static ResultContainer Extract(ExtractFormDataToDsvOptions options)Parameters
パラメータ
optionsExtractFormDataToDsvOptions: 操作の指示を含むオプション オブジェクト。
Returns
戻り値
ResultContainer : 操作の結果を含むオブジェクト。
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 FileData("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileData("path_to_result_csv_file.csv"));
// Perform the process
PdfForm.Extract(options);The example demonstrates how to Export Form values to TSV file and set Properties.
// Create ExtractFormDataToDsvOptions object to set instructions
var options = new ExtractFormDataToDsvOptions();
//Set Delimiter
options.Delimiter = '\t';
//Add Field Names to result
options.AddFieldName = true;
// Add input file path
options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileData("path_to_result_csv_file.tsv"));
// Perform the process
PdfForm.Extract(options);Exceptions
例外
If options not set.
Flatten(FlattenFieldsOptions)
PDF ドキュメント内のフィールドをフラット化します。
public static ResultContainer Flatten(FlattenFieldsOptions options)Parameters
パラメータ
optionsFlattenFieldsOptions: 操作の指示を含むオプション オブジェクト。
Returns
戻り値
ResultContainer : 操作の結果を含むオブジェクト。
Examples
例
The example demonstrates how to Flatten fields in PDF file.
// Create FlattenFieldsOptions object to set instructions
var options = new FlattenFieldsOptions();
// Add input file path
options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileData("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.GetNames(new GetFieldNamesOptions("path_to_your_pdf_file.pdf"));
// Create FlattenFieldsOptions object to set instructions
var options = new FlattenFieldsOptions();
options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileData("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)
PDF ドキュメント内のフィールド名を取得します。
public static List<string> GetNames(GetFieldNamesOptions options)Parameters
パラメータ
optionsGetFieldNamesOptions: 操作の指示を含むオプション オブジェクト。
Returns
戻り値
PDF ドキュメント内の名前のリスト。
Examples
例
The example demonstrates how to Get field Names from PDF file.
// Get Field 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 : 操作の結果を含むオブジェクト。
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 FileData("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
// Perform the process
PdfForm.Remove(options);Exceptions
例外
If options not set.
Namespace: Documentize Assembly: Documentize.dll