Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gotenberg 8.7.0 #19

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions docs/routes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,12 @@ curl \

### Custom HTTP Headers {#custom-http-headers-chromium}

Each route accepts the following form field:
Each route accepts the following form fields:

| Key | Description | Default |
|------------------|---------------------------------------------------------------------------------|---------|
| extraHttpHeaders | HTTP headers to send by Chromium while loading the HTML document (JSON format). | None |
| Key | Description | Default |
|------------------|---------------------------------------------------------------------------------------|---------|
| userAgent | Override the default *User-Agent* HTTP header. | None |
| extraHttpHeaders | Extra HTTP headers to send by Chromium while loading the HTML document (JSON format). | None |

<Tabs
defaultValue="curl"
Expand All @@ -693,10 +694,11 @@ values={[
}>
<TabItem value="curl">

```bash {4}
```bash {4-5}
curl \
--request POST http://localhost:3000/forms/chromium/convert/url \
--form url=https://my.url \
--form 'userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)"' \
--form 'extraHttpHeaders={"X-Header":"value"}' \
-o my.pdf
```
Expand All @@ -712,7 +714,7 @@ Each route accepts the following form field:
|-----------------------|------------------------------------------------------------------------------------------------|-------------|
| failOnHttpStatusCodes | Return a *409 Conflict* response if the HTTP status code from the main page is not acceptable. | \[499,599\] |

A `X99` entry means every HTTP status codes between `X00` and `X99` (e.g., 499 means every HTTP status codes between 400 and 499).
A *X99* entry means every HTTP status codes between *X00* and *X99* (e.g., 499 means every HTTP status codes between 400 and 499).

<Tabs
defaultValue="curl"
Expand Down Expand Up @@ -1258,6 +1260,36 @@ curl \
</TabItem>
</Tabs>


### Images {#images-libreoffice}

The route accepts the following form fields:

| Key | Description | Default |
|--------------------------|-------------------------------------------------------------------------------------------|---------|
| losslessImageCompression | Allow turning lossless compression on or off to tweak image conversion performance. | false |
| reduceImageResolution | Allow turning on or off image resolution reduction to tweak image conversion performance. | true |

<Tabs
defaultValue="curl"
values={[
{ label: 'cURL', value: 'curl', },
]
}>
<TabItem value="curl">

```bash {4-5}
curl \
--request POST http://localhost:3000/forms/libreoffice/convert \
--form files=@/path/to/file.docx \
--form losslessImageCompression=true \
--form reduceImageResolution=false \
-o my.pdf
```

</TabItem>
</Tabs>

### Merge {#merge-libreoffice}

The route also accepts the following form fields:
Expand Down Expand Up @@ -1898,7 +1930,7 @@ Content-Type: text/plain; charset=UTF-8
Gotenberg-Trace: {trace}
Body:

8.6.0
8.7.0
```

</TabItem>
Expand All @@ -1908,7 +1940,7 @@ Body:

Custom variants of Gotenberg may not print a strict semver version.

For instance, the live demo prints `8.6.0-live-demo-snapshot`.
For instance, the live demo prints `8.7.0-live-demo-snapshot`.

:::

Expand Down