Экспорт данных формы
The Documentize PDF Extractor for .NET plugin provides a seamless way to extract and export data from PDF forms (AcroForms) into other formats like CSV. This dynamic tool simplifies the process of retrieving form field values, allowing for easy data management, transfer, and analysis.
How to Export Form Data from PDF to CSV
To export form data from a PDF to CSV, follow these steps:
- Create an instance of the
ExtractImagesOptionsclass. - Define export options using the
FormExporterValuesToCsvOptionsclass. - Add input PDF files and specify the output CSV file.
- Run the
Extractmethod to perform the export.
1// Create ExtractFormDataToDsvOptions object to set instructions
2var options = new ExtractFormDataToDsvOptions(',', true);
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileData("path_to_result_csv_file.csv"));
7// Perform the process
8PdfExtractor.Extract(options);How to Export Form Data from PDF to TSV
Use Tab as Delimiter.
1// Create ExtractFormDataToDsvOptions object to set instructions
2var options = new ExtractFormDataToDsvOptions();
3//Set Delimiter
4options.Delimiter = '\t';
5//Add Field Names to result
6options.AddFieldName = true;
7// Add input file path
8options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
9// Set output file path
10options.AddOutput(new FileData("path_to_result_csv_file.tsv"));
11// Perform the process
12PdfExtractor.Extract(options);Key Features:
- Export Form Data: Extract data from PDF forms (AcroForms) into CSV or other formats.
- Data Filtering: Use predicates to filter specific form fields for export based on criteria like field type or page number.
- Flexible Output: Save exported data for analysis or transfer to spreadsheets, databases, or other document formats.