GitHub to PDF

How to save a GitHub README or issue as PDF

GitHub READMEs, issues, pull requests, discussions, wiki pages, and code files — exported as clean, professionally formatted PDFs with code blocks properly styled in monospace fonts.

Free — 3 PDFs per month. No credit card required.

GitHub has no native PDF export

GitHub renders markdown beautifully in the browser. But when you need to convert a GitHub README to PDF — to share with a client, attach to a report, archive for compliance, or read offline — you hit a wall. There is no "Export as PDF" button anywhere on GitHub.

The standard workaround is Ctrl+P (or Cmd+P on Mac). The result is consistently disappointing. The browser's print engine captures everything visible on the page, which on GitHub means the entire UI shell comes along for the ride: the repository navigation bar, the file tree sidebar, the "Star" and "Fork" buttons, the sticky header, and the footer with GitHub's legal links. Your three-page README becomes a seven-page PDF where half the content is interface chrome.

Code blocks suffer the most. GitHub uses a responsive layout that works well on screen but breaks in print. Long code lines get clipped at the page margin instead of wrapping. Syntax highlighting either vanishes entirely or produces unreadable color combinations on white paper. Indentation shifts when the font stack falls back to a system monospace font that has different character widths. The careful formatting that makes code readable in the browser is destroyed in print.

Markdown rendering is lost too. If you try to print the raw file view, you get literal markdown syntax — asterisks, hashes, and brackets — instead of rendered headings, bold text, and links. If you print the rendered view, you get the rendered content but buried under navigation and UI elements.

For issues and pull requests, the situation is worse. Print captures the comment box, the label selector, the sidebar with assignees and milestones, the merge button, and every other interactive element. The actual issue description — the part you want — is a small fraction of the printed output.

GitHub parser

What Pretty PDF captures from GitHub

Our dedicated GitHub parser understands the structure of every major GitHub page type and extracts exactly the right content.

README Files

Full markdown rendering preserved — headings, tables, images, badges, code blocks, and task lists. The README is extracted from the repository page without the file tree, branch selector, or navigation.

Issues

Issue title, body, labels, and author metadata. Markdown in the issue description is rendered properly, including code fences, images, and checklists. The sidebar controls and comment input are removed.

Pull Requests

PR title, description, branch info, and review status. The description's markdown is fully rendered. Diff views and file change tabs are excluded to keep the PDF focused on the PR summary and context.

Discussions

Discussion thread in a readable format — original post and replies with author attribution. The threaded conversation structure is preserved while voting controls and category navigation are stripped.

Wiki Pages

Wiki content extracted with full markdown rendering. The wiki sidebar navigation and page history controls are removed, leaving just the documentation content in a clean, readable format.

Code Files

Source code with syntax styling and line numbers. The file is rendered with JetBrains Mono at proper size, with long lines wrapped cleanly. The blob toolbar and raw/blame/history tabs are removed.

Four steps

How it works on GitHub

From any GitHub page to a polished PDF in under ten seconds.

1

Visit any GitHub page

Navigate to a README, issue, pull request, discussion, wiki page, or code file. Pretty PDF works on all of them.

2

Click the Pretty PDF icon

Click the extension icon in your browser toolbar. Pretty PDF automatically detects that you're on GitHub and activates the dedicated GitHub parser.

3

Choose a template

Select from five templates. Dark Mode is particularly well-suited for code-heavy content — it mirrors the look developers expect and provides high contrast for syntax elements.

4

Generate and download

Click Generate PDF. The server extracts the content, applies your template with embedded fonts, and returns a clean PDF in seconds.

Code block handling built for developers

Code is the centerpiece of most GitHub pages, and Pretty PDF treats it with the care it deserves. Every code block — whether it is a fenced code block in a README, an inline snippet in an issue comment, or an entire source file — is rendered using JetBrains Mono, a monospace font designed specifically for code readability. The font is embedded directly in the PDF, so it renders correctly on every device regardless of what fonts are installed locally.

Indentation is preserved exactly as written. Tabs and spaces maintain their intended alignment, so Python indentation, YAML nesting, and carefully formatted configuration files look identical in the PDF to how they appear on GitHub. This is a common failure point for browser print — when the font falls back to a system monospace typeface with different character widths, indentation breaks silently.

Long lines are handled intelligently. Instead of being clipped at the page margin (the default browser print behavior) or overflowing off the edge of the page, long lines wrap cleanly at word boundaries where possible and at character boundaries when necessary. The wrapping is styled so that continuation lines are visually distinct from new lines, preventing confusion when reading the printed code.

Inline code — the backtick-wrapped snippets that appear within paragraphs — is styled differently from block-level code. It uses a subtle background color and the same monospace font at a slightly smaller size, matching the visual convention that developers expect from rendered markdown. This distinction is preserved in the PDF, making it easy to scan a document and identify code references within prose.

Syntax styling is carried through from GitHub's rendered output. Language-specific color coding for keywords, strings, comments, and identifiers appears in the PDF just as it does in the browser. The Dark Mode template is especially effective here, providing the high-contrast dark background that makes syntax colors pop.

Comparison

Ctrl+P on GitHub vs Pretty PDF

A side-by-side look at what each approach produces from the same GitHub page.

Feature Browser Ctrl+P Pretty PDF
Sidebar & navigation removal Included in output Fully removed
Code formatting Lines clipped, fonts fallback JetBrains Mono, wrapped lines
Markdown rendering Lost in raw view, cluttered in rendered Full rendering preserved
Image handling Often missing or broken Resolved and embedded
GitHub UI chrome removal Star/Fork/Watch buttons included All UI elements stripped
Professional templates None — generic print CSS 5 templates with embedded fonts
File size Bloated with UI assets Compact, content only
API access for batch export Not available REST API on Pro+ plans

Developer tip: batch export with the API

If you need to export multiple GitHub pages — an entire wiki, a set of issues for a milestone, or documentation across several repos — the Pretty PDF API lets you automate the process. Available on Pro+ plans, the API accepts any URL and returns a formatted PDF.

Here is a quick example using curl to convert a GitHub README to PDF:

curl -X POST https://api.prettypdfprinter.com/v1/generate/url \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://github.com/fastapi/fastapi",
    "template": "dark",
    "page_size": "A4"
  }' \
  --output fastapi-readme.pdf

The server fetches the page, detects that it is a GitHub URL, activates the GitHub parser, extracts the README content, applies your chosen template, and returns the PDF. You can wrap this in a shell loop to process a list of URLs, integrate it into a CI/CD pipeline to generate documentation artifacts, or build it into internal tooling.

The API supports all the same templates and options as the extension. Pass "template": "dark" for code-heavy repos, "template": "corporate" for documentation you are sharing with stakeholders, or "template": "clean" for general-purpose output. API access is included with Pro+ plans at $12/month, which includes 200 API requests per month alongside unlimited extension-based PDFs.

Frequently asked questions

Yes. Pretty PDF's GitHub parser automatically detects issue pages and extracts the issue title, body, labels, assignees, and metadata. The result is a clean PDF with the full issue description formatted with proper markdown rendering, code blocks, and images — without the sidebar, notification controls, or GitHub navigation.
Yes. Pretty PDF embeds JetBrains Mono, a professional monospace font designed for code readability. Code blocks retain their indentation, syntax styling, and structure. Long lines wrap cleanly instead of being cut off, and inline code is styled distinctly from block-level code.
Pull request pages are fully supported. Pretty PDF extracts the PR title, description body, branch information, and review status. Markdown in the description is rendered properly, including task lists, code snippets, and linked issues. The diff view and file change list are excluded to keep the PDF focused on the PR summary.
Yes. The Pretty PDF API (available on Pro+ plans) accepts a URL and returns a PDF. You can script batch exports using curl or any HTTP client — loop through a list of GitHub URLs and POST each one to the /v1/generate/url endpoint. This is useful for archiving documentation, exporting issue backlogs, or building offline reference libraries.
Dark Mode is the natural choice for code-heavy content — it mirrors the appearance developers are used to on GitHub and provides high contrast for syntax elements. For README files and documentation, Clean or Minimal templates produce excellent results with clear typography. Corporate works well when sharing technical documentation with non-engineering stakeholders.

Start saving GitHub pages as beautiful PDFs

Free tier, no credit card. 3 PDFs per month with all templates included.

Install Free Extension