Skip to content

Commit 8e0dd9f

Browse files
committed
docs: document deviceScaleFactor and IPv6 embedded-IPv4 filtering
Add the deviceScaleFactor screenshot form field and note that IsPublicIP unwraps IPv4-mapped, 6to4, and Teredo addresses.
1 parent 78675a9 commit 8e0dd9f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/convert-with-chromium/_shared/_rendering_behavior/_rendering_behavior_screenshot.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ import WaitFor from "./_wait_for.mdx";
2525
description:
2626
"Define whether to clip the screenshot according to the device dimensions.",
2727
},
28+
{
29+
name: "deviceScaleFactor",
30+
type: "number",
31+
defaultValue: "1",
32+
description:
33+
"The device scale ratio, controlling the screenshot pixel density. Set to '2' for retina-quality output.",
34+
},
2835
{
2936
name: "format",
3037
type: "enum",
@@ -71,6 +78,7 @@ ${props.curlOutput}
7178
**The viewport defines the image.** Unlike PDFs which paginate content, screenshots capture the browser's viewport exactly as rendered.
7279

7380
- **Resolution:** Ensure you set the `width` and `height` form fields to match your desired target device (e.g., `1920`x`1080` for desktop, `375`x`812` for mobile).
81+
- **Pixel density:** Raise `deviceScaleFactor` for high-DPI output. A value of `2` doubles the captured pixels, matching a retina display.
7482
- If your screenshot's content is repeated and clipped, consider setting the `skipNetworkIdleEvent` form field to false (see issue [#1065](https://github.com/gotenberg/gotenberg/issues/1065#issuecomment-2670882337)).
7583

7684
:::tip

docs/outbound-url-filtering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Each module exposes the same two boolean variables. All default to `false`.
5151
| `LIBREOFFICE_DENY_PRIVATE_IPS` | Rejects LibreOffice outbound fetches resolving to a non-public IP. |
5252
| `LIBREOFFICE_DENY_PUBLIC_IPS` | Rejects LibreOffice outbound fetches resolving to a public IP. |
5353

54-
Non-public means loopback, RFC1918, link-local, or IPv6 unique-local.
54+
Non-public means loopback, RFC1918, link-local, or IPv6 unique-local. The check also unwraps IPv6 forms that embed an IPv4 destination, IPv4-mapped (`::ffff:10.0.0.1`), IPv4-translated, 6to4 (`2002::/16`), and Teredo (`2001::/32`), and rejects them when the embedded IPv4 is non-public.
5555

5656
LibreOffice also exposes `LIBREOFFICE_ALLOW_LIST` and `LIBREOFFICE_DENY_LIST`, mirroring Chromium and webhook.
5757

0 commit comments

Comments
 (0)