X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fpdf2swf.c;h=5422e7d5c7703b3e36eb72e82de353cde93c03e3;hb=f0f4599a8cc05f18859d2bb8d0afe447f3e00813;hp=8c4d8a5d6674eb7f68fc46793c43d8c2c1325b40;hpb=f9b025bc6ebfa93d38ea20ef69e0e65d7f2f257b;p=swftools.git diff --git a/src/pdf2swf.c b/src/pdf2swf.c index 8c4d8a5..5422e7d 100644 --- a/src/pdf2swf.c +++ b/src/pdf2swf.c @@ -42,6 +42,7 @@ #include "../lib/devices/swf.h" #include "../lib/devices/polyops.h" #include "../lib/devices/record.h" +#include "../lib/devices/rescale.h" #include "../lib/pdf/pdf.h" #include "../lib/log.h" @@ -185,12 +186,12 @@ int args_callback_option(char*name,char*val) { } else if (!strcmp(name, "X")) { - maxwidth = atoi(value); + maxwidth = atoi(val); return 1; } else if (!strcmp(name, "Y")) { - maxheight = atoi(value); + maxheight = atoi(val); return 1; } else if (!strcmp(name, "q")) @@ -600,7 +601,7 @@ gfxdevice_t*create_output_device() } if(maxwidth || maxheight) { - gfxdevice_rescale_init(&rescale, out, maxwidth, maxheight); + gfxdevice_rescale_init(&rescale, out, maxwidth, maxheight, 0); out = &rescale; } @@ -622,7 +623,6 @@ int main(int argn, char *argv[]) char t1searchpath[1024]; int nup_pos = 0; int x,y; - char* installPath = getInstallationPath(); int one_file_per_page = 0; initLog(0,-1,0,0,-1,loglevel); @@ -824,7 +824,7 @@ int main(int argn, char *argv[]) if(one_file_per_page) { gfxresult_t*result = out->finish(out);out=0; char buf[1024]; - sprintf(buf, outputname, one_file_per_page++); + sprintf(buf, outputname, pagenr); if(result->save(result, buf) < 0) { return 1; } @@ -845,8 +845,8 @@ int main(int argn, char *argv[]) if(result->save(result, outputname) < 0) { exit(1); } - int width = (int)result->get(result, "width"); - int height = (int)result->get(result, "height"); + int width = (int)(ptroff_t)result->get(result, "width"); + int height = (int)(ptroff_t)result->get(result, "height"); result->destroy(result);result=0; if(preloader || viewer) {