On this page
Guides
Convert PDF to CSV
Overview
ComPDFKit 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 them into CSV files.
Notice
- When the
isMergeCSV
option is set, the tables in the original PDF document will be merged into the same CSV file.
Sample
This sample demonstrates how to convert from a PDF to CSV file.
objective-c
// Get the path of the PDF file.
NSString *pdfPath = @"...";
// Get the path to the ZIP file.
NSString *outputPath = @"...";
CPDFConvertCsvOptions * options = [[CPDFConvertCsvOptions alloc] init];
[options setIsMergeCSV:NO];
CPDFConverterCsv *converter = [[CPDFConverterCsv alloc] initWithURL:[NSURL fileURLWithPath:pdfPath] password:nil];
[converter convertToFilePath:outputPath pageIndexs:nil options:options];