From 9ec1f2a6264618989defdbf65f72d6d1b4d43635 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 20 Jan 2009 16:08:17 -0800 Subject: [PATCH] added pagerange support --- src/swfrender.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/swfrender.c b/src/swfrender.c index e31e478..bace6aa 100644 --- a/src/swfrender.c +++ b/src/swfrender.c @@ -15,6 +15,7 @@ static struct options_t options[] = { {"h", "help"}, {"o", "output"}, +{"p", "pages"}, {"l", "legacy"}, {"V", "version"}, {"X", "width"}, @@ -26,6 +27,7 @@ static int ng = 1; static char*filename = 0; static char*outputname = "output.png"; static int quantize = 0; +static char*pagerange = 0; static int width = 0; static int height = 0; @@ -52,6 +54,9 @@ int args_callback_option(char*name,char*val) } else if(!strcmp(name, "q")) { quantize = 1; return 0; + } else if(!strcmp(name, "p")) { + pagerange = val; + return 1; } else if(!strcmp(name, "s")) { char*s = strdup(val); char*c = strchr(s, '='); @@ -170,6 +175,8 @@ int main(int argn, char*argv[]) int t; for(t=1;t<=doc->num_pages;t++) { + if(!is_in_range(t, pagerange)) + continue; gfxpage_t* page = doc->getpage(doc, t); dev->startpage(dev, page->width, page->height); page->render(page, dev); -- 1.7.10.4