ParserGetFormattedText Method (FormattedTextOptions) |
Namespace: GroupDocs.Parser
The following example shows how to extract a document text as HTML text:
// Create an instance of Parser class using (Parser parser = new Parser(filePath)) { // Extract a formatted text into the reader using (TextReader reader = parser.GetFormattedText(new FormattedTextOptions(FormattedTextMode.Html))) { // Print a formatted text from the document // If formatted text extraction isn't supported, a reader is null Console.WriteLine(reader == null ? "Formatted text extraction isn't suppported" : reader.ReadToEnd()); } }