steve07s 3 yıl önce
ebeveyn
işleme
7b134eb7a5
1 değiştirilmiş dosya ile 1 ekleme ve 28 silme
  1. 1 28
      script/php/api_video_tool.php

+ 1 - 28
script/php/api_video_tool.php

@@ -20,7 +20,7 @@ $GLOBALS["ffmpeg"] = $ffmpeg;
 
 $root = '../../assets/API/Universal';
 //$root = '../../上傳測試/Revit';
-$folder = 'Revit/放元件';
+$folder = 'Revit/放元件';
 
 if (isset($_POST["APIName"])) {
     $folder = $APIName;
@@ -58,33 +58,6 @@ function ConvertVideo($file_path, $ffmpeg)
     }
 }
 
-function ConvertPdf($file_path)
-{
-    $dir_name = pathinfo($file_path, PATHINFO_DIRNAME);
-    $file_name = pathinfo($file_path, PATHINFO_FILENAME);
-    $ext = pathinfo($file_path, PATHINFO_EXTENSION);
-    if (!file_exists("../." . $dir_name . '/' . $file_name . ".pdf")) {
-        $converter = new OfficeConverter("../." . $file_path, "./", "soffice.bin ", false);
-        $converter->convertTo("../." . $dir_name . '/' . $file_name . ".pdf");
-        $GLOBALS["output"] .= "<span style='color:red;'>";
-        $GLOBALS["output"] .= "   " . $ext . " ==> pdf";
-        $GLOBALS["output"] .= "</span>";
-    }
-    if (!file_exists("../." . $dir_name . '/' . $file_name . ".jpg")) {
-        $root = $_SERVER['DOCUMENT_ROOT']  . '/BIM-Monitor'  . substr($dir_name, 1)  . '/' . $file_name;
-
-        $im = new imagick();
-        $im->readimage($root . '.pdf[0]');
-        $im->setImageFormat('jpg');
-        $im->writeImage($root . '.jpg');
-        $im->clear();
-        $im->destroy();
-        $GLOBALS["output"] .= "<span style='color:red;'>";
-        $GLOBALS["output"] .= "    pdf ==> jpg";
-        $GLOBALS["output"] .= "</span>";
-    }
-}
-
 
 function FindPath($root, $folder, $ffmpeg)
 {