X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fpdf2swf.cc;h=20f93486a819ba3e74534b57282320e833a03d35;hb=11710db6731b9a63e34e2b4567bbd0d1954284f2;hp=0d8179627608989f35911aca9ff2be2ba3187018;hpb=fc554a43712b76d16b41ec77dd311b4a78b1ef6b;p=swftools.git diff --git a/pdf2swf/pdf2swf.cc b/pdf2swf/pdf2swf.cc index 0d81796..20f9348 100644 --- a/pdf2swf/pdf2swf.cc +++ b/pdf2swf/pdf2swf.cc @@ -12,7 +12,7 @@ #include #include #include "../config.h" -#include "args.h" +#include "../lib/args.h" #include "pdfswf.h" #include "t1lib.h" extern "C" { @@ -56,6 +56,36 @@ int args_callback_option(char*name,char*val) { password = val; return 1; } + else if (!strcmp(name, "s")) + { + pdfswf_drawonlyshapes(); + return 0; + } + else if (!strcmp(name, "i")) + { + pdfswf_ignoredraworder(); + return 0; + } + else if (!strcmp(name, "n")) + { + pdfswf_linksopennewwindow(); + return 0; + } + else if (!strcmp(name, "f")) + { + pdfswf_storeallcharacters(); + return 0; + } + else if (name[0]=='j') + { + if(name[1]) { + pdfswf_jpegquality(atoi(&name[1])); + return 0; + } else { + pdfswf_jpegquality(atoi(val)); + return 1; + } + } else if (!strcmp(name, "V")) { printf("pdf2swf - part of %s %s\n", PACKAGE, VERSION); @@ -69,36 +99,20 @@ int args_callback_option(char*name,char*val) { return 0; } -struct options_t -{ - char shortoption; - char*longoption; -} options[] = -{{'o',"output"}, - {'V',"version"}, - {'p',"pages"} +struct options_t options[] = +{{"o","output"}, + {"V","version"}, + {"i","ignore"}, + {"s","shapes"}, + {"j","jpegquality"}, + {"p","pages"}, + {"w","samewindow"}, + {"f","fonts"}, + {0,0} }; int args_callback_longoption(char*name,char*val) { - int t; - char*equal = strchr(name,'='); - if (equal) { - *equal = 0; - equal++; - } - for(t=0;t