The PDF framework built for agents.
Your coding agent writes documents as React components. The dev server renders them to real PDF bytes on every save, so the preview in the browser is the file you ship. Click any element to see its source line and leave a comment; the agent applies it and re-renders. Export the same bytes headlessly as PDF, or as editable Word or Markdown.
openpdf.sh · Documentation · Quickstart · Discussions
npm create @autono/open-pdf@latest my-docs
cd my-docs
npm run devOpen the workspace in your coding agent and ask for a document. The bundled create-doc skill writes docs/<id>/index.tsx; the preview at http://localhost:5173 updates on every save.
Requires Node.js 20.19+ or 22.12+.
Inside a workspace:
npx open-pdf updateMoves @autono/open-pdf to the latest version and syncs the agent skills it ships. Your docs and config are untouched. The dev server shows an Update button when a newer version is out, which does the same thing. Restart npm run dev afterwards.
- Describe. Tell your agent what the document is. It runs
/create-docand writes the React. - Preview. The dev server renders actual PDF bytes on every save, in well under a second.
- Annotate. Press
i, click anything, leave a note. It lands in the source as an@pdf-commentmarker. - Ship. Your agent runs
/apply-comments.open-pdf exportwrites the PDF, or--format docx/--format mdfor editable Word or Markdown. The viewer's Export menu does the same.
- A preview that is the PDF. Takumi renders real PDF bytes in a web worker. No HTML approximation.
- Click-to-source inspector. Every element knows its exact source line. Comments persist in the source, ready for an agent.
- Real document features. HTML tables with repeating headers, page-break control, running header and footer bands, page numbers, custom fonts and images.
- Export to PDF, Word, Google Docs, Markdown. DOCX output is real editable text, not page images.
- Agent-native. File-based skills (
create-doc,apply-comments,create-theme, ...) sync into the workspace. No MCP server. Works with Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Windsurf, Zed, and anything else that readsAGENTS.md. - Nothing to configure. Vite, React, and TypeScript live inside the runtime. A workspace is
docs/, an optionalopen-pdf.config.ts, and your agent skills.
import { PageNumber, TotalPages, type PageOptions } from '@autono/open-pdf';
export const pageOptions: PageOptions = {
size: 'a4',
margin: { top: 56, bottom: 72 },
footer: (
<span tw="flex w-full justify-end text-[10px]">
Page <PageNumber /> of <TotalPages />
</span>
),
};
export default function Doc() {
return (
<main tw="flex flex-col">
<h1 tw="text-[30px] font-bold">Hello, open-pdf</h1>
<p tw="mt-4">This paragraph is real PDF text.</p>
</main>
);
}
export const meta = { title: 'Hello' };Style with Tailwind classes via the tw prop. Content flows and the engine paginates. See Authoring for tables, pagination, fonts, images, and themes.
| Command | What it does |
|---|---|
open-pdf dev |
Dev server with live PDF preview and inspector. |
open-pdf build |
Static site of the viewer. |
open-pdf preview |
Serve the production build. |
open-pdf export [docs...] |
Render docs to export/. --format pdf (default), docx or md. |
open-pdf sync:skills |
Sync the built-in agent skills into the workspace. |
open-pdf update |
Update @autono/open-pdf to the latest version and sync skills. |
Full flags: CLI reference · Config reference
| Package | Version | Role |
|---|---|---|
@autono/open-pdf |
Runtime: viewer, inspector, Vite plugin, open-pdf CLI. |
|
@autono/create-open-pdf |
npm create @autono/open-pdf scaffolder and workspace template. |
|
apps/demo |
private | Example workspace; the dogfood target for the framework. |
apps/web |
private | openpdf.sh landing site. |
docs/ |
docs.openpdf.sh, built with Mintlify. |
Contributions are welcome. Read CONTRIBUTING.md for the repo layout, dev workflow, and PR checklist.
pnpm install
pnpm dev:demo # demo workspace against local core
pnpm check # biome: format + lint
pnpm typecheck
pnpm testBugs and feature requests go through the issue templates. Questions and show-and-tell belong in Discussions. Please follow the Code of Conduct.
Every merge to main is a release by default: CI tags the next version, publishes both packages to npm with provenance, and cuts a GitHub Release. Merge commits containing [skip release] skip it.
Report vulnerabilities privately as described in SECURITY.md. Please do not open public issues for security reports.
open-pdf started as a fork of open-slide by Yiwei Ho, keeping its agent-first architecture and retargeting it from slide decks to paginated PDFs. Rendering is powered by Takumi.
MIT. Contains code from open-slide © 2026 Yiwei Ho; modifications © 2026 Autono Holdings Inc.