Open
Conversation
ReactPHP event loop, promise and child process have been removed and replaced with native PHP io stream functions
This allows us to set headers and footers
This fixes an issue where the webdriver server is never closed because PDF merging causes OOM.
Relicense this module to `GPL-3.0-only`. Add `GPL-3.0-or-later` SPDX license headers to source files, allowing relicensing under future GPL versions. This ensures compatibility with third-party dependencies (e.g. `Apache-2.0`) incompatible with `GPL-2.0-only`.
This reverts commit 80f967c.
Al2Klimov
requested changes
Mar 19, 2026
Member
Al2Klimov
left a comment
There was a problem hiding this comment.
Do either of the following:
- update doc/
- write a comment under this PR as a quick doc/ substitute, given your changes
I have no plan of all this, so I must set this up from scratch to review.
Author
|
If you use docker you can just use the two services provided in the PR description. To test the legacy chrome backend, just follow the existing documentation. The PdfExport module allows you to create PDFs of any page in IW2, it is also used to create reports with a custom cover page in the reporting module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Removed ReactPHP dependency
The module no longer relies on ReactPHP, as such it no longer provides the asynchronous methods to generate PDFs that were never part of the Hook
Introduced backend abstraction
A new backend concept allows different rendering strategies to be plugged in and extended more easily.
Added WebDriver support
Implemented a WebDriver-based backend with support for Chrome and Firefox.
Automatic backend fallback
If a backend fails or is unavailable, the system now automatically falls back to the next available option. (The order of this is currently hardcoded as Webdriver > Remote Chrome > Local Chrome)
New configuration form
Replaced the existing configuration with a new
ipl\Web\Compat\Form-based ConfigForm.requires Icinga/ipl-web#358
WebDriver
This module can be configured to connect to a webdriver instance. (Backend)
When a PDF is requested, via the Print PDF button on any site or the one in the reporting module, it sends commands to the WebDriver server in a standardized format.
Each browser has its own driver (like ChromeDriver for Chrome or GeckoDriver for Firefox).
This driver acts as a bridge between your script and the browser.
Browser
The driver sends commands to the browser, which executes them just like a user interaction.
For this to work we require a working chromedriver or geckodriver (firefox) instance.
Adding this this to a docker compose file will spin up one for each of the supported webdrivers.
Currently supported features:
Known issues