Introduction

The SDK is a React library for building PDF applications in the browser: viewers, editors, form fillers, and the tools in between. It is built around one idea: the SDK owns the document, and you own the UI.

The main component, Viewport, renders the pages and handles direct interaction with them (scrolling, zooming, selecting, typing, filling form fields). Everything around it, such as toolbars, sidebars, and shortcuts, is your own React code that drives the SDK through hooks: hooks that read document state re-render your components when that state changes, and hooks that return commands let you change the document.

Beta: the SDK is in beta, and the exports and their APIs may change freely between releases. Pin the exact package version and review the changes when updating.

Where to start

Migration guides

API reference

Every component, hook, and constant exported by @sdk-pdf/react has its own page. See the API reference for the full list, grouped by area: components, document, viewport, pages, selection, and widgets.

Installation

npm install @sdk-pdf/react

The package is distributed through our private registry; Getting started explains how to configure npm for the @sdk-pdf scope, and Project setup covers the stylesheet, client-only rendering, the canvas alias, and React Strict Mode.

React is the first supported framework. Vue, Angular, and Svelte packages are coming soon. Subscribe to the wishlist to get notified when yours ships.

On this page