Use the default
One stylesheet styles the toolbars, popovers and pages, in light and dark.
import '@inkbar/theme/theme.css'
Inkbar renders PDFs in the browser and lets people fill in forms, highlight text, discuss it in note threads and redact it. It's written in TypeScript, works with Vue, React, Svelte or no framework, and it's free under the MIT licence.
4.1 The Supplier shall process Customer Data only on documented instructions from the Customer, and shall delete all Customer Data within thirty (30) days of termination.
4.2 Each party shall keep the other's Confidential Information secret and shall not disclose it to any third party without prior written consent.
4.3 Notices under this clause go to Jordan Avery, Legal(marked for redaction) at [email protected] or the address in Schedule 3.
Wrap a viewport in a root and build toolbars from the controls you want: tools, undo and redo, pages and zoom. Each is its own component, so move it, drop it or add your own buttons beside it.
import {
InkRoot,
InkViewport,
InkThreadPopover,
} from '@inkbar/react'
import { highlightTool, noteTool, redactAreaTool } from '@inkbar/core/dom'
import { assets } from 'virtual:inkbar-assets'
import '@inkbar/theme/theme.css'
import { Footer } from './Footer'
import { Toolbar } from './Toolbar'
const tools = [highlightTool(), redactAreaTool(), noteTool()]
export function Review({ url, id }: { url: string; id: string }) {
return (
<InkRoot src={{ url, key: id }} assets={assets} tools={tools}>
<Toolbar />
<InkViewport />
<Footer />
<InkThreadPopover />
</InkRoot>
)
}Annotations are plain typed objects with a published JSON Schema. Keep them in your own state or let Inkbar hold them. Undo and redo work either way.
Vue, React and Svelte share one framework-free core. Without a framework, use createViewer and the same controls from @inkbar/core.
Inkbar works in PDF points with the origin bottom-left. You store the same numbers the PDF uses.
Ship the default theme as it is, restyle it with CSS, or render the controls as your own components. If your page already defines tokens such as --primary and --radius, the theme uses them.
One stylesheet styles the toolbars, popovers and pages, in light and dark.
import '@inkbar/theme/theme.css'
Every rule has zero specificity, so yours win without !important. Or set Inkbar's --ink-* tokens on a single toolbar or popover.
.ink-toolbar {
--ink-surface: #0d1026;
--ink-fg: #ffffff;
--ink-accent: #e4ff4a;
--ink-accent-fg: #0d1026;
--ink-radius: 999px;
border-radius: 999px;
}Render the toolbar buttons as your own components. Each keeps its behaviour and its accessible name.
<InkToolbar>
<InkUndo asChild>
<YourButton icon="undo" />
</InkUndo>
</InkToolbar>Inkbar covers viewing, search, outlines and links, sidebars, forms, signatures, highlights, note threads, drawing, redaction, plugins, printing and downloads. It works by touch, opens password-protected files and ships in English, French and German. Everything below works in every framework package and with no framework.
Pages render on PDF.js with a selectable text layer. Fit to width or page, zoom from 10% to 800%, and scroll continuously or a page at a time. Only pages near the viewport are mounted.
Press Ctrl/Cmd+F in the viewer and type. Every match highlights and the count updates as pages scan. doc.search hands your code the same matches, with where each one sits on the page.
The document's bookmarks show as a tree you can move through by keyboard. Links on the page work with no setup and Tab reaches each one. Back and Forward return you to where you were before a jump.
Put panels of thumbnails, search results or your own content beside the pages. Drag the edge or use the arrow keys to resize. When the window gets narrow, a rail panel floats over the pages.
Fill text fields, checkboxes, radio buttons, lists and signature fields. The form's own scripts calculate totals and check input, and your code reads and sets the values through doc.form.
Draw a signature, type it in a handwriting font or upload a scan. Inkbar keeps it in the store you choose and places it on any page or in a signature field.
With the Highlight tool on, select text and it is highlighted when you let go. From the keyboard, select text and press Enter.
Pin a note to the page, then reply, edit and delete in a thread beside it.
Mark selected text, or drag a box over any area. With @inkbar/engine, apply the marks to remove the content under them and the file's metadata, attachments and scripts, then check the result.
Draw freehand, add lines, arrows, rectangles, ellipses, stars and polygons, and type into text boxes. A freehand stroke that looks like a shape snaps into one.
Export and import JSON with a published schema. Underline, strikeout, squiggly, ink, shapes, lines and text boxes from imported data display too, and the PDF's own annotations show as locked.
A plugin adds commands, tools and page layers, listens for presses and keeps records of its own. Each record can show as a mark that opens a card, and the same cards list in a sidebar. One plugin runs in every framework package.
History with grouped steps, whether Inkbar holds the annotations or your app does, and field edits undo too. Press Ctrl/Cmd+Z, or put the undo and redo buttons wherever your toolbar has room.
Fill fields, highlight, add notes, and move, resize or delete marks from the keyboard, with labelled controls throughout. Area marks and freehand drawing need a pointer.
Pinch to zoom the document, not the browser page, on a touch screen or trackpad. With a drawing tool on, one finger draws and two fingers scroll.
When a PDF needs a password, a dialog asks for it, with nothing to set up. The password is used once and never stored. Turn the prompt off to run your own flow.
Press Ctrl/Cmd+P to print or Ctrl/Cmd+S to download, or use the toolbar buttons. With @inkbar/engine, both give you the PDF with the session's annotations and form values written in.
French and German ship with Inkbar, and any other language is a set of strings you pass in. Change one string or all of them. A new language relabels the viewer in place, with no remount and no lost scroll position.
Most PDF SDK vendors sell an annual contract, priced after a sales call. Inkbar is MIT licensed, so your team installs it from npm and starts building. The paid SDKs still do more, such as digital signatures.
| Comparison | inkbar | Typical commercial SDK |
|---|---|---|
| Price | Free | Annual contract, quoted by sales |
| Price grows with | Nothing | Seats, domains or documents |
| Licence | MIT | Proprietary |
| Source code | Public on GitHub | Closed |
| Trying it out | Install from npm | Timed trial, often watermarked |
| Features today | Viewing, search, forms, signatures, highlights, notes, drawing, redaction, printing, saving into the file | Also digital signatures |
| Custom UI | CSS, or your own components | Whatever the vendor's config allows |
Free for commercial use. Use it and change it inside a product you sell.
Nothing to procure. You sign no contract and manage no licence keys.
No lock-in. The source is public, and Inkbar renders documents in the browser without sending them to us.
You don't need a trial or a sign-up form. Open the sandbox to try it on your own PDF, which never leaves your browser, or follow the quickstart to put a document in your app.
pnpm add @inkbar/react @inkbar/core @inkbar/theme