From: Vincent Vanwaelscappel Date: Wed, 28 Jan 2026 16:43:01 +0000 (+0100) Subject: wip #7950 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a726057340c81f89f109e25172d7251dfdc42785;p=fluidbook_tools.git wip #7950 @0.5 --- diff --git a/src/Compiler/Compiler.php b/src/Compiler/Compiler.php index e02bba0..7c89c95 100644 --- a/src/Compiler/Compiler.php +++ b/src/Compiler/Compiler.php @@ -428,4 +428,9 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface { { return $url; } + + public function addSearchWord($to, $page, $array) + { + // TODO: Implement addSearchWord() method. + } } diff --git a/src/Compiler/CompilerInterface.php b/src/Compiler/CompilerInterface.php index ef129ff..8aac38a 100644 --- a/src/Compiler/CompilerInterface.php +++ b/src/Compiler/CompilerInterface.php @@ -86,4 +86,6 @@ interface CompilerInterface public function getLinkAlternativeText($link); public function shortenURL($url); + + public function addSearchWord($to,$page, $array); } diff --git a/src/Compiler/DummyCompiler.php b/src/Compiler/DummyCompiler.php index 41d5f5c..5e48271 100644 --- a/src/Compiler/DummyCompiler.php +++ b/src/Compiler/DummyCompiler.php @@ -216,4 +216,9 @@ class DummyCompiler implements CompilerInterface { return $url; } + + public function addSearchWord($to, $page, $array) + { + // TODO: Implement addSearchWord() method. + } } diff --git a/src/Links/Link.php b/src/Links/Link.php index 94f5bd4..4b336ca 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -77,6 +77,7 @@ class Link const LAYER_MASK = 50; const PDF_FORM = 51; const ALT_TEXT_IMAGE = 52; + const SEARCH_WORD = 53; protected static string|false|null $_linksKey = null; public $left; @@ -151,6 +152,7 @@ class Link public $name = ''; public $alt = ''; public $pdfjs = ''; + public $alternative; protected $_ocr = false; @@ -387,6 +389,8 @@ class Link break; case static::ALT_TEXT_IMAGE: return new AltTextImageLink($id, $init, $compiler); + case static::SEARCH_WORD: + $compiler->addSearchWord($init['to'], $init['page'], ['x' => $init['left'], 'y' => $init['top'], 'width' => $init['width'], 'height' => $init['height']]); default: return null; } diff --git a/src/Links/SearchWordLink.php b/src/Links/SearchWordLink.php new file mode 100644 index 0000000..34dfdb7 --- /dev/null +++ b/src/Links/SearchWordLink.php @@ -0,0 +1,20 @@ +