X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpdf%2Fpdf.cc;h=a5b260769dce9be27126ad51a3cade34d248cfbd;hb=b0856a20997afbb7e6de20504a436ed2b31364ad;hp=f651e58ac6daa30208917b974d0ac23d4025428b;hpb=2256dc75677d29b2821fccafdd16d5e8eb27ce12;p=swftools.git
diff --git a/lib/pdf/pdf.cc b/lib/pdf/pdf.cc
index f651e58..a5b2607 100644
--- a/lib/pdf/pdf.cc
+++ b/lib/pdf/pdf.cc
@@ -108,6 +108,8 @@ void render2(gfxpage_t*page, gfxdevice_t*dev)
}
pi->doc->displayPage((OutputDev*)pi->outputDev, page->nr, zoom*multiply, zoom*multiply, /*rotate*/0, true, true, /*doLinks*/(int)1);
pi->doc->processLinks((OutputDev*)pi->outputDev, page->nr);
+ pi->outputDev->finishPage();
+
pi->outputDev->setDevice(0);
if(pi->middev) {
gfxdevice_rescale_setdevice(pi->middev, 0x00000000);
@@ -361,10 +363,14 @@ static void pdf_set_parameter(gfxsource_t*src, const char*name, const char*value
multiply = atoi(value);
} else if(!strcmp(name, "help")) {
printf("\nPDF device global parameters:\n");
- printf("fontdir=
a directory with additional fonts\n");
- printf("font= an dditional font filename\n");
- printf("pages= the range of pages to convert (example: pages=1-100,210-)\n");
- printf("zoom= the resultion (default: 72)\n");
+ printf("fontdir= a directory with additional fonts\n");
+ printf("font= an additional font filename\n");
+ printf("pages= the range of pages to convert (example: pages=1-100,210-)\n");
+ printf("zoom= the resultion (default: 72)\n");
+ printf("languagedir= Add an xpdf language directory\n");
+ printf("multiply= Render everything at the resolution\n");
+ printf("poly2bitmap Convert graphics to bitmaps\n");
+ printf("bitmap Convert everything to bitmaps\n");
}
storeDeviceParameter(name,value);
}
@@ -484,10 +490,13 @@ void pdf_destroy(gfxsource_t*src)
parameter_t*p = device_config;
while(p) {
parameter_t*next = p->next;
- p->next = 0;free(p);
+ if(p->name) free(p->name);p->name = 0;
+ if(p->value) free(p->value);p->value =0;
+ p->next = 0;delete p;
p = next;
}
delete globalParams;globalParams = 0;
+ free(src);
}
gfxsource_t*gfxsource_pdf_create()