Skip to content

Commit e9aff75

Browse files
kathaylnevikashah
authored andcommitted
Update pdf-generation.mdx (#24881)
add into pdf tutorial that they can also use the REST API
1 parent a8ea8f6 commit e9aff75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/content/docs/browser-rendering/how-to/pdf-generation.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ import { Aside, WranglerConfig, PackageManagers } from "~/components";
99

1010
As seen in [this Workers bindings guide](/browser-rendering/workers-bindings/screenshots/), Browser Rendering can be used to generate screenshots for any given URL. Alongside screenshots, you can also generate full PDF documents for a given webpage, and can also provide the webpage markup and style ourselves.
1111

12+
You can generate PDFs with Browser Rendering in two ways:
13+
14+
- **[REST API](/browser-rendering/rest-api/)**: Use the the [/pdf endpoint](/browser-rendering/rest-api/pdf-endpoint/). This is ideal if you don't need to customize rendering behavior.
15+
- **[Workers Bindings](/browser-rendering/workers-bindings/)**: Use [Puppeteer](/browser-rendering/platform/puppeteer/) or [Playwright](/browser-rendering/platform/playwright/) with Workers Bindings for additional control and customization.
16+
17+
Choose the method that best fits your use case.
18+
19+
The following example shows you how to generate a PDF using [Puppeteer](/browser-rendering/platform/puppeteer/).
20+
1221
## Prerequisites
1322

1423
1. Use the `create-cloudflare` CLI to generate a new Hello World Cloudflare Worker script:

0 commit comments

Comments
 (0)