Add copy fax file to sent directory not ready to do in lua without additional changes to the interface
This commit is contained in:
parent
00c744b63a
commit
9c35d9f2fe
|
|
@ -245,13 +245,13 @@ 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");
|
||||||
// exec("libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'_converted.tif');
|
// exec("libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'_converted.tif');
|
||||||
// echo "Done";
|
// echo "Done";
|
||||||
// exit;
|
// exit;
|
||||||
|
|
||||||
$page_count = 0;
|
$page_count = 0;
|
||||||
if (is_array($pdf_files) && sizeof($pdf_files) > 0) {
|
if (is_array($pdf_files) && sizeof($pdf_files) > 0) {
|
||||||
|
|
@ -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,28 +858,25 @@ else {
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
// used by pdf generation
|
||||||
|
function showgrid($pdf) {
|
||||||
// ******************************************************************
|
// generate a grid for placement
|
||||||
/* potentially used by pdf generation */
|
for ($x=0; $x<=8.5; $x+=0.1) {
|
||||||
|
for ($y=0; $y<=11; $y+=0.1) {
|
||||||
function showgrid($pdf) {
|
$pdf -> SetTextColor(0,0,0);
|
||||||
// generate a grid for placement
|
$pdf -> SetFont("courier", "", 3);
|
||||||
for ($x=0; $x<=8.5; $x+=0.1) {
|
$pdf -> Text($x-0.01,$y-0.01,".");
|
||||||
for ($y=0; $y<=11; $y+=0.1) {
|
}
|
||||||
$pdf -> SetTextColor(0,0,0);
|
}
|
||||||
$pdf -> SetFont("courier", "", 3);
|
for ($x=0; $x<=9; $x+=1) {
|
||||||
$pdf -> Text($x-0.01,$y-0.01,".");
|
for ($y=0; $y<=11; $y+=1) {
|
||||||
|
$pdf -> SetTextColor(255,0,0);
|
||||||
|
$pdf -> SetFont("times", "", 10);
|
||||||
|
$pdf -> Text($x-.02,$y-.01,".");
|
||||||
|
$pdf -> SetFont("courier", "", 4);
|
||||||
|
$pdf -> Text($x+0.01,$y+0.035,$x.",".$y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ($x=0; $x<=9; $x+=1) {
|
|
||||||
for ($y=0; $y<=11; $y+=1) {
|
|
||||||
$pdf -> SetTextColor(255,0,0);
|
|
||||||
$pdf -> SetFont("times", "", 10);
|
|
||||||
$pdf -> Text($x-.02,$y-.01,".");
|
|
||||||
$pdf -> SetFont("courier", "", 4);
|
|
||||||
$pdf -> Text($x+0.01,$y+0.035,$x.",".$y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue