This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/prebuilt-solutions/common-use-cases/document-title-styling.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Styling the document title independently from the main toolbar

By design, the document title overlay and the main toolbar share the same pspdf__backgroundColor from pspdf__mainToolbarStyle. There is currently no dedicated style attribute to set them independently via XML.

To set a different background or text color on the title overlay, access it programmatically after onCreate via PSPDFKitViews#getDocumentTitleOverlayView, and set the background color and text color directly on the DocumentTitleOverlayView:

pspdfKitViews.documentTitleOverlayView?.apply {
setBackgroundColor(ContextCompat.getColor(context, R.color.your_title_background))
setTextColor(ContextCompat.getColor(context, R.color.your_title_text_color))
}

To hide the title overlay entirely, use PdfActivityConfiguration.Builder:

val configuration = PdfActivityConfiguration.Builder(context)
.hideDocumentTitleOverlay()
.build()