Aspose.Pdf for Java It includes some new exciting features, enhancements and fixes to issues reported in earlier versions of Aspose.Pdf for Java, along with a change of release numbering. As the Java version is ported from Aspose.Pdf for .NET, its version number has been changed to reflect the .NET version it comes from.

Changing color space of PDF document is one of the exiting features introduced in this version. The maximum number of columns limit in a table has been increased to 512 and we have made further progress on porting new classes and methods from Aspose.Pdf for .NET to the Aspose.Pdf for Java architecture. The complete details of these changes can be found in Public API Changes in Aspose.Pdf for Java 9.0.0.

Following are the some of the new features/enhancements this month’s release. For a full list of bug fixes and improvements please refer to the download pages in the link above.

Export/Import Bookmarks

The methods exportBookmarksToXML(…) and importBookmarksWithXML(…) with Stream arguments are implemented in the PdfBookmarkEditor class. So now extracted bookmarks can be saved into stream object can be import into stream from XML file.

Export Bookmarks

//Create PdfBookmarkEditor object
PdfBookmarkEditor bookmarkeditor = new PdfBookmarkEditor();
//Open PDF file
bookmarkeditor.bindPdf("Input.pdf");
OutputStream os = new FileOutputStream("bookmark.xml");
bookmarkeditor.exportBookmarksToXML(os);
bookmarkeditor.dispose();

Import Bookmarks

//Create PdfBookmarkEditor object
PdfBookmarkEditor bookmarkeditor = new PdfBookmarkEditor();
//Open PDF file
bookmarkeditor.bindPdf("Input.pdf");
InputStream is = new FileInputStream("bookmark.xml");
bookmarkeditor.importBookmarksWithXML(is);
bookmarkeditor.save("output.pdf");

For more information, please take a look at Working with Bookmarks.