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

# Downloads and PDFs

> Files sites send, pages saved as PDF, and reading PDFs in a tab.

## Downloads

Every file a site sends as a download lands in that browser's downloads: a link to a file, a form whose answer is a file, a file a page makes itself, or an address that is a file. The step that started the download says so in its result, with the file's name.

The agent has five tools for them:

* `list_downloads` lists the files with their `id` (`dl_…`), name, size, type, site, `started`, `finished` and state (`downloading`, `done`, `failed` or `canceled`).
* `wait_for_download` waits for a download to finish, up to 40 seconds a call.
* `read_download` reads a text file (plain text, CSV, JSON, XML and the like) up to 2 MB, or a PDF's text.
* `delete_download` deletes a file. It can't be brought back.
* `save_page_as_pdf` saves the page in a tab as a PDF, as printing to PDF would.

To put a downloaded file into a page's file input, the agent passes its name to `file_upload` in `downloads`, so the file's contents never pass through the agent.

You see the files in the browser's panel in the console, under **Downloads**, with **Save** (to your device) and **Delete**. The list and Save work while the browser sleeps. In the live view a notice says when a download starts and finishes.

Nothing the browser downloads is opened or run on the server. A site's suggested file name is cleaned before it is shown, and on disk the file is stored under its id.

### Limits

| | |
| - | - |
| One file | 500 MB |
| All of a browser's downloads | 1 GB |
| Kept for | 30 days, or until deleted |

Downloads count toward the browser's disk space, and they aren't part of the profile backups.

## Printing

The browser has no printer, so a page's **Print** button and `window.print()` do nothing by themselves. When a page asks to print, the agent's result says so and suggests `save_page_as_pdf`, and the person watching is offered **Save page as PDF**. Use it for receipts, tickets, invoices and confirmations.

`save_page_as_pdf` takes a file `name`, `landscape`, and `paper` (`letter` or `a4`) for pages that set no size. In the console, **Save as PDF** is at the foot of the browser panel's site block.

## Reading a PDF in a tab

When a tab shows a PDF, `get_page_text` returns the document's title and text, each page marked `[Page N]`. Pass `pages`, such as `"3"`, `"3-7"` or `"8-"`, to read part of it. `read_page` and `find` read the PDF's text too, and `computer` scrolls it.

The text comes from the copy of the file Chrome already has. If Chrome no longer has it, `refetch: true` downloads it again from the site with one GET and the tab's cookies. Don't use it for a PDF that answered a form or came from a one-time link.

A PDF is read up to 32 MB, 500 pages and 100,000 characters a call. Scanned pages with no text layer come back empty: take a `computer` screenshot instead.


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