> ## 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.

# URL conversion and screenshots

> Convert a URL to PDF or capture a full-page screenshot with UrlConverter and UrlScreenshot.

## Convert URL to PDF

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

const urlConverter = new UrlConverter();
const buffer = await urlConverter.convert({
  url: "https://www.example.com/",
});
```

The returned `buffer` contains the PDF bytes (a `Buffer` in Node, or the runtime’s equivalent). The URL route supports SPAs and dynamic content: Chromium loads the page, runs JavaScript, and conversion runs after the page loads (and after any [wait conditions](/chromium/options#rendering-and-wait) you set). Optional [conversion options](/chromium/options) (e.g. `properties`, `header`, `footer`, `waitForSelector`) can be passed as additional keys in the same object.

## Capture URL as screenshot

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

const screenshot = new UrlScreenshot();
const buffer = await screenshot.capture({
  url: "https://www.example.com/",
});
```

The returned `buffer` contains the image (default format is PNG). Use the `properties` option to set `format` (`"png"` | `"jpeg"` | `"webp"`), `quality` (for JPEG), and dimensions. See [Options](/chromium/options) for full screenshot options.
