Docxion: Streamlined Open-Source Document Viewer for Android Apps with WebView Integration

September 7, 2026
Docxion: Streamlined Open-Source Document Viewer for Android Apps with WebView Integration
  • Docxion uses a WebView-based architecture that keeps the rendering logic in the TypeScript viewer while preserving a clean, embeddable Android integration, making it easier to update the viewer without redesigning the Android API.

  • Documentation explains embedding Docxion in an Android project via JitPack, using the Jetpack Compose DocxionViewer component, and opening documents through the API.

  • Docxion is focused on viewing rather than editing, offering a native-like API surface for actions such as open/close files, navigate pages, zoom, fit-to-width/page, search and results navigation, text extraction, theming, printing, and destroying the viewer.

  • The viewer consists of three main parts—a Kotlin/Jetpack Compose Android library, a TypeScript/React-based underlying office-viewer, and an Android example app—with an Android WebView serving as the bridge between them.

  • The project is early in development, with ongoing work on formats support, rendering fidelity, and potential API/packaging changes, but with a clear aim to become a reusable, embeddable document viewing component for various applications.

  • The TypeScript viewer exposes a straightforward ViewerAPI with methods like openFile, closeFile, goToPage, getCurrentPage, setTheme, print, and destroy, which are mapped to Android API calls.

  • Docxion is an open-source, Apache 2.0 licensed project designed to simplify embedding Microsoft Office document viewing in apps, avoiding licensing or heavy SDK requirements.

  • Communication between Kotlin and JavaScript is bidirectional via a WebView bridge: the Android side uses DocxionWebViewApi to call into the viewer, while the viewer can emit events back to the Android app through a JavaScript bridge, enabling responsive UI interactions.

  • The architecture deliberately separates the Android layer from the viewer, allowing the TypeScript viewer to evolve independently from the Android API for cross-platform consistency.

Summary based on 1 source


Get a daily email with more Tech stories

More Stories