X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fpdf2swf.c;h=93628133ec93f1b9ad0ea908a021b6201386306a;hb=79dda1a6768763e139d064ddedd1f733ad3dd238;hp=41c9fe11591d2b74d1b269e357e24c11264fec87;hpb=96675f516cf632fcbf73898173bfe0b18b04ae6c;p=swftools.git diff --git a/src/pdf2swf.c b/src/pdf2swf.c index 41c9fe1..9362813 100644 --- a/src/pdf2swf.c +++ b/src/pdf2swf.c @@ -36,7 +36,7 @@ #include "../lib/rfxswf.h" #include "../lib/devices/swf.h" #include "../lib/devices/arts.h" -#include "../lib/xpdf/pdf.h" +#include "../lib/pdf/pdf.h" #include "../lib/log.h" #define SWFDIR concatPaths(getInstallationPath(), "swfs") @@ -489,8 +489,6 @@ int main(int argn, char *argv[]) initLog(0,-1,0,0,-1,loglevel); - driver = gfxsource_pdf_create(); - #if defined(WIN32) && defined(HAVE_STAT) && defined(HAVE_SYS_STAT_H) if(installPath) { fontdir = concatPaths(installPath, "fonts"); @@ -513,8 +511,10 @@ int main(int argn, char *argv[]) srand(time(0)); #endif #endif - processargs(argn, argv); + driver = gfxsource_pdf_create(); + processargs(argn, argv); + if(!filename) { fprintf(stderr, "Please specify an input file\n"); @@ -543,6 +543,9 @@ int main(int argn, char *argv[]) // test if the page range is o.k. is_in_range(0x7fffffff, pagerange); + if(pagerange) + driver->set_parameter("pages", pagerange); + if (!filename) { args_callback_usage(argv[0]); exit(0); @@ -629,9 +632,9 @@ int main(int argn, char *argv[]) int t = y*xnup + x; if(pages[t].page->width > xmax[x]) - xmax[x] = pages[t].page->width; + xmax[x] = (int)pages[t].page->width; if(pages[t].page->height > ymax[y]) - ymax[y] = pages[t].page->height; + ymax[y] = (int)pages[t].page->height; } for(x=0;x