Skip to content

Commit

Permalink
Add release 8.10.0 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenRenaux authored Oct 30, 2024
1 parent c967845 commit 0b9b868
Show file tree
Hide file tree
Showing 27 changed files with 463 additions and 86 deletions.
38 changes: 37 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ sensiolabs_gotenberg:
pdf_format: null # None
pdf_universal_access: null # false
metadata: null # None
download_from: null # None
url:
header:
template: null # None
Expand Down Expand Up @@ -100,6 +101,7 @@ sensiolabs_gotenberg:
pdf_format: null # None
pdf_universal_access: null # false
metadata: null # None
download_from: null # None
markdown:
header:
template: null # None
Expand Down Expand Up @@ -133,6 +135,7 @@ sensiolabs_gotenberg:
pdf_format: null # None
pdf_universal_access: null # false
metadata: null # None
download_from: null # None
office:
landscape: null # false
native_page_ranges: null # All pages
Expand All @@ -159,13 +162,17 @@ sensiolabs_gotenberg:
quality: null # 90
reduce_image_resolution: null # false
max_image_resolution: null # 300
password: null # None
download_from: null # None
merge:
pdf_format: null # None
pdf_universal_access: null # false
metadata: null # None
download_from: null # None
convert:
pdf_format: null # None
pdf_universal_access: null # false
download_from: null # None
screenshot:
html:
width: null # 800
Expand All @@ -184,6 +191,7 @@ sensiolabs_gotenberg:
fail_on_http_status_codes: null # [499-599]
fail_on_console_exceptions: null # false
skip_network_idle_event: null # false
download_from: null # None
url:
width: null # 800
height: null # 600
Expand All @@ -201,6 +209,7 @@ sensiolabs_gotenberg:
fail_on_http_status_codes: null # [499-599]
fail_on_console_exceptions: null # false
skip_network_idle_event: null # false
download_from: null # None
markdown:
width: null # 800
height: null # 600
Expand All @@ -218,6 +227,7 @@ sensiolabs_gotenberg:
fail_on_http_status_codes: null # [499-599]
fail_on_console_exceptions: null # false
skip_network_idle_event: null # false
download_from: null # None
```
> [!TIP]
Expand Down Expand Up @@ -298,4 +308,30 @@ sensiolabs_gotenberg:
Whenever a controller returns something other than a `Response` object, the [`kernel.view`](https://symfony.com/doc/current/reference/events.html#kernel-view) event is fired.
That listener listen to this event and detects if it is a `GotenbergFileResult` object. If so it automatically calls the `->stream()` method to convert it to a Response object.

Enabled byd efault but can be disabled via the `sensiolabs_gotenberg.controller_listener` configuration.
Enabled by default but can be disabled via the `sensiolabs_gotenberg.controller_listener` configuration.

## Download from

> [!WARNING]
> URL of the file. It MUST return a `Content-Disposition` header with a filename parameter.

To download files resource from URLs.

``` yaml
sensiolabs_gotenberg:
default_options:
pdf:
html:
download_from:
- url: 'http://example.com/url/to/file''
extraHttpHeaders:
- name: 'MyHeader'
value: 'MyValue'
- name: 'User-Agent'
value: 'MyValue'
```

> [!TIP]
> For more information go to [Gotenberg documentations](https://gotenberg.dev/docs/routes#download-from).

2 changes: 2 additions & 0 deletions docs/pdf/builders_api/HtmlPdfBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Resets the metadata.
* `addMetadata(string $key, string $value)`:
The metadata to write.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
5 changes: 5 additions & 0 deletions docs/pdf/builders_api/LibreOfficePdfBuilder.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# LibreOfficePdfBuilder

* `password(string $password)`:
Set the password for opening the source file.

* `landscape(bool $bool)`:
Sets the paper orientation to landscape.

Expand Down Expand Up @@ -82,6 +85,8 @@ Specify if the resolution of each image is reduced to the resolution specified b
* `maxImageResolution(Sensiolabs\GotenbergBundle\Enumeration\ImageResolutionDPI $resolution)`:
If the form field reduceImageResolution is set to true, tell if all images will be reduced to the given value in DPI. Possible values are: 75, 150, 300, 600 and 1200.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
2 changes: 2 additions & 0 deletions docs/pdf/builders_api/MarkdownPdfBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ Resets the metadata.
* `addMetadata(string $key, string $value)`:
The metadata to write.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
2 changes: 2 additions & 0 deletions docs/pdf/builders_api/UrlPdfBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ Resets the metadata.
* `addMetadata(string $key, string $value)`:
The metadata to write.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
50 changes: 48 additions & 2 deletions docs/pdf/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
### Additional content
[header and footer](#header-and-footer)
[headerFile and footerFile](#headerfile-and-footerfile)
[download from](#download-from)

### Style
[assets](../assets.md)
Expand All @@ -47,8 +48,8 @@
[skipNetworkIdleEvent](#skipNetworkIdleEvent)

### Formatting
[metadata](#metadata)
[addMetadata](#addMetadata)
[metadata](#metadata)
[addMetadata](#addMetadata)
[pdfFormat](#pdfFormat)
[pdfUniversalAccess](#pdfUniversalAccess)

Expand Down Expand Up @@ -526,6 +527,51 @@ class YourController
}
```

### download from

> [!WARNING]
> URL of the file. It MUST return a `Content-Disposition` header with a filename parameter.
To download files resource from URLs.

```php
namespace App\Controller;

use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;

class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg
->html()
->downloadFrom([
[
'url' => 'http://example.com/url/to/file',
'extraHttpHeaders' =>
[
'MyHeader' => 'MyValue',
],
],
[
'url' => 'http://example.com/url/to/file',
'extraHttpHeaders' =>
[
'MyHeaderOne' => 'MyValue',
'MyHeaderTwo' => 'MyValue',
],
],
])
->generate()
->stream()
;
}
}
```

> [!TIP]
> For more information go to [Gotenberg documentations](https://gotenberg.dev/docs/routes#download-from).
## Request

### waitDelay
Expand Down
61 changes: 57 additions & 4 deletions docs/pdf/office-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -771,19 +771,72 @@ class YourController
> [!TIP]
> For more information go to [Gotenberg documentations](https://gotenberg.dev/docs/routes#images-libreoffice).
### download from

> [!WARNING]
> URL of the file. It MUST return a `Content-Disposition` header with a filename parameter.
To download files resource from URLs.

```php
namespace App\Controller;

use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;

class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg
->office()
->downloadFrom([
[
'url' => 'http://url/to/file.com',
'extraHttpHeaders' =>
[
'MyHeader' => 'MyValue',
],
],
[
'url' => 'http://url/to/file.com',
'extraHttpHeaders' =>
[
'MyHeaderOne' => 'MyValue',
'MyHeaderTwo' => 'MyValue',
],
],
])
->generate()
->stream()
;
}
}
```

> [!TIP]
> For more information go to [Gotenberg documentations](https://gotenberg.dev/docs/routes#download-from).
## password

Default: `None`

Set the password for opening the source file.

```php
namespace App\Controller;

use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;





class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg->office()
->files('document.txt')
->password('My password')
->generate()
->stream()
;
}
}
```
2 changes: 2 additions & 0 deletions docs/screenshot/builders_api/HtmlScreenshotBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Adds additional files, like images, fonts, stylesheets, and so on (overrides any
* `addAsset(string $path)`:
Adds a file, like an image, font, stylesheet, and so on.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
2 changes: 2 additions & 0 deletions docs/screenshot/builders_api/MarkdownScreenshotBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Adds additional files, like images, fonts, stylesheets, and so on (overrides any
* `addAsset(string $path)`:
Adds a file, like an image, font, stylesheet, and so on.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
2 changes: 2 additions & 0 deletions docs/screenshot/builders_api/UrlScreenshotBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Adds additional files, like images, fonts, stylesheets, and so on (overrides any
* `addAsset(string $path)`:
Adds a file, like an image, font, stylesheet, and so on.

* `downloadFrom(array $downloadFrom)`:

* `fileName(string $fileName, string $headerDisposition)`:

* `processor(Sensiolabs\GotenbergBundle\Processor\ProcessorInterface $processor)`:
Expand Down
50 changes: 50 additions & 0 deletions docs/screenshot/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
[quality](#quality)
[omitBackground](#omitBackground)

### Additional content
[download from](#download-from)

### Style
[assets](../assets.md)
[addAsset](../assets.md)
Expand Down Expand Up @@ -182,6 +185,53 @@ class YourController
}
```

## Additional content

### download from

> [!WARNING]
> URL of the file. It MUST return a `Content-Disposition` header with a filename parameter.
To download files resource from URLs.

```php
namespace App\Controller;

use Sensiolabs\GotenbergBundle\GotenbergScreenshotInterface;

class YourController
{
public function yourControllerMethod(GotenbergScreenshotInterface $gotenberg): Response
{
return $gotenberg
->html()
->downloadFrom([
[
'url' => 'http://example.com/url/to/file',
'extraHttpHeaders' =>
[
'MyHeader' => 'MyValue',
],
],
[
'url' => 'http://example.com/url/to/file',
'extraHttpHeaders' =>
[
'MyHeaderOne' => 'MyValue',
'MyHeaderTwo' => 'MyValue',
],
],
])
->generate()
->stream()
;
}
}
```

> [!TIP]
> For more information go to [Gotenberg documentations](https://gotenberg.dev/docs/routes#download-from).
## Request

### optimizeForSpeed
Expand Down
Loading

0 comments on commit 0b9b868

Please sign in to comment.