Reader View
Shows the reader view, which re-flows documents for easy reading.
/* * Copyright © 2020-2026 PSPDFKit GmbH. All rights reserved. * * The PSPDFKit Sample applications are licensed with a modified BSD license. * Please see License for details. This notice may not be removed from this file. */
package com.pspdfkit.catalog.examples.kotlin
import android.content.Contextimport com.pspdfkit.catalog.Rimport com.pspdfkit.configuration.activity.PdfActivityConfigurationimport com.pspdfkit.configuration.sharing.ShareFeaturesimport java.util.EnumSet
class ReaderViewExample(context: Context) : AssetExample(context, R.string.readerViewExampleTitle, R.string.readerViewExampleDescription) { override val assetPath: String get() = "The-Cosmic-Context-for-Life.pdf"
override fun prepareConfiguration(configuration: PdfActivityConfiguration.Builder) { configuration.apply { // The reader view is disabled by default. You can enable it using the activity configuration, which will put the reader view // action item into the primary toolbar. enableReaderView(true)
// We disable additional features which are enabled by default. This just keeps the example simpler. annotationEditingEnabled(false) annotationListEnabled(false) bookmarkListEnabled(false) outlineEnabled(false) printingEnabled(false) searchEnabled(false) setEnabledShareFeatures(EnumSet.noneOf(ShareFeatures::class.java)) settingsMenuEnabled(false) } }}This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.