← ClaudeAtlas

make-pdflisted

Turn a Markdown report into a clean, branded A4 PDF the president can read or print. Use whenever the user asks for a report/summary/proposal "as a PDF" or "to read properly". Works fully offline on Windows using pandoc + headless Chrome/Edge — no LaTeX or extra installs needed.
Faaz17/Agents-and-Skills · ★ 1 · Data & Documents · score 74
Install: claude install-skill Faaz17/Agents-and-Skills
# Make a PDF Renders Markdown → styled HTML (pandoc) → PDF (headless Chrome). Produces society-branded A4 output with a title page, table of contents, and per-section page breaks. No internet, no LaTeX required. ## The two-step pipeline Run from the society root (`Scoiety Folders/`). Give your report YAML metadata at the top so the title page renders: ```markdown --- title: "Report Title" subtitle: "A subtitle in small-caps" author: "For <Person Name>, President 2026/27" date: "1 July 2026" --- # First Heading ... ``` **Step 1 — Markdown → standalone HTML (CSS embedded):** ```bash pandoc "MyReport.md" -o "MyReport.html" -s --toc --toc-depth=1 \ -c ".claude/skills/make-pdf/report.css" --embed-resources --standalone ``` **Step 2 — HTML → PDF via headless Chrome:** ```bash CHROME="/c/Program Files/Google/Chrome/Application/chrome.exe" # or Edge (see below) UDD="$TMPDIR/ea_chrome_pdf_$$" "$CHROME" --headless=new --disable-gpu --no-first-run --no-pdf-header-footer \ --user-data-dir="$UDD" --virtual-time-budget=15000 \ --print-to-pdf="<project>/MyReport.pdf" \ "file:///<project>/MyReport.html" rm -rf "$UDD" ``` Edge works identically — swap the executable: `/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`. ## Gotchas (learned the hard way) - **`--print-to-pdf` MUST be an absolute path.** A relative path resolves against Chrome's own directory and fails with "Access is denied." Use the full `C:/Users/.../file.pdf` form (forward slashes are fine