Text Converter
The Sheetize Text Converter for .NET enables the conversion of documents to and from plain text format, ideal for data extraction, archiving, and integration with text-based systems.
Key Features
Convert Documents to Plain Text
Extract text content from documents like PDF, DOCX, and HTML, useful for data processing and archiving.
Convert Plain Text to Document Formats
Create formatted documents from plain text, providing an easy way to generate reports or structured files.
Detailed Guide
Converting Document to Plain Text
To convert a document to plain text:
- Initialize the Converter: Create an instance of
TextConverter
. - Set Conversion Options: Use
DocumentToTextOptions
to configure output settings. - Define Input and Output Paths: Set paths for the input document and output text file.
- Execute the Conversion: Call the
Process
method to convert the document.
Example: Convert PDF to Plain Text
// Step 1: Initialize the Text Converter
var converter = new TextConverter();
// Step 2: Configure options for document to text conversion
var options = new DocumentToTextOptions();
// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.txt"));
// Step 4: Execute the conversion
converter.Process(options);
The Text Converter is essential for scenarios where text extraction is needed, such as creating archives or processing data in plain text.