# Markdown To Pdf

> Convert a markdown file to PDF using mistune + reportlab. Use when the user wants to convert a .md file to PDF, or when another skill needs to produce a PDF from markdown output.

- **Type:** Skill
- **Install:** `agentstack add skill-staskh-trading-skills-markdown-to-pdf`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [staskh](https://agentstack.voostack.com/s/staskh)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [staskh](https://github.com/staskh)
- **Source:** https://github.com/staskh/trading_skills/tree/main/.claude/skills/markdown-to-pdf

## Install

```sh
agentstack add skill-staskh-trading-skills-markdown-to-pdf
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Markdown to PDF Converter

Converts a markdown file to a professionally formatted PDF. Pure Python — no system tools required.

## Dependencies

Requires two Python packages (already in `pyproject.toml`):

```
mistune>=3.2
reportlab>=4.0
```

Install with: `uv sync` (or `pip install mistune reportlab`)

## Instructions

```bash
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py  [output.pdf]
```

- `input.md` — path to the markdown file (required)
- `output.pdf` — output path (optional; defaults to same directory and basename as input)

## Output

The script returns JSON with:
- `success` — `true` or `false`
- `input` — resolved absolute path of the input file
- `output` — resolved absolute path of the generated PDF
- `error` — error message if `success` is `false`
- `generated_at` — NY timezone timestamp
- `data_delay` — always `"real-time"`

After conversion, tell the user the output PDF path.

## Examples

```bash
# Convert sandbox/report.md → sandbox/report.pdf (default output)
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/report.md

# Explicit output path
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/report.md sandbox/AAPL_Report_2026-05-20_1430.pdf
```

## Supported Markdown

- Headings (H1–H3)
- Paragraphs, bold, italic
- Tables (pipe syntax)
- Fenced code blocks
- Unordered and ordered lists

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [staskh](https://github.com/staskh)
- **Source:** [staskh/trading_skills](https://github.com/staskh/trading_skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-staskh-trading-skills-markdown-to-pdf
- Seller: https://agentstack.voostack.com/s/staskh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
