String dataDir = Utils.getSharedDataDir(ReplaceTextonAllPages.class) + "text/"; Map replacements = new HashMap(); replacements.put("2. Get organized", "New Text Here"); // Load the document into Aspose.Note. LoadOptions options = new LoadOptions(); Document oneFile = new Document(dataDir + "Sample1.one", options); // Get all RichText nodes List textNodes = (List) oneFile.getChildNodes(RichText.class);// (); // Traverse all nodes and compare text against the key text for (RichText richText : textNodes) { for (String key : replacements.keySet()) { if (richText != null && richText.getText().contains(key)) { // Replace text of a shape richText.setText(richText.getText().replace(key, replacements.get(key))); } } } // Save to any supported file format oneFile.save(dataDir + "ReplaceTextonAllPages_out.pdf", SaveFormat.Pdf);