added gfx2gfx to Makefile, small fix in as3compile
[swftools.git] / src / pdf2swf.c
index 5b258d1..f2425c7 100644 (file)
@@ -640,18 +640,20 @@ int main(int argn, char *argv[])
        exit(1);
     }
 
-    if(!outputname)
-    {
-       if(filename) {
-           outputname = stripFilename(filename, ".swf");
-           msg("<notice> Output filename not given. Writing to %s", outputname);
-       } 
-    }
-       
-    if(!outputname)
-    {
-       fprintf(stderr, "Please use -o to specify an output file\n");
-       exit(1);
+    if (!info_only) {
+        if(!outputname)
+        {
+            if(filename) {
+                outputname = stripFilename(filename, ".swf");
+                msg("<notice> Output filename not given. Writing to %s", outputname);
+            } 
+        }
+            
+        if(!outputname)
+        {
+            fprintf(stderr, "Please use -o to specify an output file\n");
+            exit(1);
+        }
     }
 
     // test if the page range is o.k.
@@ -738,6 +740,10 @@ int main(int argn, char *argv[])
            frame++;
        }
     }
+    if(pagerange && !pagenum && frame==1) {
+       fprintf(stderr, "No pages in range %s", pagerange);
+       exit(1);
+    }
 
     pagenum = 0;