Use your framework of choice
Use the same Core API in React, Vue, Svelte, Angular, Web Components, or plain TypeScript.
Build your product UI. Let Core handle PDF viewing, annotations, page rendering, print, and export.
Install Core, provide two host elements, give the scroll container an explicit size, and load a PDF.
npm install @inklayer-dev/core<div id="pdf-workspace">
<div id="pages"></div>
</div>html, body, #pdf-workspace {
height: 100%;
margin: 0;
}
#pages {
height: 100%;
overflow: auto;
background: #f2f4f7;
}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' })NOTE
InkLayer Core is headless: it owns PDF and annotation behavior while your framework owns the toolbar, panels, and workflow.
Load PDF → · Create your first annotation → · Print and export →
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.