X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fpdf2swf.c;h=f2425c7abf71af7d03b4da902f64e5b461034d4d;hb=0983af6ba15f2969fa6e0ec068ffe34635ea0c88;hp=5b258d1aca17c2f6f742bcbf8e8cedfb9bba0130;hpb=fe0bf96d27b7af11538533b4df9eca5cbc96eedf;p=swftools.git diff --git a/src/pdf2swf.c b/src/pdf2swf.c index 5b258d1..f2425c7 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(" 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(" 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;