Gitputout

Doc2screen — Documentation skill for Claude Code

Documentation community

Screen-adaptive reading editions from PDF, DOCX, EPUB, HTML, and Markdown — self-contained HTML, EPUB3, and device-sized PDF.

How to install Doc2screen

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Gitputout/doc2screen and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Doc2screen does

Screen-adaptive reading editions from PDF, DOCX, EPUB, HTML, and Markdown — self-contained HTML, EPUB3, and device-sized PDF. Claude Code Skill + CLI.

Alternatives in Documentation

  • Docx — Create, edit, and analyze Word documents with tracked changes, comments, and formatting 94.1k ★
  • Ars Format Convert — ARS academic-paper format-convert mode — convert to LaTeX / DOCX / PDF / Markdown 4.5k ★
  • Rainman Translate Book — English 中文 Claude Code Skill,使用并行 subagent 将整本书(PDF/DOCX/EPUB)翻译成任意语言 489 ★

README

doc2screen

Turn documents into **screen-adaptive reading editions**: one semantic source, multiple outputs — self-contained HTML, EPUB3, and device-sized PDF.

doc2screen does not wrap the original PDF layout in HTML. It extracts headings, paragraphs, lists, code, tables, and figures into a `DocModel`, then renders a reflowable single-column reader. That is what makes a document readable on a 6-inch phone instead of merely zoomable.

This repository is also a Claude Code Skill: `SKILL.md` tells the agent how to drive the CLI.

Why

Existing tools solve pieces:

  • MinerU / Docling / Marker extract layout/OCR/tables, but stop at Markdown/JSON/HTML;
  • pdf2htmlEX preserves layout but cannot reflow;
  • k2pdfopt reflows PDFs for small screens, but outputs PDF, not semantic HTML;
  • PDF-Reflow prototypes the end-to-end idea, but only for PDF and is very new.

doc2screen focuses on the missing last mile: **unified document model + screen profiles + content cleanup + image strategy + HTML/EPUB/PDF packaging + automatic verification**.

Features (v0.1)

  • Input: PDF (text layer), DOCX, ODT, EPUB, HTML, Markdown, RST, LaTeX, TXT.
  • Output: self-contained HTML, EPUB3, PDF sized to a screen profile.
  • Profiles: phone-notes (390×552, ratio 0.706, default), phone-16x9.5 (390×657), phone-16x9, phone-19.5x9, kindle, a5, a4, custom.
  • Reader: TOC drawer, progress bar, font size, dark/light theme, code copy, image viewer with fit/rotate/horizontal-strip modes.
  • Figures: dedupe, aspect-based layout, caption association, print-safe scaling.
  • Cleanup: remove repeated headers/footers/page numbers; trim by heading; drop text/assets explicitly; audit-friendly.
  • Verification: HTML overflow at 15/21px, image loading, figure box height, TOC anchors; PDF page size/blank pages/image aspect/bookmarks; EPUB zip/OPF/nav.
  • PDF bookmarks from headings (PyMuPDF, optional).

Install

Requirements:

  • Python 3.11+
  • pymupdf, lxml
  • pandoc
  • Node.js + `pu