import { Viewer, DocumentGate } from '@embedpdf/react/runtime'; import type { OpenInput } from '@embedpdf/react/runtime'; import { Stage, stagePlugin } from '@embedpdf/react/stage'; import { RenderLayer, renderPlugin } from '@embedpdf/react/render'; import { interactionPlugin } from '@embedpdf/react/interaction'; import { actionsPlugin, useActionsUiAdapter } from '@embedpdf/react/actions'; import { LinkLayer, linkPlugin } from '@embedpdf/react/link'; import { localEngine } from '@embedpdf/engine'; import './basic.css'; const engine = localEngine(); // The actions plugin runs a link that names a viewer command, such as the footer's Next. const plugins = [stagePlugin(), renderPlugin(), interactionPlugin(), actionsPlugin(), linkPlugin()]; // [!doc-source links] const links = async (): Promise => { const response = await fetch('https://www.embedpdf.com/pdfs/links.pdf'); return { kind: 'bytes', id: 'links', bytes: new Uint8Array(await response.arrayBuffer()) }; }; // [!/doc-source] // The browser's way to open a website, once for the viewer. function BrowserActions() { useActionsUiAdapter(); return null; } export default function App() { return ( Loading…

}>

Every blue label is a link. Click one, or press Tab to reach it and Enter to follow it.

{() => ( <> )}
); }