Conflict Pages Manipulation with Aspose.Note for Java 17.11

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Aspose.Note for Java 17.11 has been released. This release enhances the capability of working with pages from a Notebook document for manipulating Conflict Pages. It also brings improvements to the API in terms of bug fixes that further adds to the stability of the API functionality. For a detailed note on what is new and fixed, please visit the release notes section of API documentation.

Manipulate Conflict Pages with Aspose.Note for Java 17.11

This release of API provides an enhancement where a page version from history can be identified as conflict page. Conflict pages are skipped by default while saving the file. Using the API, if it is marked as non-conflict using the isConflictPage method, it will be saved as usual one in the history without being ignored as shown in the following code sample.

// Load the document into Aspose.Note
LoadOptions options = new LoadOptions();
Document doc = new Document(dataDir + "Aspose.one", options);

DateFormat df = new SimpleDateFormat("dd.MM.yyyy HH.mm.ss");
		
PageHistory history = doc.getPageHistory(doc.getFirstChild());
for (int i = 0; i < history.size(); i++)
{
	Page historyPage = history.get_Item(i);
	System.out.format(" %d. Author: %s, %s",
                  i,
                  historyPage.getPageContentRevisionSummary().getAuthorMostRecent(),
                  df.format(historyPage.getPageContentRevisionSummary().getLastModifiedTime()));
	System.out.println(historyPage.isConflictPage() ? ", IsConflict: true" : "");
    // By default conflict pages are just skipped on saving.
    // If mark it as non-conflict then it will be saved as usual one in the history.
    if (historyPage.isConflictPage())
        historyPage.setConflictPage(false);
}

doc.save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);

API Resources

  • Documentation – Visit our documentation section for getting started with the API in no time
  • API Reference Guide – Gives detailed information about all the namespaces, classes and methods of the API
  • Forum Support – Post your queries on Aspose.Note forum to get assistance from our technical support team
  • GitHub Examples – Try the ready-to-use examples of the API by downloading from our GitHub repository

To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply