Fix #6788 - using pdf for previews
authorAlan Knowles <alan@roojs.com>
Wed, 2 Jun 2021 04:09:53 +0000 (12:09 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 2 Jun 2021 04:09:53 +0000 (12:09 +0800)
File/Convert/Solution/acad2svg.php
File/Convert/Solution/acmecadconverter.php
File/Convert/Solution/anydwgtopdf.php

index f7b78ef..173da1a 100644 (file)
@@ -4,10 +4,10 @@
 class File_Convert_Solution_acad2svg extends File_Convert_Solution
 {
      
+  // disabled - use acmecad
     
     static $rules = array(
-        array(
+     /*   array(
          
             'from' =>    array( //source
                 'application/vnd.dwg',
@@ -25,6 +25,7 @@ class File_Convert_Solution_acad2svg extends File_Convert_Solution
                'image/svg'
             )
         ),
+        */ 
       
     );   
     function acad2svg($fn,$x,$y,$pg)
index 623d50b..4e6fd6c 100644 (file)
@@ -34,7 +34,8 @@ class File_Convert_Solution_acmecadconverter extends File_Convert_Solution
             ),
             'to' =>    array( //target
                 'image/jpeg', // can do quite a few more..
-                'image/svg+xml'
+                'image/svg+xml',
+                'application/pdf'
             )
         ),
       
@@ -103,7 +104,9 @@ class File_Convert_Solution_acmecadconverter extends File_Convert_Solution
         if ($this->ext == 'svg') {
             $format = 101;
         }
-       
+        if ($this->ext == 'pdf') {
+            $format = 104;
+        }
 
         
         // /Recover = seems to handle hang situations
index d3472c6..e860d72 100644 (file)
 class File_Convert_Solution_anydwgtopdf extends File_Convert_Solution
 {
     
+    // DISABLED - use acmecad
     static $rules = array(
-        array(
+       /*
+        * array(
          
             'from' =>    array( //source
                 'application/vnd.dwg',
@@ -32,7 +34,7 @@ class File_Convert_Solution_anydwgtopdf extends File_Convert_Solution
                 'application/pdf'
             )
         ),
-      
+      */
     );   
     function convert($fn,$x,$y,$pg)
     {