diff --git a/src/ElementPrinter/Marker/ExtraMarkerPrinter.php b/src/ElementPrinter/Marker/ExtraMarkerPrinter.php index 78522eb..f785791 100644 --- a/src/ElementPrinter/Marker/ExtraMarkerPrinter.php +++ b/src/ElementPrinter/Marker/ExtraMarkerPrinter.php @@ -75,7 +75,9 @@ class ExtraMarkerPrinter $point = new Point($destX, $destY); - $markerImage->paste($canvas->getImage(), $point); + if ($canvas->getImage()->getSize()->contains($markerImage->getSize(), $point)) { + $markerImage->paste($canvas->getImage(), $point); + } return $this; }