Skip to content
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.

Note

  • When the merge_csv 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.

c++
ConvertOptions opt;
// Convert using default options.
PDFToOffice::StartPdfToCsv("csv.pdf", "password", "path/output", opt, progress);

// Set merge_csv options.
opt.merge_csv = true;
PDFToOffice::StartPdfToCsv("csv.pdf", "password", "path/output", opt, progress);