diff --git a/src/Processor/Gotenberg.php b/src/Processor/Gotenberg.php index 27f455c..4511bdd 100644 --- a/src/Processor/Gotenberg.php +++ b/src/Processor/Gotenberg.php @@ -160,11 +160,9 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF } if (isset($params['metadata'])) { - if (method_exists($chromium, 'metadata')) { - $chromium->metadata($params['metadata']); - } else { - $chromium->formValue('metadata', json_encode($params['metadata'])); - } + // TODO: Replace with metadata() once dropping support for gotenberg-php < 2.2.0 + $chromium->formValue('metadata', json_encode($params['metadata'])); + } $request = $chromium->outputFilename($tempFileName)->html(Stream::string('processor.html', $html));