We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get Bookmarks from ODT Word Document InputStream using Java | Extract Bookmarked Data


we are having odt data in database as a blob. We retrieved data from blob as inputstream and creating new Document using Aspose 20.5 jar. Here is the java code snippet.
Document doc = new Document(inputStream);

The issue here is we are unable to get bookmarks in output document.
can you please help me on this.

I’ve explored Aspose forums but dint find relevant code for our requirement.


Please save the InputStream of ODT to disk, ZIP the ODT file and attach it here for testing. Generally, you should be able to get Bookmarks from ODT file by using the following Java code:

Document doc = new Document("input.odt");
Bookmark bookmark = doc.getRange().getBookmarks().get("Bookmark1");

Please also provide a screenshot highlighting the area (or bookmarked element) in ODT file that you want to get by using Aspose.Words here for our reference.