en un clic
beautiful-markdown-for-pdf-export
// Guidelines and instructions for generating Markdown that looks excellent when read natively and renders beautifully when exported or converted to PDF.
// Guidelines and instructions for generating Markdown that looks excellent when read natively and renders beautifully when exported or converted to PDF.
| name | Beautiful Markdown for PDF Export |
| description | Guidelines and instructions for generating Markdown that looks excellent when read natively and renders beautifully when exported or converted to PDF. |
When generating Markdown files that will ultimately be read by humans or converted into PDF documents (e.g., via browser print to PDF, Pandoc, or other generators), it is essential to follow specific structural and formatting guidelines. Standard markdown can look plain or break awkwardly across pages if not formatted with intent.
#, ##, ###) without skipping levels. This ensures a clean Table of Contents is generated by PDF parsers.**bold** text to highlight key terms at the start of bullet points or inside paragraphs, acting as miniature sub-headers.Always start with an H1 (#) followed by a brief meta-data section (e.g., Date, Author, Context).
# Security Scan Report: repo-owner/repo-name
**Generated:** October 26, 2026
**Analyzer:** RepoMind Security Bot
**Depth:** Deep Analysis
---
Note: The horizontal rule (---) acts as a visual separator that translates well to a solid line in PDF.
Use Blockquotes (>) for executive summaries or high-level status updates. PDF renderers usually style these with a distinct background or border color.
> **Executive Summary**
> The codebase contains **2 Critical** and **4 High** severity issues.
For recurring items (like security findings), use a consistent, repeating structure involving H3s (###) and definition lists.
Format template:
### 🔴 [CRITICAL] SQL Injection Risk in User Handler
- **Location**: `src/api/users.ts` (Line 42)
- **Type**: Parameter Tampering
- **Status**: Vulnerable
**Description**
User input is concatenated directly into the database query string without sanitization.
**Recommendation**
Use parameterized queries or prepared statements provided by the ORM.
**Code Snippet**
\`\`\`typescript
const query = "SELECT * FROM users WHERE email = '" + req.body.email + "'";
db.execute(query);
\`\`\`
Why this works:
🔴, 🟠, 🟡) serve as excellent visual anchors that translate perfectly to modern PDFs.While standard Markdown doesn't have a native page break syntax, PDF renderers often respect HTML page breaks. If you need to force a page break before a new major section, insert:
<div style="page-break-before: always;"></div>
Only use this sparingly, usually right before large Appendices or between distinct logical chapters.
\``javascript`).When taking StoredScan data and generating Markdown, do not just dump the JSON. Synthesize it using the templates above so that when the user clicks "Download Markdown" and subsequently attempts to print the page, the resulting artifact looks like a professionally authored report rather than a terminal output dump.