ajaxray/markpdf

MarkPDF working in terminal but not in Laravel > Process

laraben opened this issue · 1 comments

Hi,

hopelly someone can help because this bug is driving me crazy.

Initially everything worked fine until few weeks ago.
I have updated markpdf with the latest version.

When i use process, the isSuccessful() returns true,
But the file is not modified.

When i use the exact same options as in process but paste this in the terminal.
Then the file is modified correctly.

This is driving me nuts because i can't make it to work with process and cant see any error messages.

Hopelly someone has an answer.

found the solution.
this is not working (while earlier it was with process):

$options = $pdf . ', ' . $image . ', ' . $output . ', -x 1 -y 1 --opacity=0.8';
$process = new Process(['/usr/local/bin/markpdf', $options]);
$process->run();

after several hours of testing i came up with the solution:
$process = new Process(['markpdf', $pdf, $image, $output, '-x 1 -y 1 --opacity=0.8']);