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 CompDF Convert SDK, you can easily extract the text in the PDF into the TXT file.
Preserving Table Format
The SDK supports an option called TableFormat
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.
objective-c
TxtOptions *options = [[TxtOptions alloc] init];
[CPDFConversion startPDFToTxt:@"txt.pdf" password:@"" outputPath:@"output.txt" options:options];