Overview
ComPDF Conversion SDK supports converting PDF documents to CSV (Comma-Separated Values). This is commonly used to extract tabular or structured data from PDF documents.
CSV conversion uses the Excel conversion API with excel_csv_format = true.
Automatically Create Folders
When multiple CSV files may be output, control whether to automatically create folders through auto_create_folder. When this option is enabled, a folder with the same name as the output file will be created in the output path to store the CSV files.
Sample
c
CConvertOption option = CPDF_DefaultConvertOption();
option.excel_csv_format = true;
CPDF_StartPDFToExcel(CPDF_TEXT("csv.pdf"), CPDF_TEXT("password"), CPDF_TEXT("path/output.csv"), option, NULL);
option.excel_worksheet_option = e_CForDocument;
CPDF_StartPDFToExcel(CPDF_TEXT("csv.pdf"), CPDF_TEXT("password"), CPDF_TEXT("path/output_merged.csv"), option, NULL);