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 AutoCreateFolder 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.

go
inputFilePath := "***"
password := "***"
outputFileName := "***"

csvOptions := compdf.NewCsvOptions()
err := compdf.StartPDFToCsv(inputFilePath, password, outputFileName, csvOptions, nil)