> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Open PDFs inline in the browser

Use a new query parameter to determine whether generated URLs for PDFs should download the file as an attachment saved locally, or open it inline in the browser.

---

## What's new?

We added a new `disposition` query parameter that you can use when working with [get a PDF invoice for a transaction operation](https://developer.paddle.com/api-reference/transactions/get-invoice-pdf.md) to determine how the generated URL should open.

{% api-endpoint method="GET" path="/transactions/{transaction_id}/invoice?disposition=attachment"  %}

- **disposition** (string): Determine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser
{% /api-endpoint %}

## How it works

You can generate a link to an invoice PDF for a transaction using the [get a PDF invoice for a transaction operation](https://developer.paddle.com/api-reference/transactions/get-invoice-pdf.md).

HTTP responses include a [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) header indicating whether the content is intended for display inline in the browser or downloaded as an attachment.

Previously, the `Content-Disposition` for links to PDFs generated by the API was `attachment`. This means that the generated link typically downloaded and saved the PDF locally.

Use the new `disposition` query parameter to set the `Content-Disposition` is for the generated link. As well as `attachment`, you can pass `inline` to instruct browsers to open the PDF inline in the browser. Typically, this means browsers open the PDF in the current tab.

## Next steps

This change is available in version `1` of the Paddle API.

It's a non-breaking change, meaning it doesn't impact existing integrations.

You can [get a PDF invoice for a transaction](https://developer.paddle.com/api-reference/transactions/get-invoice-pdf.md) using the API to start using the new query parameter.
## Summary of changes

| Name | Type | Change | Entity | Description |
| --- | --- | --- | --- | --- |
| `disposition` | Field | added | Get a PDF invoice for a transaction | Set to attachment or inline to control how the PDF is served. |
