// The path to the documents directory. String dataDir = Utils.getSharedDataDir(ExtractingTextFromAPage.class) + "text\\"; // Load the document into Aspose.Note. Document oneFile = new Document(dataDir + "Sample1.one"); // Get list of page nodes List nodes = oneFile.getChildNodes(Node.class); if (nodes.size() > 0 && nodes.get(0).getNodeType() == NodeType.Page) { Page page = (Page)nodes.get(0); // Retrieve text List textNodes = (List) page.getChildNodes(RichText.class); StringBuilder text = new StringBuilder(); for (RichText richText : textNodes) { text = text.append(richText.getText().toString()); } // Print text on the output screen System.out.println(text); }