PDF Generation pack
Claude Skill
Ebook / Whitepaper Formatter
Formats long-form content (10-30 pages) into a PDF with cover, TOC, sections, callouts, headers/footers.
What it does
Takes long-form content (Markdown, drafted text, or notes) and produces a designed PDF: cover, copyright page, table of contents, chapters/sections, pull-quotes, callouts, running headers/footers, page numbers. Designed for downloadable ebooks, lead-gen whitepapers, and internal playbooks.
When to use
- ✓Marketing whitepaper or ebook for lead-gen download
- ✓Internal handbook / playbook that needs to look credible
- ✓A long-form piece (10+ pages) where Markdown rendered to PDF looks too amateur
When not to use
- ✗Reflowable e-reading (Kindle, Apple Books) — that wants EPUB, not PDF
- ✗Web reading — a long blog post is better as HTML with a PDF download button
- ✗Less than 6 pages — use the report-builder or one-pager-creator
Install
Download the .zip, then unzip into your Claude skills folder.
mkdir -p ~/.claude/skills
unzip ~/Downloads/ebook-or-whitepaper-formatter.zip -d ~/.claude/skills/
# Restart Claude Code session.
# Skill is now available — Claude will use it when relevant.SKILL.md
SKILL.md
---
name: ebook-or-whitepaper-formatter
description: Use when formatting long-form content into a designed PDF (10-30 pages) — ebook, whitepaper, internal playbook. Triggers on "format this ebook", "build a whitepaper PDF", "long-form PDF".
---
# Ebook / Whitepaper Formatter
Take long-form content and produce a designed PDF that holds up at 20+ pages. Ebooks fail when they're just Markdown rendered to PDF — readers can tell. Add the structural elements that long-form actually needs: cover, TOC, running headers, real typography.
## Required inputs
1. **The content** — Markdown, raw text, or structured chapters/sections
2. **Title + subtitle + author/company**
3. **Cover artwork** OR a brief for what the cover should say (color, image, headline)
4. **Branding** — logo, accent color, optional custom font (otherwise default to a good open-source serif)
5. **Audience** — internal vs external; gated lead-gen vs free reading — affects tone of CTAs
6. **Page count target** — many ebooks are unnecessarily long; ask "what's the minimum page count to feel substantive?"
## Approach
**Best for design control**: HTML + print CSS via WeasyPrint or Prince. Prince is commercial but produces book-quality output (running headers, footnotes, leaders). WeasyPrint is open-source and excellent for 90% of cases.
**Pandoc + LaTeX**: `pandoc input.md -o output.pdf --template=mytemplate.tex --pdf-engine=xelatex`. Best typography out of the box. Use `memoir` or `book` class. Worth the LaTeX setup pain for anything you'll reprint.
**Headless Chrome**: works but page-break and running-header support is weaker than WeasyPrint or Prince. Acceptable if you already have Chrome in your pipeline.
Avoid: Word → PDF for anything 15+ pages. The output betrays that it's Word.
## Structure
1. **Cover** (page 1, no number) — title, subtitle, author, hero visual
2. **Copyright / publisher** (page 2) — © year, contact, version
3. **Table of contents** (auto-generated, with leaders and page numbers)
4. **Foreword or executive summary** (1-2 pages)
5. **Chapters** — each starts on a recto (right-hand) page, drop cap optional
6. **Conclusion / next steps**
7. **About the author / about the company**
8. **CTA page** (lead-gen only) — clear next step
9. **Endnotes / references** if applicable
For each chapter:
- Chapter number + title on its own page or large hero block
- Body in flowing serif type
- Section subheads in sans
- 1-3 callout boxes (key takeaway, stat, pull quote) per chapter — break up gray pages
- Optional chapter-end summary or 3 takeaways
## Style guidance
- Page size: US Letter, A4, or for true ebook feel, **6×9 inches** (book trim size). Pick based on print vs digital.
- Margins: generous — 25mm outer, 22mm inner if facing pages, 22mm top/bottom
- Body type: serif at 11-12pt, line-height 1.4-1.5
- Headers: sans, weight contrast — don't go bigger than 24pt for chapter titles
- Running header: book title (verso/left page), chapter title (recto/right page) — a publishing convention readers expect
- Page numbers: bottom outer corner; never on chapter-opening pages
- Pull quotes: 14-16pt italic, indented, with a thin rule above and below
- Callout boxes: tinted background at 8% accent color, padding generous
## Common pitfalls
- **Widows and orphans**: a single line at the top of a page or a single word on the last line of a paragraph. CSS `widows: 2; orphans: 2;` or LaTeX defaults catch most.
- **Chapter starts on verso**: looks unprofessional. Force recto with `page-break-before: right` in print CSS.
- **Inline code or screenshots break layout**: constrain max-width to text column, never bleed unless intentional.
- **TOC page numbers wrong**: regenerate after final pagination. Manual TOC always desyncs.
- **Hyperlinks in print**: blue-underlined links look bad in print. Strip color OR auto-append URL in footnote (Pandoc's `--variable links-as-notes` does this).
- **Font licensing**: don't ship a PDF embedded with a non-licensed font. Open-source serif options: Source Serif, Crimson, EB Garamond.
## Output
Generate the PDF. Confirm:
- Page count
- TOC entries match chapter starts
- Cover, copyright, TOC, chapters, back matter all present
- File size (long PDFs with images can balloon — flag if >10 MB and offer to compress images)
If the user supplied raw Markdown without structure, recommend a structure first ("here's what a 5-chapter version of your content would look like") before generating. Don't guess at chapter boundaries.
Example prompts
Once installed, try these prompts in Claude:
- Format this 18-page draft into an ebook PDF. Title, 5 chapters, 3 callout boxes per chapter.
- Build a whitepaper PDF from this Markdown. Add cover, TOC, exec summary, and our brand styling.