Prioritize ghostscript over fpdi for merging of PDFs

This commit is contained in:
OpenXE 2024-05-16 12:55:31 +02:00
parent a7569785c8
commit 63aaaf96ee

View File

@ -49,9 +49,9 @@ final class PdfMerger
} }
try { try {
$this->fpdi->mergeFiles($sourceFiles, $targetFile);
} catch (PdfIncompatibleException $exception) {
$this->gs->mergeFiles($sourceFiles, $targetFile); $this->gs->mergeFiles($sourceFiles, $targetFile);
} catch (Exception $exception) {
$this->fpdi->mergeFiles($sourceFiles, $targetFile);
} }
return $targetFile; return $targetFile;