# Print-friendly Markdown code blocks

Readers asked for code fences that do not flood the page with black ink. PrintifyMarkdown now uses Prism’s **light** theme: a very light grey background and dark text, with syntax colors that stay legible on paper.

## Inline and fenced

Use inline `` `code` `` for short identifiers. For longer snippets, use a fenced block with a language tag:

```ts
export function formatBytes(n: number): string {
  if (n < 1024) return `${n} B`;
  const kb = n / 1024;
  if (kb < 1024) return `${kb.toFixed(1)} KB`;
  return `${(kb / 1024).toFixed(2)} MB`;
}
```

## Shell and config

```bash
# Convert Markdown to PDF (CLI)
bun run cli ./notes.md -o notes.pdf --title "Sprint notes"
```

```json
{
  "pageSize": "A4",
  "margin": "20mm",
  "preferCSSPageSize": true
}
```

## Why light backgrounds print better

Dark IDE themes look sharp on screen. On a printer, a full-width black `pre` block burns toner for every line of whitespace. A light grey panel still marks “this is code” without wasting ink, and black text stays easier to read under office lighting.
