+void show_info(gfxsource_t*driver, char*filename)
+{
+ gfxdocument_t* pdf = driver->open(filename);
+ int pagenr;
+ FILE*fo=0;
+ if(!pdf) {
+ msg("<error> Couldn't open %s", filename);
+ exit(1);
+ }
+ if(outputname) {
+ fo = fopen(outputname, "wb");
+ if(!fo) {
+ perror(outputname);exit(1);;
+ }
+ } else {
+ fo = stdout;
+ }
+
+ for(pagenr = 1; pagenr <= pdf->num_pages; pagenr++)
+ {
+ gfxpage_t*page = pdf->getpage(pdf,pagenr);
+ if(is_in_range(pagenr, pagerange)) {
+ fprintf(fo, "page=%d width=%.2f height=%.2f\n", pagenr, page->width, page->height);
+ }
+ }
+ pdf->destroy(pdf);
+}
+