# PDF to Typst

Recover editable Typst source and figures from a PDF, with local vision transcription for scanned pages.

PDF to Typst gives a fixed document an editable next chapter. It recovers text and useful structure, then writes Typst source you can simplify, restyle, and compile locally.

## Use it when

- you are moving your own PDF into a Typst workflow;
- the original source is unavailable;
- content recovery matters more than matching every pixel.

If the author published an original source archive, use that instead. Choose [PDF to LaTeX](/docs/tools/pdf-to-latex/) when a LaTeX class or submission is the destination, and [PDF to Markdown](/docs/tools/pdf-to-markdown/) for plain notes.

## Convert the document

1. Open **PDF to Typst**, or run `/pdf-to-typst`.
2. Choose a PDF up to 128 MB.
3. Start the conversion.
4. Review the Typst source and extracted files.
5. Copy it, save `converted.typ`, or create a Typst project and compile it.

Selectable PDFs go through Oleafly's local text-layer pipeline. It reconstructs reading order, finds likely headings and equations, extracts figures, and then converts the recovered structure to Typst. Likely scans can be transcribed page by page with a compatible Ollama vision model on your device.

## Review the new source

Look first at multi-column reading order, footnotes, equation symbols, table cells, figure captions, and references. Then choose a Typst template and rebuild page-level design deliberately.

:::note[Scanned pages]
Vision transcription is limited to 50 pages and requires a local Ollama model that can read images. Text-layer conversion does not need an AI model. The PDF stays on your device in both cases.
:::

Only convert material you own or have permission to reuse. A reconstructed source is a working draft, not proof that the original document's structure or accessibility has been preserved.
