PaperType

README to PDF

Turn a README.md or any Markdown page from a code repository into a PDF you can attach, print or hand to a reviewer. Code blocks keep their highlighting, tables keep their header rows across pages, and the Minimal theme is designed for this kind of document.

Before you paste: two things READMEs often contain

READMEs are written for a web page, and two web habits do not survive a network-free renderer:

  • Badge and remote images (![build](https://...)). The renderer has no network access. Images, fonts and stylesheets at external URLs are never fetched; inline them as data: URIs. A request that references an external URL fails with a 422 that names the URL, rather than silently dropping the asset. Delete the badge lines or replace the image with a data: URI.
  • Relative image paths (![diagram](docs/arch.png)). There is no repository to resolve them against. Convert the file to a data: URI, or remove the image.

Links to web pages are fine: they stay clickable in the PDF and are never fetched.

What renders well

  • Headings, with ## and ### collected into the table of contents when toc is on.
  • Tables (pipe syntax). The header row repeats at the top of each page a long table spans.
  • Fenced code blocks with syntax highlighting when the fence names a language (```python). Unlabelled fences are rendered as plain monospace.
  • Footnotes, definition lists, abbreviations and smart punctuation.
  • Admonitions (!!! note) for call-out boxes.
  • Inline HTML inside Markdown passes through to the renderer.
  • Images, as data: URIs only.

In the browser

Open the studio, upload the .md file (or paste it), choose Minimal for a README or Clean for longer docs, tick Table of contents for anything over a few pages, and press Preview PDF. Studio previews carry a watermark and are deleted after 24 hours. A clean export is $5 per document, no account needed.

From a build step

To export docs on every release, call the API from CI with the file contents:

curl -X POST https://papertype.dev/v1/pdf \
  -H "Authorization: Bearer $PAPERTYPE_KEY" -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile md README.md '{markdown: $md, theme: "minimal", toc: true, title: "Project README"}')" \
  -o README.pdf

The free plan covers 50 documents a month with a footer mark. See the Markdown to PDF API.

Questions

Why does my README fail to render?

Almost always a remote image, usually a badge. The error names the URL. Remove it or inline the image as a data: URI and try again.

Will code blocks be highlighted?

Yes, when the fence names a language (```bash, ```python, ```json and so on). Unlabelled fences render as plain monospace.

Can I combine several Markdown files into one PDF?

Concatenate them into one Markdown document first (a shell cat is enough), then render once. Use ## headings per file so the contents page lists them.

Do you keep a copy of my docs?

Studio previews are stored so the preview and export links work, and deleted after 24 hours. API requests are not stored at all.

Related

Free previews carry a watermark and are deleted after 24 hours. Free API output carries a footer mark. The renderer runs no JavaScript and never fetches external URLs. Privacy · Terms · Refunds