Blob Blame History Raw
diff --git a/fax/faxspool.in b/fax/faxspool.in
index 2be42fc..1f65a9c 100644
--- a/fax/faxspool.in
+++ b/fax/faxspool.in
@@ -414,10 +414,23 @@ fs_cvt_pdf()
 {
     driver="$GS_DRIVER_HI"
     test X$3 = X-n && driver="$GS_DRIVER_LO"
-
-    cat $1 |
-	acroread -toPostScript |
-	gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+    r=0;
+    if /usr/bin/which acroread >/dev/null 2>&1; then
+       cat $1 |
+	  acroread -toPostScript |
+	  gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+       r=$?;
+       if [ $r != 0 ]; then
+          cat $1 |
+	     acroread -toPostScript -level1 |
+	     gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+	  r=$?;
+       fi;
+    else
+       cat $1 | gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+       r=$?;
+    fi;
+    return $r;
 }