I was trying to retrieve formatted text from a document (in order to pass into another document, keeping it's text formatting) using the following article:
I created the DocToTxtWriter Class and tried to copy formatted text using the code below.
Unfortunately the resulting text that is printed (docToTxtWriter.GetText) seems to be blank. The document definitely has text in it. Is there something else I have to do or am I missing something?
public void ToText(String documentDir, String documentName) throws Exception
// Open the document we want to convert.
Document doc = openDocument(documentDir,documentName);
// Create an object that inherits from the DocumentVisitor class.
DocToTxtWriter docToTxtWriter = new DocToTxtWriter();