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 converts any document — a live URL, a local PDF, or an HTML file — into a set of
tiled JPEG images and a tiles.json manifest. These tiles are the input to every downstream
PixelRAG stage: visual search indexing, agent browsing via the pixelbrowse skill, or your own
image processing pipeline. It ships with pip install pixelrag and requires no extra setup on
Linux x64; on Windows and macOS it auto-detects your system Chrome installation.
Rendering web pages
Pointpixelshot at any URL and specify an output directory with --output (or -o):
tiles.json
manifest inside it:
--workers).
Reading URLs from a .txt file — create a plain-text file with one URL per line and pass it
as an argument:
# are treated as comments and ignored.
Rendering PDFs
pixelshot renders PDFs page-by-page using PyMuPDF. Install the PDF extra first:
./tiles/paper.png.tiles/. The default DPI of 200 produces
roughly 1650 × 2200 pixels for an A4 page — high enough for the embedding model to read fine print
while keeping file sizes reasonable.
Mixed inputs
URLs, PDFs, and local HTML files can be combined freely in a single command:pixelshot detects each input’s type from its prefix (http:///https://) or file extension
(.pdf, .html, .htm) and routes it to the appropriate backend automatically.
Key flags
| Flag | Default | Description |
|---|---|---|
--output / -o | ./tiles | Output directory for tile subdirectories |
--tile-height | 8192 | Maximum tile height in pixels |
--quality | 85 | JPEG compression quality (1–100) |
--viewport-width | 875 | Browser viewport width in pixels |
--workers | 4 | Number of parallel browser processes |
--wait-network-idle | off | Wait until network goes idle before capturing — useful for JS-heavy SPAs that fetch content after the page load event |
--backend | cdp | Browser backend: cdp (default) or playwright |
--cdp-url | — | Attach to an already-running Chrome DevTools endpoint instead of launching a throwaway browser |
--dpi | 200 | Rendering resolution for PDFs |
| Variable | Description |
|---|---|
CHROME_PATH | Path to a specific Chrome binary to use instead of the auto-detected one |
PIXELSHOT_CDP_URL | Default CDP endpoint — equivalent to passing --cdp-url on every invocation |
Python API
All three render functions are importable frompixelrag_render:
render_url(url, output_dir, backend="cdp", *, tile_height=8192, quality=85, viewport_width=875, workers=1, **kwargs)
Render a single URL to tiled JPEG images. Returns a list of Path objects pointing to the
created tile directories.
render_urls(urls, output_dir, backend="cdp", *, stems=None, tile_height=8192, quality=85, viewport_width=875, workers=4, **kwargs)
Render a batch of URLs in parallel. The optional stems list lets you assign custom directory
names (e.g. sequential integer IDs) instead of deriving them from the URLs.
render_pdf(path, output_dir, *, dpi=200, pages=None, quality=85, stem=None)
Render a PDF file. Pass a 1-based list of page numbers to pages to render a subset; None
renders all pages.
Chrome backends
cdp (default)
The fastest option. Uses a bundled turbo
headless_shell on Linux x64; on other
platforms it auto-detects your system Chrome or Chromium installation. Each render
runs in an isolated, throwaway profile — it works even while Chrome is already open.playwright
Full-featured Chromium managed by Playwright. Needed for sites that require a
Playwright-managed browser. Requires the additional extra:
headless_shell auto-installs on Linux x64
only. On all other platforms, pixelshot looks for Chrome or Chromium in the standard system
install locations and falls back to Playwright’s Chromium if neither is found.