Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/StarTrail-org/PixelRAG/llms.txt

Use this file to discover all available pages before exploring further.

pixelshot is the standalone document-to-screenshot-tile CLI. It ships with pip install pixelrag (no extras needed) and handles URLs, PDFs, HTML files, and images. Each input is captured as a series of JPEG tile images, written into a {stem}.png.tiles/ subdirectory alongside a tiles.json manifest.

Synopsis

pixelshot [inputs...] [options]

Arguments

inputs
string[]
required
One or more inputs to render. Each can be:
  • An http:// or https:// URL
  • A local file path (.pdf, .html, .htm, .png, .jpg, .jpeg, .webp)
  • A .txt file containing one URL per line (batch capture)

Options

--output
string
default:"./tiles"
Output directory for tile subdirectories. Each input produces a {stem}.png.tiles/ folder inside this directory. Short form: -o.
--backend
string
default:"cdp"
Rendering backend for URL and HTML inputs. cdp uses a turbo headless_shell on linux-x64 and falls back to the system Chrome on other platforms.Choices: cdp
--tile-height
integer
default:"8192"
Maximum height in pixels for each tile. Long pages are split into multiple tiles, each at most this many pixels tall.
--quality
integer
default:"85"
JPEG compression quality, on a scale of 1 (smallest file) to 100 (highest fidelity). Values between 80–90 are a good balance for visual search.
--viewport-width
integer
default:"875"
Browser viewport width in pixels. The default of 875px matches the width at which Wikipedia and many docs sites render cleanly without wrapping.
--workers
integer
default:"4"
Number of parallel browser processes for batch captures. Increasing this speeds up large URL lists at the cost of more CPU and memory.
--wait-network-idle
boolean
After the page’s load event, also wait until network activity drops to at most 2 in-flight requests for ~500 ms (networkidle2), capped at 12 s. Useful for JavaScript-heavy SPAs that fetch content after the load event. This flag is set automatically when pixelrag index build runs against a web source; enabling it disables the turbo CDP capture path.
--dpi
integer
default:"200"
DPI resolution for PDF rendering. 200 DPI produces approximately 1 650 × 2 200 px output for an A4 page — suitable for Qwen3-VL embedding without further resizing.
--cdp-url
string
Attach to an already-running Chrome or Brave DevTools endpoint (e.g. http://127.0.0.1:9222) instead of launching a throwaway headless browser. Renders each input in a new tab using that browser’s existing session (cookies, logins), then closes only that tab. No local Chrome binary is needed. Can also be set via the PIXELSHOT_CDP_URL environment variable.

Environment Variables

VariableDescription
CHROME_PATHOverride the Chrome binary path. Set this when Chrome is installed in a non-standard location or when you want to pin a specific version.
PIXELSHOT_CDP_URLDefault CDP endpoint, equivalent to passing --cdp-url. Useful for scripts where you always attach to a running browser.

Output Structure

For each input, pixelshot creates a subdirectory {stem}.png.tiles/ inside the --output directory:
./tiles/
└── python.png.tiles/          # stem derived from the URL or filename
    ├── tile_0000.jpg
    ├── tile_0001.jpg
    ├── tile_0002.jpg
    └── tiles.json             # manifest recording tile names, page height, viewport width
The tiles.json manifest records metadata consumed by downstream pipeline stages (pixelrag chunk, pixelrag embed).
Image files (.png, .jpg, etc.) passed as inputs are copied directly into the output directory rather than being re-rendered through a browser.

Examples

pixelshot https://en.wikipedia.org/wiki/Python -o ./tiles
For Wikipedia or any JS-rendered site where content loads after the page’s load event, add --wait-network-idle to let the page settle before capturing. Expect a small throughput penalty (~500 ms per page) compared to the default turbo path.

Build docs developers (and LLMs) love