# Export Web Page to PDF

***The following example is a request we've prebuilt to show you Gaffa's capabilities on our*** [***demo site.***](https://demo.gaffa.dev) ***You can run this request right now in the*** [***Gaffa API Playground***](https://gaffa.dev/dashboard/playground?templateId=html_to_pdf)***.***

Gaffa's print-to-PDF feature allows you to easily export web pages as PDF files. Unlike the standard "Print to PDF" in your local browser, Gaffa's feature waits for specific items to load, uses proxies, and scales with your product's growth. Enhance your customer experience and streamline your PDF export process

## API Request

The request below uses the [POST endpoint](https://gaffa.dev/docs/api-reference/post-v1-browser-requests) to open the demo site on the table page, wait for the table to load, and then print the webpage to a PDF in A4 size with a 20-point margin and in portrait orientation.

```json
{
  "url": "https://demo.gaffa.dev/simulate/table?loadTime=3&rowCount=20",
  "proxy_location": null,
  "async": false,
  "max_cache_age": 0,
  "settings": {
    "record_request": false,
    "actions": [
      {
        "type": "wait",
        "selector": "table"
      },
      {
        "type": "print",
        "size": "A4",
        "margin": 20,
        "orientation": "portrait"
      }
    ]
  }
}
```

## Actions

Read the full documentation for these actions here.

{% content-ref url="../actions/wait" %}
[wait](https://gaffa.dev/docs/features/browser-requests/actions/wait)
{% endcontent-ref %}

{% content-ref url="../actions/print" %}
[print](https://gaffa.dev/docs/features/browser-requests/actions/print)
{% endcontent-ref %}

## Response

Here's an example of the PDF returned by the request after the table has loaded.

{% file src="<https://2341007864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyUba6osOT5MkKiV0wmgr%2Fuploads%2F9Vxzfpgg99PQbfyHIt5G%2FGaffaPrintPdfExample.pdf?alt=media&token=2a12792b-7d65-4924-9d30-f02ac8010614>" %}
