# Generate PDF

> Convert Markdown files to PDF format with professional formatting

- Skill: `luokai0/generate-pdf` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add luokai0/generate-pdf`
- Raw SKILL.md: https://api.skillmd.com/api/skills/luokai0/generate-pdf/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: luokai0 (https://skillmd.com/u/luokai0)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/luokai0/generate-pdf

---


# Generate PDF from Markdown

## Purpose

Convert Markdown files to professionally formatted PDF documents using pandoc.

## Input

- Path to the Markdown file you want to convert

## Steps

1. Install pandoc and LaTeX:

```bash
apt-get update && apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-xetex
```

2. Convert the Markdown file to PDF with professional formatting:

```bash
pandoc "<user's_markdown_path>" \
  --pdf-engine=xelatex \
  --variable geometry:margin=1in \
  --variable fontsize=11pt \
  --variable linkcolor=blue \
  --highlight-style=tango \
  -o "<output_pdf_path>"
```

3. Tell the user where the PDF file was saved.


