Skip to content

InkLayer CoreOne PDF engine for every web framework

Build your product UI. Let Core handle PDF viewing, annotations, page rendering, print, and export.

PDF document with a text highlight and a selected freehand annotation.PDF document with a text highlight and a selected freehand annotation.

Start with Core

Install Core, provide two host elements, give the scroll container an explicit size, and load a PDF.

bash
npm install @inklayer-dev/core
html
<div id="pdf-workspace">
  <div id="pages"></div>
</div>
css
html, body, #pdf-workspace {
  height: 100%;
  margin: 0;
}

#pages {
  height: 100%;
  overflow: auto;
  background: #f2f4f7;
}
ts
import { createInkLayer } from '@inklayer-dev/core/capabilities'
import '@inklayer-dev/core/style'

const root = document.querySelector<HTMLElement>('#pdf-workspace')!
const pages = document.querySelector<HTMLElement>('#pages')!

const core = await createInkLayer({
  root,
  pageFlow: { container: pages, scale: 'page-width' }
})
await core.load({ url: '/documents/review.pdf', range: 'auto' })

Getting started →

NOTE

InkLayer Core is headless: it owns PDF and annotation behavior while your framework owns the toolbar, panels, and workflow.

Choose your next task

Load PDF → · Create your first annotation → · Print and export →

Extend only when you need to

Capability plugins connect one instance to application services such as logging, annotation storage, text input, printing, and downloads. Annotation Type Definitions add namespaced drawing tools. However you extend it, Core retains control of coordinates, validation, interaction, rendering, output, and cleanup.

Build your first plugin →

Released under the MIT License.