What Im doing is creating a application for a client that allows users to select pre-made pdf docs, that are then merged into one document using ghostscript and emailed to them.
Bellow is the script to merge the selected docs;
Code: Select all
$command = 'gswin32c -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output/' . $_POST['filename'];
foreach($_POST['files'] as $file) {
$command .= ' files/' . $file;
}
passthru($command, $ret_var);I am awhere that my host may not allow this sort of php, passthru/exec/system functions, uptill now it hasnt been promising,(I will have to contact them). but if anyone has done this before, or can send a linux copy of gs to me, i would be very grateful to say the least.