Add copy fax file to sent directory not ready to do in lua without additional changes to the interface

This commit is contained in:
Mark Crane
2014-09-07 05:38:27 +00:00
parent 00c744b63a
commit 9c35d9f2fe
+3 -10
View File
@@ -245,7 +245,7 @@ else {
$pdf -> setPrintFooter(false); $pdf -> setPrintFooter(false);
$pdf -> SetMargins(0, 0, 0, true); $pdf -> SetMargins(0, 0, 0, true);
/* Works to get the bad PDF into a good (sort of) PDF, but don't have a dynamic method to obtain the correct page size first, so is a guess. */ //Get the bad PDF into a good (sort of) PDF, but don't have a dynamic method to obtain the correct page size first, so is a guess.
// chdir($dir_fax_temp); // chdir($dir_fax_temp);
// exec("gs -q -sDEVICE=tiffg3 -r204x196 -g1687x2291 -dNOPAUSE -sOutputFile=".$fax_name."_converted.tif -- ".$fax_name.".pdf -c quit"); // exec("gs -q -sDEVICE=tiffg3 -r204x196 -g1687x2291 -dNOPAUSE -sOutputFile=".$fax_name."_converted.tif -- ".$fax_name.".pdf -c quit");
// exec("mv ".$dir_fax_temp.'/'.$fax_name.".pdf ".$dir_fax_temp.'/'.$fax_name."_uploaded.pdf"); // exec("mv ".$dir_fax_temp.'/'.$fax_name.".pdf ".$dir_fax_temp.'/'.$fax_name."_uploaded.pdf");
@@ -574,15 +574,11 @@ else {
//wait for a few seconds //wait for a few seconds
sleep(5); sleep(5);
/*
//handled with lua retry script
//move the generated tif and pdf files to the sent directory //move the generated tif and pdf files to the sent directory
exec("cp ".$dir_fax_temp.'/'.$fax_instance_uuid.".tif ".$dir_fax_sent.'/'.$fax_instance_uuid.".tif"); exec("cp ".$dir_fax_temp.'/'.$fax_instance_uuid.".tif ".$dir_fax_sent.'/'.$fax_instance_uuid.".tif");
if (file_exists($dir_fax_temp.'/'.$fax_instance_uuid.".pdf")) { if (file_exists($dir_fax_temp.'/'.$fax_instance_uuid.".pdf")) {
exec("cp ".$dir_fax_temp.'/'.$fax_instance_uuid.".pdf ".$dir_fax_sent.'/'.$fax_instance_uuid.".pdf"); exec("cp ".$dir_fax_temp.'/'.$fax_instance_uuid.".pdf ".$dir_fax_sent.'/'.$fax_instance_uuid.".pdf");
} }
*/
//copy the original uploaded file to the sent box //copy the original uploaded file to the sent box
foreach ($_SESSION['fax']['save'] as $row) { foreach ($_SESSION['fax']['save'] as $row) {
@@ -862,11 +858,7 @@ else {
//show the footer //show the footer
require_once "resources/footer.php"; require_once "resources/footer.php";
// used by pdf generation
// ******************************************************************
/* potentially used by pdf generation */
function showgrid($pdf) { function showgrid($pdf) {
// generate a grid for placement // generate a grid for placement
for ($x=0; $x<=8.5; $x+=0.1) { for ($x=0; $x<=8.5; $x+=0.1) {
@@ -886,4 +878,5 @@ function showgrid($pdf) {
} }
} }
} }
?> ?>