Skip to content

Introduce PdfexportHook::htmlToPdf method#5491

Open
TheSyscall wants to merge 5 commits intomainfrom
pdf-hook
Open

Introduce PdfexportHook::htmlToPdf method#5491
TheSyscall wants to merge 5 commits intomainfrom
pdf-hook

Conversation

@TheSyscall
Copy link
Copy Markdown

This function was previously called without actually being part of the hook.
The only implementation of this hook comes from the pdfexport module which had this as an additional public method of the hook.

This function was previously called without actually being part of the
hook.
The only implementation of this hook comes from the pdfexport module
which always had this as an additional public method.
@TheSyscall TheSyscall requested a review from Al2Klimov April 8, 2026 08:51
@cla-bot cla-bot bot added the cla/signed label Apr 8, 2026
@TheSyscall TheSyscall self-assigned this Apr 8, 2026
TheSyscall added a commit to Icinga/icingaweb2-module-pdfexport that referenced this pull request Apr 8, 2026
@TheSyscall TheSyscall changed the title Introduce htmlToPdf method Introduce PdfexportHook::htmlToPdf method Apr 8, 2026
This helps to decouple reporting from pdfexport.
Sadly it doesn't remove the dependency entirely because of
PrintableHtmlDocument
Al2Klimov

This comment was marked as resolved.

}
$pdfexport = Hook::first('Pdfexport');
if (! $pdfexport->isSupported()) {
throw new RuntimeException('PDF exporter is not supported');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the second hook won't save you, even if it supports export? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants