# KPDF ## Docs - [KPdfExternalOpenState: open PDF in an external app](https://mahmoud-b28887f9.mintlify.app/api/kpdf-external-open-state.md): KPdfExternalOpenState tracks handing the current PDF to an external app — from byte export through intent dispatch to confirmation, cancellation, or error. - [KPdfFactory: create a KPDF viewer state outside Compose](https://mahmoud-b28887f9.mintlify.app/api/kpdf-factory.md): KPdfFactory.create() returns a KPdf facade for creating KPdfViewerState instances outside Compose — useful in ViewModels or non-Compose contexts. - [KPdfLoadState: observe KPDF document loading progress](https://mahmoud-b28887f9.mintlify.app/api/kpdf-load-state.md): KPdfLoadState tracks every stage of PDF loading — idle, decoding, ready with page count, or error — so you can show progress indicators and handle failures. - [KPdfOpenDocumentState: local PDF file picker state](https://mahmoud-b28887f9.mintlify.app/api/kpdf-open-document-state.md): KPdfOpenDocumentState tracks the file picker lifecycle when users open a local PDF — from picker launch through KPdfSource delivery, cancellation, or error. - [KPdfSaveState: observe the PDF save and export flow](https://mahmoud-b28887f9.mintlify.app/api/kpdf-save-state.md): KPdfSaveState tracks the SDK-managed save flow — from export preparation through the platform file picker to confirmed save, cancellation, or error. - [KPdfSource: specify where KPDF should load the PDF from](https://mahmoud-b28887f9.mintlify.app/api/kpdf-source.md): KPdfSource is a sealed interface with three variants — Url, Bytes, and Base64 — that tells KPDF where to load the document from and drives caching identity. - [KPdfViewerConfig: configure zoom, cache, and gestures](https://mahmoud-b28887f9.mintlify.app/api/kpdf-viewer-config.md): KPdfViewerConfig controls zoom range, swipe navigation, double-tap zoom, RAM and disk cache sizes, and background page preloading for a KPDF viewer instance. - [KPdfViewerState: central controller for the PDF viewer](https://mahmoud-b28887f9.mintlify.app/api/kpdf-viewer-state.md): KPdfViewerState is the state holder and controller for a KPDF viewer instance, exposing observable flows and methods for navigation, zoom, save, and export. - [rememberPdfViewerState: Compose viewer state factory](https://mahmoud-b28887f9.mintlify.app/api/remember-pdf-viewer-state.md): rememberPdfViewerState creates a KPdfViewerState, wires platform save and open flows, and disposes the state when the composable leaves the composition. - [KPDF toolbar configuration types and style reference](https://mahmoud-b28887f9.mintlify.app/api/toolbar-config.md): Complete reference for KPdfViewerToolbarConfig, Visibility, Strings, Icons, and Style — the five data classes that control every aspect of the KPDF toolbar. - [KPdfViewer: render the active PDF page in Compose UI](https://mahmoud-b28887f9.mintlify.app/components/kpdf-viewer.md): Render the active PDF page in your Compose UI using KPdfViewer. Reads zoom and page state from KPdfViewerState and displays a Material3-styled card surface. - [KPdfThumbnailStrip: scrollable page preview navigation](https://mahmoud-b28887f9.mintlify.app/components/thumbnail-strip.md): Display a horizontal row of low-resolution page thumbnails that auto-scroll to the current page and let users jump to any page with a tap. - [KPdfViewerToolbar: connected toolbar for PDF controls](https://mahmoud-b28887f9.mintlify.app/components/toolbar.md): Add page summary, zoom controls, save, share, and thumbnail toggle to your PDF viewer with KPdfViewerToolbar. Fully customizable via config and style objects. - [Observable state flows: react to PDF lifecycle events](https://mahmoud-b28887f9.mintlify.app/concepts/load-states.md): Observe KPdfLoadState, KPdfSaveState, and KPdfOpenDocumentState to show progress indicators, handle errors, and drive your UI through every lifecycle stage. - [PDF sources: load PDFs from URLs, bytes, or Base64](https://mahmoud-b28887f9.mintlify.app/concepts/pdf-sources.md): Learn how to point KPDF at a PDF document using KPdfSource — choose from remote URLs with auth headers, raw byte arrays, or Base64-encoded strings. - [KPdfViewerConfig: customize zoom, cache, and gestures](https://mahmoud-b28887f9.mintlify.app/concepts/viewer-config.md): Configure zoom behavior, swipe navigation, memory and disk caching, and page preloading for a KPDF viewer using the builder API or the pdfViewerConfig DSL. - [KPdfViewerState: control and observe your PDF viewer](https://mahmoud-b28887f9.mintlify.app/concepts/viewer-state.md): Understand how KPdfViewerState drives every KPDF component through observable StateFlows and actions for navigation, zoom, save, and document management. - [Display a PDF in a Compose Multiplatform app screen](https://mahmoud-b28887f9.mintlify.app/guides/display-pdf.md): Step-by-step guide to picking a PDF source, configuring the viewer, creating viewer state with rememberPdfViewerState, and rendering KPdfViewer. - [Control PDF page navigation and zoom level in KPDF](https://mahmoud-b28887f9.mintlify.app/guides/navigation-zoom.md): Use KPdfViewerState to navigate pages and adjust zoom programmatically, and configure swipe and pinch-to-zoom gestures through KPdfViewerConfig. - [Open the current PDF in an installed PDF viewer app](https://mahmoud-b28887f9.mintlify.app/guides/open-external-app.md): Call openInExternalApp or requestOpenInExternalApp to hand the current PDF to another app, then observe KPdfExternalOpenState for success or failure. - [Let users open a local PDF from their device storage](https://mahmoud-b28887f9.mintlify.app/guides/open-from-device.md): Trigger the platform file picker with requestOpenFromDevice, observe KPdfOpenDocumentState for results, and load the selected file in the viewer. - [Save or export the active PDF to the user's device](https://mahmoud-b28887f9.mintlify.app/guides/save-export.md): Call requestSave to trigger the platform save picker, observe KPdfSaveState for every stage of the flow, and handle Success, Cancelled, and Error outcomes. - [Share a PDF using exportPdf and your platform share flow](https://mahmoud-b28887f9.mintlify.app/guides/share-pdf.md): Call exportPdf to get the current PDF as a ByteArray, then pass the bytes to your own Android or iOS share mechanism — KPDF does not impose a share UI. - [Install KPDF: add the Gradle dependencies to your app](https://mahmoud-b28887f9.mintlify.app/installation.md): Add kpdf-core and kpdf-compose to your Kotlin Multiplatform Gradle build using the Kotlin or Groovy DSL, with notes on what each module provides. - [What is KPDF? PDF viewing for Compose Multiplatform](https://mahmoud-b28887f9.mintlify.app/introduction.md): Learn what KPDF is, how its two modules fit together, which platforms it targets, and what PDF sources and features it provides out of the box. - [KPDF quickstart: display your first PDF in minutes](https://mahmoud-b28887f9.mintlify.app/quickstart.md): Go from zero to a working Compose Multiplatform PDF viewer on Android and iOS with four steps: add dependencies, create a source, get viewer state, and render. - [Troubleshoot KPDF: common integration issues and fixes](https://mahmoud-b28887f9.mintlify.app/troubleshooting.md): Diagnose and fix the most common KPDF problems: idle state flows, offline caching, slow thumbnails, zoom limits, swipe navigation, and export failures. ## OpenAPI Specs - [openapi](https://mahmoud-b28887f9.mintlify.app/api-reference/openapi.json)