Browse Source

config for convert and pdftk

master
Tobias Herre 10 months ago
parent
commit
c535d2a060
  1. 3
      config.sample.php
  2. 2
      submit.php
  3. 2
      upload.php

3
config.sample.php

@ -1,5 +1,6 @@
<?php
$CONVERT_CMD = "/usr/local/bin/pdftk";
$CONVERT_CMD = "/usr/local/bin/convert";
$PDFTK_CMD = "/usr/local/bin/pdftk";
$mailHost = 'mailserver.example.com'; // Specify main and backup server
$mailPort = 587; // Set the SMTP port

2
submit.php

@ -388,7 +388,7 @@ foreach ($_POST['desc'] as $key => $val) {
$resultnam = tempnam("/tmp","karesult");
$cmd = "$CONVERT_CMD";
$cmd = "$PDFTK_CMD";
foreach ($pdfs as $filename){
$cmd .= " $filename";
}

2
upload.php

@ -47,7 +47,7 @@ foreach ($_FILES as $key=>$files){
file_put_contents("/tmp/log.txt", "file-$key-$i\n", FILE_APPEND | LOCK_EX);
file_put_contents("/tmp/log.txt", $files['name'][$i], FILE_APPEND | LOCK_EX);
$tmpfname = tempnam("/tmp", "FOO");
$cmd = "/usr/local/bin/convert $tmpname PDF:$tmpfname";
$cmd = "$CONVERT_CMD $tmpname PDF:$tmpfname";
exec ($cmd);
file_put_contents("/tmp/log.txt", "\n$cmd\n");

Loading…
Cancel
Save