From e2eda20543b423d5a0679e724ea8a3ded9726d76 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 5 Jan 2026 11:18:39 +0100 Subject: [PATCH] wip #7871 @1.5 --- src/Links/Link.php | 3 +++ src/Links/PDFFormPopupLink.php | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/Links/PDFFormPopupLink.php diff --git a/src/Links/Link.php b/src/Links/Link.php index 470cd9d..527fab1 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -75,6 +75,7 @@ class Link const PAGE_BACKGROUND_COLOR = 48; const FLUIDBOOK_TOOLBOX_ELEARNING_CONTENT = 49; const LAYER_MASK = 50; + const PDF_FORM = 51; protected static string|false|null $_linksKey = null; public $left; @@ -364,6 +365,8 @@ class Link return new PDFPopupLink($id, $init, $compiler); case static::PDF_INLINE: return new PDFInlineLink($id, $init, $compiler); + case static::PDF_FORM: + return new PDFFormPopupLink($id, $init, $compiler); case static::COPY_TO_CLIPBOARD: return new CopyToClipboardLink($id, $init, $compiler); case static::PAGE_BACKGROUND_COLOR: diff --git a/src/Links/PDFFormPopupLink.php b/src/Links/PDFFormPopupLink.php new file mode 100644 index 0000000..4eb342a --- /dev/null +++ b/src/Links/PDFFormPopupLink.php @@ -0,0 +1,23 @@ +compiler->addPDFJS(true); + $dim = PDFTools::getDimensions($this->compiler->getWorkingDir() . $this->to); + $this->compiler->config->set('pdfLinks.' . $this->uid, ['width' => $dim['size'][0], 'height' => $dim['size'][1], 'totalHeight' => $dim['totalHeight'], 'file' => $this->to, 'interface' => $this->pdfjs]); + $this->copyExternalFile($this->to); + return '#/pdfform/' . $this->uid; + } +} -- 2.39.5