Nutrient 2024.9 migration guide
This guide outlines the changes to Nutrient Android SDK 2024.9.
Breaking API changes
Bookmark list view configuration
We changed how the bookmark list view is configured in PdfOutlineView:
- We added setBookmarkAddingEnabled(), which, whenfalse, will remove the add button in the bookmark list view bottom bar.
- We changed setBookmarkEditingEnabled()to only affect the edit button visibility in the bookmark list view bottom bar. Previously, this option affected the add button only.
- In the PdfActivityConfigurationBuilder, we removed thebookmarkEditingEnabledoption. You now have to use the APIs listed above.
For example, in PdfActivity, use this:
override fun onDocumentLoaded(document: PdfDocument) {    super.onDocumentLoaded(document)    pspdfKitViews.outlineView?.setBookmarkAddingEnabled(false)    pspdfKitViews.outlineView?.setBookmarkEditingEnabled(false)}Or, in your Compose app, use this:
DocumentView(    documentState,    modifier = Modifier.fillMaxSize(),    documentManager = getDefaultDocumentManager(        documentListener = DefaultListeners.documentListeners(onDocumentLoaded = {            documentState.documentConnection.pdfActivityViews.outlineView?.setBookmarkAddingEnabled(false)            documentState.documentConnection.pdfActivityViews.outlineView?.setBookmarkEditingEnabled(false)        }),Compose wrapper APIs
We made some changes to DocumentConnection:
- DocumentConnection#pdfUIis deprecated and has been replaced with our standard CamelCase naming scheme,- pdfUi.
- DocumentConnection#pdfActivityViewshas been added to access- PSPDFKitViewsAPIs from the- PdfActivity. Refer to the bookmark examples above for details on how to use this.
 
  
  
  
 