Guides
Convert PDF to TXT
Overview
When you need to extract the text content in the PDF file, in order for data analysis, text mining, information retrieval, etc. Using ComPDFKit Convert SDK, you can easily extract the text in the PDF into the TXT file.
Preserving Table Format
The SDK supports an option called txt_table_format
that preserves the table format when writing the TXT file, meaning that the original table structure is maintained. It is generally recommended to enable this option, especially useful for data extraction scenarios.
Sample
This sample demonstrates how to convert from a PDF to TXT file.
c++
ConvertOptions opt;
// PDF to TXT.
CPDFConversion::StartPDFToTxt("txt.pdf", "password", "path/output.txt", opt);