Skip to content

Commit c77d6ff

Browse files
kathaylToriLindsay
andauthored
Consolidate blurry screenshot FAQ into REST API docs (#26226)
* Consolidate blurry screenshot FAQ into REST API docs - Create partial for blurry screenshot resolution content - Add partial to screenshot endpoint and snapshot endpoint advanced usage sections - Remove blurry screenshot FAQ entry from main FAQ page * Update src/content/partials/browser-rendering/improve-blurry-screenshot-resolution.mdx Co-authored-by: ToriLindsay <tgalatro@cloudflare.com> --------- Co-authored-by: ToriLindsay <tgalatro@cloudflare.com>
1 parent 2d8ea5b commit c77d6ff

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

src/content/docs/browser-rendering/faq.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ There is no fixed limit on the number of requests per browser session. A single
5454

5555
This error typically occurs because your Puppeteer launch is not receiving the Browser binding. To resolve: Pass your Browser binding into `puppeteer.launch`.
5656

57-
### Why is my screenshot blurry?
58-
59-
It may be because you increased the height and width of the viewport. To fix this, increase the value of the `deviceScaleFactor` (default is 1).
60-
6157
### `Error processing the request: Unable to create new browser: code: 429: message: Browser time limit exceeded for today`
6258

6359
This error indicates you have hit the daily browser-instance limit on the Workers Free plan. [Free-plan accounts are capped at free plan limit is 10 minutes of browser use a day](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day.

src/content/docs/browser-rendering/rest-api/screenshot-endpoint.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
135135
--output "advanced-screenshot.png"
136136
```
137137

138+
<Render
139+
file="improve-blurry-screenshot-resolution"
140+
product="browser-rendering"
141+
/>
142+
138143
### Customize CSS and embed custom JavaScript
139144

140145
Instruct the browser to go to `https://example.com`, embed custom JavaScript (`addScriptTag`) and add extra styles (`addStyleTag`), both inline (`addStyleTag.content`) and by loading an external stylesheet (`addStyleTag.url`).

src/content/docs/browser-rendering/rest-api/snapshot.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
127127
}
128128
}
129129
```
130+
131+
<Render
132+
file="improve-blurry-screenshot-resolution"
133+
product="browser-rendering"
134+
/>
135+
130136
<Render
131137
file="setting-custom-user-agent"
132138
product="browser-rendering"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Improve blurry screenshot resolution
2+
3+
If you set a large viewport width and height, your screenshot may appear blurry or pixelated. This can happen if your browser's default `deviceScaleFactor` (which defaults to 1) is not high enough for the viewport.
4+
5+
To fix this, increase the value of the `deviceScaleFactor`.
6+
```json
7+
{
8+
"url": "https://cloudflare.com/",
9+
"viewport": {
10+
"width": 3600,
11+
"height": 2400,
12+
"deviceScaleFactor": 2
13+
}
14+
}
15+
```

0 commit comments

Comments
 (0)