Closed laurentmuller closed 1 year ago
When output the qr-code within the PdfWriter, it will be nice to add a link to the generated image.
PdfWriter
Based on the official documentation, a method exist to set a link:
Link(float x, float y, float w, float h, mixed link)
I propose to add a new option to the writer:
public const WRITER_OPTION_LINK = 'link';
This option can be a URL or identifier returned by AddLink().
AddLink()
It's just a matter of calling 2 functions:
public function write(...): ResultInterface { ... if (isset($options[self::WRITER_OPTION_LINK])) { $link = $options[self::WRITER_OPTION_LINK]; $fpdf->Link($x, $y, $x + $matrix->getOuterSize(), $y + $matrix->getOuterSize(), $link); } ... }
When output the qr-code within the
PdfWriter
, it will be nice to add a link to the generated image.Based on the official documentation, a method exist to set a link:
I propose to add a new option to the writer:
This option can be a URL or identifier returned by
AddLink()
.It's just a matter of calling 2 functions: