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.

python
input_file_path = "***"
password = "***"
output_file_name = "***"

excel_options = ConvertOptions()
excel_options.csvFormat = True
error = CPDFConversion.start_pdf_to_excel(input_file_path, password, output_file_name, excel_options)