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

# browser_pdf

> Print the page to a PDF file (like Print → Save as PDF).

Print the page to a PDF file (like Print → Save as PDF). Returns the file path.

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="path" type="string">
  Write here instead of the artifacts directory
</ParamField>

<ParamField body="landscape" type="boolean">
   
</ParamField>

<ParamField body="format" type="enum">
  One of: `A4`, `Letter`, `Legal`.
</ParamField>

<ParamField body="printBackground" type="boolean">
   
</ParamField>

<ParamField body="scale" type="number">
   
</ParamField>

## Example

```json theme={null}
{
  "tabId": 1234,
  "format": "A4",
  "printBackground": true
}
```
