Class PdfForm

情報

Documentize.PdfForm プラグインを表します。フラット化やフォームデータの抽出に使用します。また、フィールド名の取得も可能です。

Represents Documentize.PdfForm plugin. Used to Flatten, Extract Forms Data. Also allows you to Get Fields Names.

public static class PdfForm

Inheritance

継承

objectPdfForm

Inherited Members

継承されたメンバー

Methods

Extract(ExtractFormDataToDsvOptions)

PDF ドキュメントからフォームデータを抽出します。

public static ResultContainer Extract(ExtractFormDataToDsvOptions options)

Parameters

パラメータ

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

例外

ArgumentException

If options not set.

Flatten(FlattenFieldsOptions)

PDF ドキュメント内のフィールドをフラット化します。

public static ResultContainer Flatten(FlattenFieldsOptions options)

Parameters

パラメータ

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

例外

ArgumentException

If options not set.

GetNames(GetFieldNamesOptions)

PDF ドキュメント内のフィールド名を取得します。

public static List<string> GetNames(GetFieldNamesOptions options)

Parameters

パラメータ

Returns

戻り値

List<string>

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

パラメータ

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

例外

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

 日本語