From 252abeff8bac5b7948cd5574bb5ad8824c2f7566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20H=C3=A4rtl?= Date: Thu, 25 Sep 2025 18:48:21 +0200 Subject: [PATCH] Issue #345 Fix type mismatch error for cat command --- src/Pdf.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Pdf.php b/src/Pdf.php index 937a0b2..48397bc 100644 --- a/src/Pdf.php +++ b/src/Pdf.php @@ -181,8 +181,12 @@ public function cat( ?string $rotation = null, ): self { $this->getCommand() - ->setOperation('cat') - ->addPageRange($start, $end, $handle, $qualifier, $rotation); + ->setOperation('cat'); + + if ($start !== null) { + $this->getCommand() + ->addPageRange($start, $end, $handle, $qualifier, $rotation); + } return $this; }