DocumentController

The main Fat Controller of the document. Serves as the public gateway to access the document state and apply various actions on it.

Properties

Link copied to clipboard
abstract val configurationState: StateFlow<SdkConfiguration>

Flowable configuration

Link copied to clipboard
abstract val documentDataState: StateFlow<DocumentData>

Flowable document data provider

Link copied to clipboard
abstract val navigator: Navigator

Navigator used to navigate between different io.nutrient.ui.navigation.DocumentViews

Link copied to clipboard
abstract val path: String

Document Path

Link copied to clipboard

Access document text data

Link copied to clipboard

TextSearch used to manage and trigger various text search actions as well as provides text search state. The state is used to highlight search results in the document.

Link copied to clipboard

TextSelection used to manage and trigger various text selection actions as well as provides text selection state

Functions

Link copied to clipboard

Returns an object similar to textSearch.actions, but rather than updating the TextSearchState of textSearch, its updates are delivered into the provided updateState lambda. This method is useful when you want to manage the state of the search results yourself, or maybe just want to perform a background search without updating the UI. You can still forward your results to the UI by calling textSearch.actions.setExternalState

Link copied to clipboard
abstract suspend fun renderPageToBitmap(pageIndex: Int, configuration: ERROR CLASS: Symbol not found for PageRenderConfiguration): Bitmap

function to render page to default size bitmap

abstract suspend fun renderPageToBitmap(pageIndex: Int, width: Int, height: Int, configuration: ERROR CLASS: Symbol not found for PageRenderConfiguration): Bitmap

function to render page to bitmap

Link copied to clipboard
abstract suspend fun save()

function to save document

Link copied to clipboard
abstract suspend fun selectPage(pageNumber: Int)

function to select page

Link copied to clipboard
abstract suspend fun setAiAssistant(aiAssistant: ERROR CLASS: Symbol not found for AiAssistant)
Link copied to clipboard
abstract suspend fun setSearchUiVisible(show: Boolean)

function to show/hide the search UI

Link copied to clipboard
abstract suspend fun updateConfiguration(configuration: SdkConfiguration)

function to update configuration