> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spoolpdf.nandra.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox, pages, and inject

> Unmetered watermarked previews, page ranges, CSS/JS inject, metadata, and lazy images.

## Sandbox

`sandbox: true` still occupies a concurrency slot and returns a PDF with a SANDBOX watermark. Usage is **not** incremented. Success includes `X-Sandbox: true` and omits `X-Usage-Count`.

```json theme={null}
{"html": "<h1>Preview</h1>", "sandbox": true}
```

MCP `render_pdf` accepts the same field.

## Page ranges

Keep ranges with `pages` (for example `1-3,6`). Cannot combine with `single_page` or `{width}xauto`.

## Inject CSS and JavaScript

`css` and `javascript` are inline source or a public http(s) URL (same SSRF rules as `url`). Inline and remote inject run once before print.

`lazy_load_images` scrolls the page so below-the-fold images fetch.

```json theme={null}
{
  "html": "<h1>Report</h1>",
  "css": "h1{color:#111}",
  "lazy_load_images": true
}
```

## PDF metadata

```json theme={null}
{
  "html": "<h1>Invoice</h1>",
  "metadata": {"title": "Invoice", "author": "Acme", "subject": "August", "keywords": "invoice"}
}
```

Written as PDF XMP `Title` / `Author` / `Subject` / `Keywords`.
