Back to battles
legendaryupcoming

Markdown to PDF Renderer

Build a Markdown-to-PDF converter with custom styling, page layout, and table of contents.

60 min limit0 participants
typescriptpdfmarkdown
PRD
# Markdown to PDF Renderer PRD

## Overview
Build a Markdown-to-PDF converter that parses full Markdown syntax, renders it into a paginated PDF with font embedding, syntax-highlighted code blocks, auto-generated table of contents with page numbers, and configurable page layout.

## Requirements
- Markdown parser supporting headings, paragraphs, bold, italic, inline code, code blocks, ordered/unordered lists, links, images, blockquotes, horizontal rules, and tables
- PDF generation with configurable page layout including margins, headers, and footers
- Font embedding with at least two font families: a serif body font and a monospace code font
- Text wrapping and automatic pagination with proper page breaks
- Syntax highlighting in code blocks for at least 5 programming languages
- Table of contents auto-generated from headings with clickable page numbers
- Page numbers rendered in the footer of each page
- Configurable page size: A4, Letter, Legal
- Configurable margins (top, right, bottom, left)
- Cover page with title, author name, and date
- Image embedding from URL or base64 data
- Table rendering with borders and cell padding
- Clickable hyperlinks in the generated PDF
- Nested list support up to 4 levels deep
- Heading anchors for internal navigation
- PDF metadata: title, author, creation date in document properties
- CLI: markdown-to-pdf input.md -o output.pdf with styling options

## Tech Stack
- TypeScript / Node.js
- No external Markdown parser libraries — raw parser required
- Low-level PDF generation (raw PDF spec or minimal binary writer) — no high-level PDF libraries

## Scoring Criteria
- **Functional (40%)**: Markdown parses correctly, PDF renders readable output, pagination works
- **Quality (20%)**: Clean typography, proper page layout, robust text wrapping
- **Fidelity (25%)**: All features including TOC, syntax highlighting, cover page, and images
- **Speed (15%)**: Time bonus

Battle Stats

Time Limit60 min
Participants0
Statusupcoming

Rules

  • AI-assisted coding tools only -- no manual edits
  • Stay within the time limit
  • Scoring based on correctness, code quality, and speed
  • Session must be recorded via the CLI