Skip to content

Commit c152310

Browse files
committed
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
1 parent 81edf34 commit c152310

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
@@ -79,10 +79,6 @@ Keep in mind that `page.evaluate` can only return primitive types like strings,
7979

8080
:::
8181

82-
### Why is my screenshot blurry?
83-
84-
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).
85-
8682
### `Error processing the request: Unable to create new browser: code: 429: message: Browser time limit exceeded for today`
8783

8884
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, you may find that the resulting screenshot appears blurry or pixelated. This can happen because the browser's default `deviceScaleFactor` (which defaults to 1) is not high enough for the large 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)