I'm trying to convert a PDF in A3 format to a PDF in A4 format, with the A3 pages fitting the A4 pages.
Therefore I tried using ImageMagicks convert function like so in PHP:
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/pingen/test/Rechnung_220719020369.pdf';
$gs = 'convert -density 300 -define pdf:fit-page=A4 ' . escapeshellarg($filePath) . ' ' . escapeshellarg($_SERVER['DOCUMENT_ROOT'] . '/pingen/test/test'.date('Y-m-dHms').'.pdf');
exec($gs);
But when I try to open the resulting PDF with Adobe Acrobat reader I'm getting the error "Insufficient Data for an Image".
Any solution?