---
title: Get PDF.
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Browser Rendering](https://developers.cloudflare.com/api/go/resources/browser_rendering)

[PDF](https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get PDF.

client.BrowserRendering.PDF.New(ctx, params) (\*Response, error)

POST/accounts/{account\_id}/browser-rendering/pdf

Fetches rendered PDF from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Browser Rendering Write`

##### ParametersExpand Collapse

<details>

<summary>

params PDFNewParams

</summary>

AccountID param.Field\[string]

Path param: Account ID.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20account_id">Link to this property</a>

URL param.Field\[string]

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20url">Link to this property</a>

<details>

<summary>

Browser param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20browser%20%3E%20(schema)">PDFNewParamsVariant0Browser</a>]Optional

Query param: Rendering backend. Set to <code>kitesurf</code> to use Kitesurf (beta).

</summary>

const PDFNewParamsVariant0BrowserKitesurf <a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20browser%20%3E%20(schema)">PDFNewParamsVariant0Browser</a> = "kitesurf"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20browser%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20browser">Link to this property</a>

CacheTTL param.Field\[float64]Optional

Query param: Cache TTL default is 5s. Set to 0 to disable.

maximum86400

minimum0

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cacheTTL">Link to this property</a>

ActionTimeout param.Field\[float64]Optional

Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.

maximum120000

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20actionTimeout">Link to this property</a>

<details>

<summary>

AddScriptTag param.Field\[\[]PDFNewParamsVariant0AddScriptTag]Optional

Body param: Adds a script element into the page with the desired URL or content.

</summary>

ID stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addScriptTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

Content stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addScriptTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20content">Link to this property</a>

Type stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addScriptTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20type">Link to this property</a>

URL stringOptional

formaturi

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addScriptTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addScriptTag">Link to this property</a>

<details>

<summary>

AddStyleTag param.Field\[\[]PDFNewParamsVariant0AddStyleTag]Optional

Body param: Adds a <code>&lt;link rel="stylesheet"&gt;</code> tag into the page with the desired URL or a <code>&lt;style type="text/css"&gt;</code> tag with the content.

</summary>

Content stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addStyleTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20content">Link to this property</a>

URL stringOptional

formaturi

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addStyleTag%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20addStyleTag">Link to this property</a>

AllowRequestPattern param.Field\[\[]string]Optional

Body param: Only allow requests that match the provided regex patterns, eg. ’/^.\*.(css)’. Reject rules are applied first.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowRequestPattern">Link to this property</a>

<details>

<summary>

AllowResourceTypes param.Field\[\[]PDFNewParamsVariant0AllowResourceType]Optional

Body param: Only allow requests that match the provided resource types, eg. ‘image’ or ‘script’. Reject rules are applied first.

</summary>

const PDFNewParamsVariant0AllowResourceTypeDocument PDFNewParamsVariant0AllowResourceType = "document"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeStylesheet PDFNewParamsVariant0AllowResourceType = "stylesheet"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeImage PDFNewParamsVariant0AllowResourceType = "image"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeMedia PDFNewParamsVariant0AllowResourceType = "media"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeFont PDFNewParamsVariant0AllowResourceType = "font"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeScript PDFNewParamsVariant0AllowResourceType = "script"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeTexttrack PDFNewParamsVariant0AllowResourceType = "texttrack"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeXHR PDFNewParamsVariant0AllowResourceType = "xhr"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%207">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeFetch PDFNewParamsVariant0AllowResourceType = "fetch"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%208">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypePrefetch PDFNewParamsVariant0AllowResourceType = "prefetch"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%209">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeEventsource PDFNewParamsVariant0AllowResourceType = "eventsource"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2010">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeWebsocket PDFNewParamsVariant0AllowResourceType = "websocket"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2011">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeManifest PDFNewParamsVariant0AllowResourceType = "manifest"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2012">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeSignedexchange PDFNewParamsVariant0AllowResourceType = "signedexchange"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2013">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypePing PDFNewParamsVariant0AllowResourceType = "ping"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2014">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeCspviolationreport PDFNewParamsVariant0AllowResourceType = "cspviolationreport"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2015">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypePreflight PDFNewParamsVariant0AllowResourceType = "preflight"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2016">Link to this property</a>

const PDFNewParamsVariant0AllowResourceTypeOther PDFNewParamsVariant0AllowResourceType = "other"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2017">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20allowResourceTypes">Link to this property</a>

<details>

<summary>

Authenticate param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20authenticate%20%3E%20(schema)">PDFNewParamsVariant0Authenticate</a>]Optional

Body param: Provide credentials for HTTP authentication.

</summary>

Password string

minLength1

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20authenticate%20%3E%20(schema)%20%3E%20(property)%20password">Link to this property</a>

Username string

minLength1

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20authenticate%20%3E%20(schema)%20%3E%20(property)%20username">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20authenticate">Link to this property</a>

BestAttempt param.Field\[bool]Optional

Body param: Attempt to proceed when ‘awaited’ events fail or timeout.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20bestAttempt">Link to this property</a>

<details>

<summary>

Cookies param.Field\[\[]PDFNewParamsVariant0Cookie]Optional

Body param: Check <a href="https://pptr.dev/api/puppeteer.page.setcookie">options</a>.

</summary>

Name string

Cookie name.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

Value string

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

Domain stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20domain">Link to this property</a>

Expires float64Optional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20expires">Link to this property</a>

HTTPOnly boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20httpOnly">Link to this property</a>

PartitionKey stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20partitionKey">Link to this property</a>

Path stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20path">Link to this property</a>

<details>

<summary>

Priority PDFNewParamsVariant0CookiesPriorityOptional

</summary>

One of the following:

const PDFNewParamsVariant0CookiesPriorityLow PDFNewParamsVariant0CookiesPriority = "Low"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20priority%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0CookiesPriorityMedium PDFNewParamsVariant0CookiesPriority = "Medium"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20priority%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0CookiesPriorityHigh PDFNewParamsVariant0CookiesPriority = "High"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20priority%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20priority">Link to this property</a>

SameParty boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sameParty">Link to this property</a>

<details>

<summary>

SameSite PDFNewParamsVariant0CookiesSameSiteOptional

</summary>

One of the following:

const PDFNewParamsVariant0CookiesSameSiteStrict PDFNewParamsVariant0CookiesSameSite = "Strict"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sameSite%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0CookiesSameSiteLax PDFNewParamsVariant0CookiesSameSite = "Lax"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sameSite%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0CookiesSameSiteNone PDFNewParamsVariant0CookiesSameSite = "None"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sameSite%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sameSite">Link to this property</a>

Secure boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20secure">Link to this property</a>

SourcePort float64Optional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sourcePort">Link to this property</a>

<details>

<summary>

SourceScheme PDFNewParamsVariant0CookiesSourceSchemeOptional

</summary>

One of the following:

const PDFNewParamsVariant0CookiesSourceSchemeUnset PDFNewParamsVariant0CookiesSourceScheme = "Unset"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sourceScheme%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0CookiesSourceSchemeNonSecure PDFNewParamsVariant0CookiesSourceScheme = "NonSecure"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sourceScheme%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0CookiesSourceSchemeSecure PDFNewParamsVariant0CookiesSourceScheme = "Secure"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sourceScheme%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20sourceScheme">Link to this property</a>

URL stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20cookies">Link to this property</a>

EmulateMediaType param.Field\[string]Optional

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20emulateMediaType">Link to this property</a>

<details>

<summary>

GotoOptions param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)">PDFNewParamsVariant0GotoOptions</a>]Optional

Body param: Check <a href="https://pptr.dev/api/puppeteer.gotooptions">options</a>.

</summary>

Referer stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20referer">Link to this property</a>

ReferrerPolicy stringOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20referrerPolicy">Link to this property</a>

Timeout float64Optional

maximum60000

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20timeout">Link to this property</a>

<details>

<summary>

WaitUntil PDFNewParamsVariant0GotoOptionsWaitUntilUnionOptional

</summary>

One of the following:

<details>

<summary>

PDFNewParamsVariant0GotoOptionsWaitUntilString

</summary>

One of the following:

const PDFNewParamsVariant0GotoOptionsWaitUntilStringLoad PDFNewParamsVariant0GotoOptionsWaitUntilString = "load"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%200%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilStringDomcontentloaded PDFNewParamsVariant0GotoOptionsWaitUntilString = "domcontentloaded"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%200%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilStringNetworkidle0 PDFNewParamsVariant0GotoOptionsWaitUntilString = "networkidle0"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%200%20%3E%20(member)%202">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilStringNetworkidle2 PDFNewParamsVariant0GotoOptionsWaitUntilString = "networkidle2"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%200%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

PDFNewParamsVariant0GotoOptionsWaitUntilArray

</summary>

One of the following:

const PDFNewParamsVariant0GotoOptionsWaitUntilArrayLoad PDFNewParamsVariant0GotoOptionsWaitUntilArray = "load"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%201%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilArrayDomcontentloaded PDFNewParamsVariant0GotoOptionsWaitUntilArray = "domcontentloaded"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%201%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilArrayNetworkidle0 PDFNewParamsVariant0GotoOptionsWaitUntilArray = "networkidle0"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%201%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const PDFNewParamsVariant0GotoOptionsWaitUntilArrayNetworkidle2 PDFNewParamsVariant0GotoOptionsWaitUntilArray = "networkidle2"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%201%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions%20%3E%20(schema)%20%3E%20(property)%20waitUntil">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20gotoOptions">Link to this property</a>

HTML param.Field\[string]Optional

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20html">Link to this property</a>

<details>

<summary>

PDFOptions param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)">PDFNewParamsVariant0PDFOptions</a>]Optional

Body param: Check <a href="https://pptr.dev/api/puppeteer.pdfoptions">options</a>.

</summary>

DisplayHeaderFooter boolOptional

Whether to show the header and footer.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20displayHeaderFooter">Link to this property</a>

FooterTemplate stringOptional

HTML template for the print footer.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20footerTemplate">Link to this property</a>

<details>

<summary>

Format PDFNewParamsVariant0PDFOptionsFormatOptional

Paper format. Takes priority over width and height if set.

</summary>

One of the following:

const PDFNewParamsVariant0PDFOptionsFormatLetter PDFNewParamsVariant0PDFOptionsFormat = "letter"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatLegal PDFNewParamsVariant0PDFOptionsFormat = "legal"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatTabloid PDFNewParamsVariant0PDFOptionsFormat = "tabloid"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%202">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatLedger PDFNewParamsVariant0PDFOptionsFormat = "ledger"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%203">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA0 PDFNewParamsVariant0PDFOptionsFormat = "a0"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%204">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA1 PDFNewParamsVariant0PDFOptionsFormat = "a1"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%205">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA2 PDFNewParamsVariant0PDFOptionsFormat = "a2"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%206">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA3 PDFNewParamsVariant0PDFOptionsFormat = "a3"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%207">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA4 PDFNewParamsVariant0PDFOptionsFormat = "a4"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%208">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA5 PDFNewParamsVariant0PDFOptionsFormat = "a5"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%209">Link to this property</a>

const PDFNewParamsVariant0PDFOptionsFormatA6 PDFNewParamsVariant0PDFOptionsFormat = "a6"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format%20%3E%20(member)%2010">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20format">Link to this property</a>

HeaderTemplate stringOptional

HTML template for the print header.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20headerTemplate">Link to this property</a>

<details>

<summary>

Height PDFNewParamsVariant0PDFOptionsHeightUnionOptional

Sets the height of paper. Can be a number or string with unit.

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20height%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20height%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20height">Link to this property</a>

Landscape boolOptional

Whether to print in landscape orientation.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20landscape">Link to this property</a>

<details>

<summary>

Margin PDFNewParamsVariant0PDFOptionsMarginOptional

Set the PDF margins. Useful when setting header and footer.

</summary>

<details>

<summary>

Bottom PDFNewParamsVariant0PDFOptionsMarginBottomUnionOptional

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20bottom%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20bottom%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20bottom">Link to this property</a>

<details>

<summary>

Left PDFNewParamsVariant0PDFOptionsMarginLeftUnionOptional

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20left%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20left%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20left">Link to this property</a>

<details>

<summary>

Right PDFNewParamsVariant0PDFOptionsMarginRightUnionOptional

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20right%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20right%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20right">Link to this property</a>

<details>

<summary>

Top PDFNewParamsVariant0PDFOptionsMarginTopUnionOptional

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20top%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20top%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin%20%3E%20(property)%20top">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20margin">Link to this property</a>

OmitBackground boolOptional

Hides default white background and allows generating pdfs with transparency.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20omitBackground">Link to this property</a>

Outline boolOptional

Generate document outline.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20outline">Link to this property</a>

PageRanges stringOptional

Paper ranges to print, e.g. ‘1-5, 8, 11-13’.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20pageRanges">Link to this property</a>

PreferCSSPageSize boolOptional

Give CSS @page size priority over other size declarations.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20preferCSSPageSize">Link to this property</a>

PrintBackground boolOptional

Set to true to print background graphics.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20printBackground">Link to this property</a>

Scale float64Optional

Scales the rendering of the web page. Amount must be between 0.1 and 2.

maximum2

minimum0.1

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20scale">Link to this property</a>

Tagged boolOptional

Generate tagged (accessible) PDF.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20tagged">Link to this property</a>

Timeout float64Optional

Timeout in milliseconds.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20timeout">Link to this property</a>

<details>

<summary>

Width PDFNewParamsVariant0PDFOptionsWidthUnionOptional

Sets the width of paper. Can be a number or string with unit.

</summary>

One of the following:

UnionString

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20width%20%3E%20(variant)%200">Link to this property</a>

UnionFloat

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20width%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions%20%3E%20(schema)%20%3E%20(property)%20width">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20pdfOptions">Link to this property</a>

RejectRequestPattern param.Field\[\[]string]Optional

Body param: Block undesired requests that match the provided regex patterns, eg. ’/^.\*.(css)’.

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectRequestPattern">Link to this property</a>

<details>

<summary>

RejectResourceTypes param.Field\[\[]PDFNewParamsVariant0RejectResourceType]Optional

Body param: Block undesired requests that match the provided resource types, eg. ‘image’ or ‘script’.

</summary>

const PDFNewParamsVariant0RejectResourceTypeDocument PDFNewParamsVariant0RejectResourceType = "document"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeStylesheet PDFNewParamsVariant0RejectResourceType = "stylesheet"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeImage PDFNewParamsVariant0RejectResourceType = "image"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeMedia PDFNewParamsVariant0RejectResourceType = "media"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeFont PDFNewParamsVariant0RejectResourceType = "font"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeScript PDFNewParamsVariant0RejectResourceType = "script"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeTexttrack PDFNewParamsVariant0RejectResourceType = "texttrack"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeXHR PDFNewParamsVariant0RejectResourceType = "xhr"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%207">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeFetch PDFNewParamsVariant0RejectResourceType = "fetch"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%208">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypePrefetch PDFNewParamsVariant0RejectResourceType = "prefetch"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%209">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeEventsource PDFNewParamsVariant0RejectResourceType = "eventsource"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2010">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeWebsocket PDFNewParamsVariant0RejectResourceType = "websocket"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2011">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeManifest PDFNewParamsVariant0RejectResourceType = "manifest"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2012">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeSignedexchange PDFNewParamsVariant0RejectResourceType = "signedexchange"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2013">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypePing PDFNewParamsVariant0RejectResourceType = "ping"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2014">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeCspviolationreport PDFNewParamsVariant0RejectResourceType = "cspviolationreport"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2015">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypePreflight PDFNewParamsVariant0RejectResourceType = "preflight"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2016">Link to this property</a>

const PDFNewParamsVariant0RejectResourceTypeOther PDFNewParamsVariant0RejectResourceType = "other"

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%2017">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20rejectResourceTypes">Link to this property</a>

SetExtraHTTPHeaders param.Field\[map\[string, string]]Optional

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20setExtraHTTPHeaders">Link to this property</a>

SetJavaScriptEnabled param.Field\[bool]Optional

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20setJavaScriptEnabled">Link to this property</a>

UserAgent param.Field\[string]Optional

Body param

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20userAgent">Link to this property</a>

<details>

<summary>

Viewport param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)">PDFNewParamsVariant0Viewport</a>]Optional

Body param: Check <a href="https://pptr.dev/api/puppeteer.page.setviewport">options</a>.

</summary>

Height float64

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20height">Link to this property</a>

Width float64

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20width">Link to this property</a>

DeviceScaleFactor float64Optional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20deviceScaleFactor">Link to this property</a>

HasTouch boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20hasTouch">Link to this property</a>

IsLandscape boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20isLandscape">Link to this property</a>

IsMobile boolOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport%20%3E%20(schema)%20%3E%20(property)%20isMobile">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20viewport">Link to this property</a>

<details>

<summary>

WaitForSelector param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/browser_rendering/subresources/pdf/methods/create#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector%20%3E%20(schema)">PDFNewParamsVariant0WaitForSelector</a>]Optional

Body param: Wait for the selector to appear in page. Check <a href="https://pptr.dev/api/puppeteer.page.waitforselector">options</a>.

</summary>

Selector string

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector%20%3E%20(schema)%20%3E%20(property)%20selector">Link to this property</a>

Hidden PDFNewParamsVariant0WaitForSelectorHiddenOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector%20%3E%20(schema)%20%3E%20(property)%20hidden">Link to this property</a>

Timeout float64Optional

maximum120000

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector%20%3E%20(schema)%20%3E%20(property)%20timeout">Link to this property</a>

Visible PDFNewParamsVariant0WaitForSelectorVisibleOptional

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector%20%3E%20(schema)%20%3E%20(property)%20visible">Link to this property</a>

</details>

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForSelector">Link to this property</a>

WaitForTimeout param.Field\[float64]Optional

Body param: Waits for a specified timeout before continuing.

maximum120000

<a href="#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20waitForTimeout">Link to this property</a>

</details>

[Link to this property](<#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(params)%200>)

##### ReturnsExpand Collapse

type PDFNewResponse interface{…}

[Link to this property](<#(resource)%20browser_rendering.pdf%20%3E%20(method)%20create%20%3E%20(network%20schema)>)

### Get PDF.

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/browser_rendering"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  pdf, err := client.BrowserRendering.PDF.New(context.TODO(), browser_rendering.PDFNewParams{
    AccountID: cloudflare.F("account_id"),
    Body: browser_rendering.PDFNewParamsBodyObject{
      URL: cloudflare.F("https://www.example.com/"),
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", pdf)
}
```

429 example

```
{
  "errors": [
    {
      "code": 2001,
      "message": "Rate limit exceeded"
    }
  ],
  "success": false
}
```

##### Returns Examples

429 example

```
{
  "errors": [
    {
      "code": 2001,
      "message": "Rate limit exceeded"
    }
  ],
  "success": false
}
```