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

# Screenshots

> UrlScreenshot, HtmlScreenshot, and MarkdownScreenshot — capture full-page images.

Each screenshot class is instantiated with `new` and exposes `capture(options)` → `Promise<Buffer>` (image bytes).

## UrlScreenshot

```typescript theme={null}
import { UrlScreenshot } from "chromiumly";

const screenshot = new UrlScreenshot();
const buffer = await screenshot.capture({
  url: string;  // required
  // + ScreenshotOptions (properties, wait*, extraHttpHeaders, etc.)
});
```

## HtmlScreenshot

```typescript theme={null}
import { HtmlScreenshot } from "chromiumly";

const screenshot = new HtmlScreenshot();
const buffer = await screenshot.capture({
  html: PathLikeOrReadStream;  // required
  assets?: { file: PathLikeOrReadStream; name: string }[];
  // + ScreenshotOptions
});
```

## MarkdownScreenshot

```typescript theme={null}
import { MarkdownScreenshot } from "chromiumly";

const screenshot = new MarkdownScreenshot();
const buffer = await screenshot.capture({
  html: PathLikeOrReadStream;     // required
  markdown: PathLikeOrReadStream | { file: PathLikeOrReadStream; name: string }[]; // required; array = multiple distinctly-named files
  assets?: { file: PathLikeOrReadStream; name: string }[];
  // + other ScreenshotOptions
});
```

## Screenshot options

* **properties** — `ImageProperties`: `format` (`"png"` | `"jpeg"` | `"webp"`), `quality` (0–100, JPEG), `omitBackground`, `width`, `height`, `clip`, `deviceScaleFactor`
* **userAgent** — override the `User-Agent` header sent by Chromium
* **waitDelay**, **waitForSelector**, **waitForExpression**
* **extraHttpHeaders**, **failOnHttpStatusCodes**, **failOnConsoleExceptions**, **failOnResourceHttpStatusCodes**, **ignoreResourceHttpStatusDomains**, **failOnResourceLoadingFailed**, **skipNetworkIdleEvent**, **skipNetworkAlmostIdleEvent**
* **optimizeForSpeed** — favor encoding speed over output size
* **cookies**, **downloadFrom**, **webhook**, **outputFilename**, **trace**

> [!NOTE]
>
> Screenshots produce an image rather than a PDF, so PDF-only options —
> `header`/`footer`, `generateDocumentOutline`, `userPassword`/`ownerPassword`,
> `embeds`/`embedsMetadata`, `facturx`, permissions, `split`, `flatten` —
> don't apply here, unlike Chromium converters.

See [Types](https://docs.chromiumly.dev/v6/reference/types.md) for `ImageProperties` and related types.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.