Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Convert PDF to CSV ​

Overview ​

ComPDF Conversion SDK supports converting PDF documents to CSV (Comma-Separated Values). Converting PDF to CSV is a common need, usually used to extract tabular or structured data from PDF documents and convert it into CSV files.

Set Whether to Automatically Create Folders ​

When multiple CSV files may be output, you can control whether to automatically create folders to store the CSV files by setting the auto_create_folder option. When this option is enabled, a folder with the same name as the output file will be automatically created in the output path to store the CSV files.

Sample ​

This sample demonstrates how to convert from a PDF to CSV file.

objective-c
ExcelOptions *options = [[ExcelOptions alloc] init];
options.CSVFormat = YES;
options.auto_create_folder = YES;
[CPDFConversion startPDFToExcel:@"csv.pdf" password:@"password" outputPath:@"path/output.csv" options:options];

options.excelWorksheetOption = ExcelWorksheetForDocument;
[CPDFConversion startPDFToExcel:@"csv.pdf" password:@"password" outputPath:@"path/output-merged.csv" options:options];