webkitpdf.php
authorAlan Knowles <alan@roojs.com>
Mon, 23 Nov 2015 05:26:42 +0000 (13:26 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Nov 2015 05:26:42 +0000 (13:26 +0800)
webkitpdf.php

index b450c2d..5715f3c 100644 (file)
@@ -25,11 +25,21 @@ class WebkitPdf
     function WebkitPdf()
     {
         if (empty($_REQUEST['url'])) {
-            $this->h404();
+            $this->h404("missing url");
         }
         
         require_once 'System.php';
-        $xvfb = 
+        
+        $xvfb = System::which('xvfb');
+        if (empty($xvfb)) {
+            $this->h404("missing xvfb");
+        }
+        
+        $xvfb = System::which('webkitpdf');
+        if (empty($xvfb)) {
+            $this->h404("missing webkitpdf (compile it..)");
+        }
+        
         
     }