Hi,

Development version has a problem, when we ask only for info without
give an output file:
  pdf2swf --info doc.pdf

it will write that info into doc.swf insted stdout

Patch, against git, attached

Ricardo
diff --git a/src/pdf2swf.c b/src/pdf2swf.c
index 5b258d1..36482c8 100644
--- a/src/pdf2swf.c
+++ b/src/pdf2swf.c
@@ -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.

Reply via email to