Compose your own viewer
Compose document state, virtualized pages, and rendering layers with your own React components.
Meet the primitivesLector is an open-source toolkit for building PDF experiences in React. Compose rendering, text selection, and annotations into a viewer that feels like part of your product.
Compose document state, virtualized pages, and rendering layers with your own React components.
Meet the primitivesVirtualized pages render as you read. Built-in panning and zooming keep large documents within reach.
Explore the controlsAdd text selection, search, highlights, and annotations. Every layer works with the same document.
Explore the layersA document, its pages, and the layers you need. Familiar React composition, with the PDF state and rendering taken care of.
Read the documentationimport {
Root, Pages, Page,
CanvasLayer, TextLayer,
} from "@anaralabs/lector";
export function Reader() {
return (
<Root source="/document.pdf" className="h-[600px]">
<Pages>
<Page>
<CanvasLayer />
<TextLayer />
</Page>
</Pages>
</Root>
);
}