update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
4
vendor/setasign/fpdi/composer.json
vendored
4
vendor/setasign/fpdi/composer.json
vendored
@@ -15,7 +15,7 @@
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"php": ">=7.2 <=8.5.99999",
|
||||
"ext-zlib": "*"
|
||||
},
|
||||
"conflict": {
|
||||
@@ -37,7 +37,7 @@
|
||||
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7",
|
||||
"phpunit/phpunit": "^8.5.52",
|
||||
"setasign/fpdf": "~1.8.6",
|
||||
"tecnickcom/tcpdf": "^6.8",
|
||||
"setasign/tfpdf": "~1.33",
|
||||
|
||||
2
vendor/setasign/fpdi/src/FpdfTpl.php
vendored
2
vendor/setasign/fpdi/src/FpdfTpl.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
4
vendor/setasign/fpdi/src/FpdfTplTrait.php
vendored
4
vendor/setasign/fpdi/src/FpdfTplTrait.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -302,7 +302,7 @@ public function endTemplate()
|
||||
|
||||
$fontKey = $this->FontFamily . $this->FontStyle;
|
||||
if ($fontKey) {
|
||||
$this->CurrentFont =& $this->fonts[$fontKey];
|
||||
$this->CurrentFont = $this->fonts[$fontKey];
|
||||
} else {
|
||||
unset($this->CurrentFont);
|
||||
}
|
||||
|
||||
8
vendor/setasign/fpdi/src/FpdfTrait.php
vendored
8
vendor/setasign/fpdi/src/FpdfTrait.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -137,7 +137,7 @@ protected function _putlinks($n)
|
||||
{
|
||||
foreach ($this->PageLinks[$n] as $pl) {
|
||||
$this->_newobj();
|
||||
$rect = sprintf('%.2F %.2F %.2F %.2F', $pl[0], $pl[1], $pl[0] + $pl[2], $pl[1] - $pl[3]);
|
||||
$rect = \sprintf('%.2F %.2F %.2F %.2F', $pl[0], $pl[1], $pl[0] + $pl[2], $pl[1] - $pl[3]);
|
||||
$this->_put('<</Type /Annot /Subtype /Link /Rect [' . $rect . ']', false);
|
||||
if (is_string($pl[4])) {
|
||||
if (isset($pl['importedLink'])) {
|
||||
@@ -152,7 +152,7 @@ protected function _putlinks($n)
|
||||
if (isset($pl['quadPoints'])) {
|
||||
$s = '/QuadPoints[';
|
||||
foreach ($pl['quadPoints'] as $value) {
|
||||
$s .= sprintf('%.2F ', $value);
|
||||
$s .= \sprintf('%.2F ', $value);
|
||||
}
|
||||
$s .= ']';
|
||||
$this->_put($s);
|
||||
@@ -172,7 +172,7 @@ protected function _putlinks($n)
|
||||
? $this->DefPageSize[1] * $this->k
|
||||
: $this->DefPageSize[0] * $this->k;
|
||||
}
|
||||
$this->_put(sprintf(
|
||||
$this->_put(\sprintf(
|
||||
'/Dest [%d 0 R /XYZ 0 %.2F null]>>',
|
||||
$this->PageInfo[$l[0]]['n'],
|
||||
$h - $l[1] * $this->k
|
||||
|
||||
4
vendor/setasign/fpdi/src/Fpdi.php
vendored
4
vendor/setasign/fpdi/src/Fpdi.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -30,5 +30,5 @@ class Fpdi extends FpdfTpl
|
||||
*
|
||||
* @string
|
||||
*/
|
||||
const VERSION = '2.6.4';
|
||||
const VERSION = '2.6.6';
|
||||
}
|
||||
|
||||
2
vendor/setasign/fpdi/src/FpdiException.php
vendored
2
vendor/setasign/fpdi/src/FpdiException.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
35
vendor/setasign/fpdi/src/FpdiTrait.php
vendored
35
vendor/setasign/fpdi/src/FpdiTrait.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -127,8 +127,11 @@ protected function setMinPdfVersion($pdfVersion)
|
||||
* @param array $parserParams Individual parameters passed to the parser instance.
|
||||
* @return PdfParser|FpdiPdfParser
|
||||
*/
|
||||
protected function getPdfParserInstance(StreamReader $streamReader, array $parserParams = [])
|
||||
{
|
||||
protected function getPdfParserInstance(
|
||||
StreamReader $streamReader,
|
||||
#[\SensitiveParameter]
|
||||
array $parserParams = []
|
||||
) {
|
||||
// note: if you get an exception here - turn off errors/warnings on not found classes for your autoloader.
|
||||
// psr-4 (https://www.php-fig.org/psr/psr-4/) says: Autoloader implementations MUST NOT throw
|
||||
// exceptions, MUST NOT raise errors of any level, and SHOULD NOT return a value.
|
||||
@@ -149,8 +152,11 @@ protected function getPdfParserInstance(StreamReader $streamReader, array $parse
|
||||
* @param array $parserParams Individual parameters passed to the parser instance.
|
||||
* @return string
|
||||
*/
|
||||
protected function getPdfReaderId($file, array $parserParams = [])
|
||||
{
|
||||
protected function getPdfReaderId(
|
||||
$file,
|
||||
#[\SensitiveParameter]
|
||||
array $parserParams = []
|
||||
) {
|
||||
if (\is_resource($file)) {
|
||||
$id = (string) $file;
|
||||
} elseif (\is_string($file)) {
|
||||
@@ -166,7 +172,8 @@ protected function getPdfReaderId($file, array $parserParams = [])
|
||||
);
|
||||
}
|
||||
|
||||
/** @noinspection OffsetOperationsInspection */
|
||||
$id = \md5($id . '|' . \print_r($parserParams, true));
|
||||
|
||||
if (isset($this->readers[$id])) {
|
||||
return $id;
|
||||
}
|
||||
@@ -181,7 +188,6 @@ protected function getPdfReaderId($file, array $parserParams = [])
|
||||
}
|
||||
|
||||
$reader = new PdfReader($this->getPdfParserInstance($streamReader, $parserParams));
|
||||
/** @noinspection OffsetOperationsInspection */
|
||||
$this->readers[$id] = $reader;
|
||||
|
||||
return $id;
|
||||
@@ -228,8 +234,11 @@ public function setSourceFile($file)
|
||||
* @throws PdfParserException
|
||||
* @throws PdfTypeException
|
||||
*/
|
||||
public function setSourceFileWithParserParams($file, array $parserParams = [])
|
||||
{
|
||||
public function setSourceFileWithParserParams(
|
||||
$file,
|
||||
#[\SensitiveParameter]
|
||||
array $parserParams = []
|
||||
) {
|
||||
$this->currentReaderId = $this->getPdfReaderId($file, $parserParams);
|
||||
$this->objectsToCopy[$this->currentReaderId] = [];
|
||||
|
||||
@@ -313,7 +322,7 @@ public function importPage(
|
||||
$dict->value['Resources'] = $resources;
|
||||
}
|
||||
|
||||
list($width, $height) = $page->getWidthAndHeight($box);
|
||||
[$width, $height] = $page->getWidthAndHeight($box);
|
||||
|
||||
$a = 1;
|
||||
$b = 0;
|
||||
@@ -522,11 +531,11 @@ public function useImportedPage($pageId, $x = 0, $y = 0, $width = null, $height
|
||||
protected function adjustLastLink($externalLink, $xPt, $scaleX, $yPt, $newHeightPt, $scaleY, $importedPage)
|
||||
{
|
||||
// let's create a relation of the newly created link to the data of the external link
|
||||
$lastLink = count($this->PageLinks[$this->page]);
|
||||
$lastLink = \count($this->PageLinks[$this->page]);
|
||||
$this->PageLinks[$this->page][$lastLink - 1]['importedLink'] = $externalLink;
|
||||
if (count($externalLink['quadPoints']) > 0) {
|
||||
if (\count($externalLink['quadPoints']) > 0) {
|
||||
$quadPoints = [];
|
||||
for ($i = 0, $n = count($externalLink['quadPoints']); $i < $n; $i += 2) {
|
||||
for ($i = 0, $n = \count($externalLink['quadPoints']); $i < $n; $i += 2) {
|
||||
$quadPoints[] = $xPt + $externalLink['quadPoints'][$i] * $scaleX;
|
||||
$quadPoints[] = $this->hPt - $yPt - $newHeightPt + $externalLink['quadPoints'][$i + 1] * $scaleY;
|
||||
}
|
||||
|
||||
10
vendor/setasign/fpdi/src/GraphicsState.php
vendored
10
vendor/setasign/fpdi/src/GraphicsState.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -53,13 +53,13 @@ public function add(Matrix $matrix)
|
||||
*/
|
||||
public function rotate($x, $y, $angle)
|
||||
{
|
||||
if (abs($angle) < 1e-5) {
|
||||
if (\abs($angle) < 1e-5) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$angle = deg2rad($angle);
|
||||
$c = cos($angle);
|
||||
$s = sin($angle);
|
||||
$angle = \deg2rad($angle);
|
||||
$c = \cos($angle);
|
||||
$s = \sin($angle);
|
||||
|
||||
$this->add(new Matrix($c, $s, -$s, $c, $x, $y));
|
||||
|
||||
|
||||
2
vendor/setasign/fpdi/src/Math/Matrix.php
vendored
2
vendor/setasign/fpdi/src/Math/Matrix.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
4
vendor/setasign/fpdi/src/Math/Vector.php
vendored
4
vendor/setasign/fpdi/src/Math/Vector.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,7 @@ public function getY()
|
||||
*/
|
||||
public function multiplyWithMatrix(Matrix $matrix)
|
||||
{
|
||||
list($a, $b, $c, $d, $e, $f) = $matrix->getValues();
|
||||
[$a, $b, $c, $d, $e, $f] = $matrix->getValues();
|
||||
$x = $a * $this->x + $c * $this->y + $e;
|
||||
$y = $b * $this->x + $d * $this->y + $f;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -56,6 +56,9 @@ class CrossReference
|
||||
*/
|
||||
public function __construct(PdfParser $parser, $fileHeaderOffset = 0)
|
||||
{
|
||||
// clear the token stack, if the parser instance is re-used
|
||||
$parser->getTokenizer()->clearStack();
|
||||
|
||||
$this->parser = $parser;
|
||||
$this->fileHeaderOffset = $fileHeaderOffset;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ public function getSubSections()
|
||||
*/
|
||||
public function getOffsetFor($objectNumber)
|
||||
{
|
||||
foreach ($this->subSections as $offset => list($startObject, $objectCount)) {
|
||||
foreach ($this->subSections as $offset => [$startObject, $objectCount]) {
|
||||
/**
|
||||
* @var int $startObject
|
||||
* @var int $objectCount
|
||||
@@ -189,7 +189,7 @@ public function fixFaultySubSectionShift()
|
||||
}
|
||||
|
||||
if ($this->getOffsetFor(1) === false) {
|
||||
foreach ($subSections as $offset => list($startObject, $objectCount)) {
|
||||
foreach ($subSections as $offset => [$startObject, $objectCount]) {
|
||||
$this->subSections[$offset] = [$startObject - 1, $objectCount];
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ public function decode($data)
|
||||
}
|
||||
|
||||
if ($ch === 122 /* z */ && $state === 0) {
|
||||
$out .= \chr(0) . \chr(0) . \chr(0) . \chr(0);
|
||||
$out .= "\x00\x00\x00\x00";
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ public function decode($data)
|
||||
$r = (int)($r * 85 + $chn[$j]);
|
||||
}
|
||||
|
||||
$out .= \chr($r >> 24)
|
||||
. \chr($r >> 16)
|
||||
. \chr($r >> 8)
|
||||
. \chr($r);
|
||||
$out .= \chr(($r >> 24) & 255)
|
||||
. \chr(($r >> 16) & 255)
|
||||
. \chr(($r >> 8) & 255)
|
||||
. \chr($r & 255);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,16 +85,16 @@ public function decode($data)
|
||||
|
||||
if ($state === 2) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1] + 1) * 85 * 85 * 85;
|
||||
$out .= \chr($r >> 24);
|
||||
$out .= \chr(($r >> 24) & 255);
|
||||
} elseif ($state === 3) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2] + 1) * 85 * 85;
|
||||
$out .= \chr($r >> 24);
|
||||
$out .= \chr($r >> 16);
|
||||
$out .= \chr(($r >> 24) & 255);
|
||||
$out .= \chr(($r >> 16) & 255);
|
||||
} elseif ($state === 4) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3] + 1) * 85;
|
||||
$out .= \chr($r >> 24);
|
||||
$out .= \chr($r >> 16);
|
||||
$out .= \chr($r >> 8);
|
||||
$out .= \chr(($r >> 24) & 255);
|
||||
$out .= \chr(($r >> 16) & 255);
|
||||
$out .= \chr(($r >> 8) & 255);
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -177,7 +177,7 @@ public function getPdfVersion()
|
||||
PdfParserException::PDF_VERSION_NOT_FOUND
|
||||
);
|
||||
}
|
||||
list(, $major, $minor) = $result;
|
||||
[, $major, $minor] = $result;
|
||||
|
||||
$catalog = $this->getCatalog();
|
||||
if (isset($catalog->value['Version'])) {
|
||||
@@ -186,7 +186,7 @@ public function getPdfVersion()
|
||||
PdfName::unescape(PdfType::resolve($catalog->value['Version'], $this)->value)
|
||||
);
|
||||
if (count($versionParts) === 2) {
|
||||
list($major, $minor) = $versionParts;
|
||||
[$major, $minor] = $versionParts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -45,12 +45,12 @@ public static function parse(Tokenizer $tokenizer, StreamReader $streamReader)
|
||||
*/
|
||||
public static function unescape($value)
|
||||
{
|
||||
if (strpos($value, '#') === false) {
|
||||
if (\strpos($value, '#') === false) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
return preg_replace_callback('/#([a-fA-F\d]{2})/', function ($matches) {
|
||||
return chr(hexdec($matches[1]));
|
||||
return \preg_replace_callback('/#([a-fA-F\d]{2})/', function ($matches) {
|
||||
return \chr(\hexdec($matches[1]));
|
||||
}, $value);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -147,7 +147,7 @@ public function getStream($cache = false)
|
||||
$this->reader->reset($this->stream + strlen($buffer));
|
||||
$this->parser->getTokenizer()->clearStack();
|
||||
$token = $this->parser->readValue();
|
||||
if ($token === false || !($token instanceof PdfToken) || $token->value !== 'endstream') {
|
||||
if (!($token instanceof PdfToken) || $token->value !== 'endstream') {
|
||||
$this->reader->reset($this->stream, 100000);
|
||||
$buffer = $this->extractStream();
|
||||
$this->reader->reset($this->stream + strlen($buffer));
|
||||
@@ -205,7 +205,7 @@ protected function extractStream()
|
||||
// There are streams in the wild, which have only white signs in them but need to be parsed manually due
|
||||
// to a problem encountered before (e.g. Length === 0). We should set them to empty streams to avoid problems
|
||||
// in further processing (e.g. applying of filters).
|
||||
if (trim($buffer) === '') {
|
||||
if (\trim($buffer) === '') {
|
||||
$buffer = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
8
vendor/setasign/fpdi/src/PdfReader/Page.php
vendored
8
vendor/setasign/fpdi/src/PdfReader/Page.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -118,7 +118,7 @@ public function getAttribute($name, $inherited = true)
|
||||
if ($inherited && \in_array($name, $inheritedKeys, true)) {
|
||||
if ($this->inheritedAttributes === null) {
|
||||
$this->inheritedAttributes = [];
|
||||
$inheritedKeys = \array_filter($inheritedKeys, function ($key) use ($dict) {
|
||||
$inheritedKeys = \array_filter($inheritedKeys, static function ($key) use ($dict) {
|
||||
return !isset($dict->value[$key]);
|
||||
});
|
||||
|
||||
@@ -334,7 +334,7 @@ public function getExternalLinks($box = PageBoundaries::CROP_BOX)
|
||||
}
|
||||
|
||||
$rect = PdfType::resolve(PdfDictionary::get($annotation, 'Rect'), $this->parser);
|
||||
if (!$rect instanceof PdfArray || count($rect->value) !== 4) {
|
||||
if (!$rect instanceof PdfArray || \count($rect->value) !== 4) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ public function getExternalLinks($box = PageBoundaries::CROP_BOX)
|
||||
$quadPoints = PdfType::resolve(PdfDictionary::get($annotation, 'QuadPoints'), $this->parser);
|
||||
$normalizedQuadPoints = [];
|
||||
if ($quadPoints instanceof PdfArray) {
|
||||
$quadPointsCount = count($quadPoints->value);
|
||||
$quadPointsCount = \count($quadPoints->value);
|
||||
if ($quadPointsCount % 8 === 0) {
|
||||
for ($i = 0; ($i + 1) < $quadPointsCount; $i += 2) {
|
||||
$x = PdfNumeric::ensure(PdfType::resolve($quadPoints->value[$i], $this->parser));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -124,6 +124,8 @@ public function getPage($pageNumber)
|
||||
);
|
||||
}
|
||||
|
||||
$pageNumber = (int)$pageNumber;
|
||||
|
||||
if ($pageNumber < 1 || $pageNumber > $this->getPageCount()) {
|
||||
throw new \InvalidArgumentException(
|
||||
\sprintf(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
10
vendor/setasign/fpdi/src/Tcpdf/Fpdi.php
vendored
10
vendor/setasign/fpdi/src/Tcpdf/Fpdi.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ class Fpdi extends \TCPDF
|
||||
*
|
||||
* @string
|
||||
*/
|
||||
const VERSION = '2.6.4';
|
||||
const VERSION = '2.6.6';
|
||||
|
||||
/**
|
||||
* A counter for template ids.
|
||||
@@ -293,10 +293,10 @@ protected function adjustLastLink($externalLink, $xPt, $scaleX, $yPt, $newHeight
|
||||
|
||||
if ($this->inxobj) {
|
||||
// store parameters for later use on template
|
||||
$lastAnnotationKey = count($this->xobjects[$this->xobjid]['annotations']) - 1;
|
||||
$lastAnnotationKey = \count($this->xobjects[$this->xobjid]['annotations']) - 1;
|
||||
$lastAnnotationOpt = &$this->xobjects[$this->xobjid]['annotations'][$lastAnnotationKey]['opt'];
|
||||
} else {
|
||||
$lastAnnotationKey = count($this->PageAnnots[$this->page]) - 1;
|
||||
$lastAnnotationKey = \count($this->PageAnnots[$this->page]) - 1;
|
||||
$lastAnnotationOpt = &$this->PageAnnots[$this->page][$lastAnnotationKey]['opt'];
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ protected function adjustLastLink($externalLink, $xPt, $scaleX, $yPt, $newHeight
|
||||
case 'C':
|
||||
$c = [];
|
||||
$colors = PdfArray::ensure(PdfType::resolve($value, $parser))->value;
|
||||
$m = count($colors) === 4 ? 100 : 255;
|
||||
$m = \count($colors) === 4 ? 100 : 255;
|
||||
foreach ($colors as $item) {
|
||||
$c[] = PdfNumeric::ensure($item)->value * $m;
|
||||
}
|
||||
|
||||
2
vendor/setasign/fpdi/src/TcpdfFpdi.php
vendored
2
vendor/setasign/fpdi/src/TcpdfFpdi.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
2
vendor/setasign/fpdi/src/Tfpdf/FpdfTpl.php
vendored
2
vendor/setasign/fpdi/src/Tfpdf/FpdfTpl.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
4
vendor/setasign/fpdi/src/Tfpdf/Fpdi.php
vendored
4
vendor/setasign/fpdi/src/Tfpdf/Fpdi.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
@@ -28,5 +28,5 @@ class Fpdi extends FpdfTpl
|
||||
*
|
||||
* @string
|
||||
*/
|
||||
const VERSION = '2.6.4';
|
||||
const VERSION = '2.6.6';
|
||||
}
|
||||
|
||||
2
vendor/setasign/fpdi/src/autoload.php
vendored
2
vendor/setasign/fpdi/src/autoload.php
vendored
@@ -4,7 +4,7 @@
|
||||
* This file is part of FPDI
|
||||
*
|
||||
* @package setasign\Fpdi
|
||||
* @copyright Copyright (c) 2024 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @copyright Copyright (c) 2026 Setasign GmbH & Co. KG (https://www.setasign.com)
|
||||
* @license http://opensource.org/licenses/mit-license The MIT License
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user