Engine agnostic
Swap PDF.js on web and PDFKit or PDFium on mobile without changing UI logic.
Build document readers with search, annotations, and theming for web and mobile (React + React Native).
@papyrus-sdk/types: contracts for engines, annotations, and events.@papyrus-sdk/core: Zustand store plus papyrusEvents for UI and app logic.@papyrus-sdk/engine-pdfjs: web adapter built on PDF.js.@papyrus-sdk/ui-react: web UI components (Topbar, Sidebar, Viewer).@papyrus-sdk/engine-native: native engine bridge for iOS and Android.@papyrus-sdk/ui-react-native: mobile UI components and sheets.Papyrus is an open source PDF, EPUB, and TXT SDK for product teams that need a document experience closer to Figma or Notion: search, selection, highlights, and custom UI on top of a stable engine layer.
Install and render a PDF viewer with the SDK:
pnpm add @papyrus-sdk/core @papyrus-sdk/ui-react @papyrus-sdk/engine-pdfjsimport React, { useEffect, useState } from 'react';
import { PDFJSEngine } from '@papyrus-sdk/engine-pdfjs';
import { useViewerStore } from '@papyrus-sdk/core';
import { Viewer } from '@papyrus-sdk/ui-react';
export const App = () => {
const [engine] = useState(() => new PDFJSEngine());
const { initializeStore } = useViewerStore();
useEffect(() => {
initializeStore({ initialUITheme: 'dark' });
engine.load('/sample.pdf');
return () => engine.destroy();
}, [engine, initializeStore]);
return <Viewer engine={engine} />;
};Yes. Papyrus is an open source SDK that provides a unified UI layer and multiple engines for PDF, EPUB, and TXT.
Yes. The architecture is engine-agnostic so you can swap PDF.js, PDFium, or native engines without changing UI logic.
Yes. Papyrus ships UI layers for React on web and React Native on mobile.
Yes. The core includes events, annotation state, and search hooks for building reader workflows.
Papyrus focuses on real-world document UX: selection, highlights, search, and annotations, while keeping the engine details behind a consistent API. If you need an open source PDF SDK for a web or mobile app, this is the core building block.