mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
The wkhtmltopdf library does not work with the latest version of alpine. To workaround this, a known working image based on an older alpine image is pulled in and relevant libraries copied to the target image. The `snappy` package required a few updates to support this, including setting the wkhtmltopdf binary path explicitly and to enable access to local files (disabled by default).
57 lines
1.5 KiB
PHP
Executable File
57 lines
1.5 KiB
PHP
Executable File
<?php
|
|
|
|
$pdfPath = '/usr/bin/wkhtmltopdf';
|
|
$imagePath = '/usr/bin/wkhtmltoimage';
|
|
|
|
return [
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Snappy PDF / Image Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This option contains settings for PDF generation.
|
|
|
|
|
| Enabled:
|
|
|
|
|
| Whether to load PDF / Image generation.
|
|
|
|
|
| Binary:
|
|
|
|
|
| The file path of the wkhtmltopdf / wkhtmltoimage executable.
|
|
|
|
|
| Timout:
|
|
|
|
|
| The amount of time to wait (in seconds) before PDF / Image generation is stopped.
|
|
| Setting this to false disables the timeout (unlimited processing time).
|
|
|
|
|
| Options:
|
|
|
|
|
| The wkhtmltopdf command options. These are passed directly to wkhtmltopdf.
|
|
| See https://wkhtmltopdf.org/usage/wkhtmltopdf.txt for all options.
|
|
|
|
|
| Env:
|
|
|
|
|
| The environment variables to set while running the wkhtmltopdf process.
|
|
|
|
|
*/
|
|
|
|
'pdf' => [
|
|
'enabled' => true,
|
|
'binary' => $pdfPath,
|
|
'timeout' => false,
|
|
'options' => [
|
|
'enable-local-file-access' => true
|
|
],
|
|
'env' => [],
|
|
],
|
|
'image' => [
|
|
'enabled' => true,
|
|
'binary' => $imagePath,
|
|
'timeout' => false,
|
|
'options' => [
|
|
'enable-local-file-access' => true
|
|
],
|
|
'env' => [],
|
|
],
|
|
];
|