Class PdfForm

معلومات

يمثل ملحق Documentize.PdfForm. يُستخدم لتسوية، استخراج بيانات النماذج. كما يتيح لك الحصول على أسماء الحقول.

يمثل ملحق Documentize.PdfForm. يُستخدم لتسوية، استخراج بيانات النماذج.
كما yتيح لك الحصول على أسماء الحقول.

public static class PdfForm

Inheritance

objectPdfForm

Inherited Members

Methods

Extract(ExtractFormDataToDsvOptions)

استخراج بيانات النموذج من مستند PDF.

public static ResultContainer Extract(ExtractFormDataToDsvOptions options)

Parameters

Returns

ResultContainer : كائن يحتوي على نتيجة العملية.

Examples

يوضح المثال كيفية تصدير قيم النموذج إلى ملف CSV.

// 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

ArgumentException

إذا لم يتم تعيين الخيارات.

Flatten(FlattenFieldsOptions)

تسوية الحقول في مستند PDF.

public static ResultContainer Flatten(FlattenFieldsOptions options)

Parameters

  • options FlattenFieldsOptions: كائن خيارات يحتوي على تعليمات العملية.

Returns

ResultContainer : كائن يحتوي على نتيجة العملية.

Examples

يوضح المثال كيفية تسوية الحقول في ملف PDF.

// 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);

يوضح المثال كيفية تسوية الحقول في ملف PDF وتخطي الحقل الأول.

// 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

ArgumentException

إذا لم يتم تعيين الخيارات.

GetNames(GetFieldNamesOptions)

الحصول على أسماء الحقول في مستند PDF.

public static List<string> GetNames(GetFieldNamesOptions options)

Parameters

  • options GetFieldNamesOptions: كائن خيارات يحتوي على تعليمات العملية.

Returns

List<string>

قائمة الأسماء في مستند PDF.

Examples

يوضح المثال كيفية الحصول على أسماء الحقول من ملف PDF.

// Get Fields Names
var fieldNames = PdfForm.GetNames(new GetFieldNamesOptions("path_to_your_pdf_file.pdf"));

Remove(RemoveFieldsOptions) : إزالة الحقول من مستند PDF.

public static ResultContainer Remove(RemoveFieldsOptions options)

Parameters

  • options RemoveFieldsOptions: كائن خيارات يحتوي على تعليمات العملية.

Returns

ResultContainer : كائن يحتوي على نتيجة العملية.

Examples

يوضح المثال كيفية إزالة الحقول من ملف PDF.

// 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

ArgumentException

إذا لم يتم تعيين الخيارات.

Namespace: Documentize Assembly: Documentize.dll

 عربي