X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fpdf%2Fpdf.cc;h=840a8dae11ba4e608111ae38c23d2978687ea221;hb=ed72cffe2ac3abeac86859102b126753cf093b62;hp=189a05cadae723f39673cf2a3148191d60c22114;hpb=5f1e7e9ebbac00effaae0545c32fe9060215d125;p=swftools.git diff --git a/lib/pdf/pdf.cc b/lib/pdf/pdf.cc index 189a05c..840a8da 100644 --- a/lib/pdf/pdf.cc +++ b/lib/pdf/pdf.cc @@ -133,6 +133,11 @@ static void render2(gfxpage_t*page, gfxdevice_t*dev, int x,int y, int x1,int y1, pdf_doc_internal_t*pi = (pdf_doc_internal_t*)page->parent->internal; gfxsource_internal_t*i = (gfxsource_internal_t*)pi->parent->internal; + if(pi->nocopy) { + msg(" PDF disallows copying"); + exit(0); + } + CommonOutputDev*outputDev = 0; if(pi->config_full_bitmap_optimizing) { FullBitmapOutputDev*d = new FullBitmapOutputDev(pi->info, pi->doc); @@ -150,6 +155,12 @@ static void render2(gfxpage_t*page, gfxdevice_t*dev, int x,int y, int x1,int y1, outputDev->setParameter(p->name, p->value); p = p->next; } + p = pi->parameters.device_config; + while(p) { + outputDev->setParameter(p->name, p->value); + p = p->next; + } + outputDev->setPageMap(pi->pagemap, pi->pagemap_pos); outputDev->setMove(x,y); outputDev->setClip(x1,y1,x2,y2); @@ -182,11 +193,13 @@ static void render2(gfxpage_t*page, gfxdevice_t*dev, int x,int y, int x1,int y1, pi->doc->processLinks((OutputDev*)outputDev, page->nr); outputDev->finishPage(); outputDev->setDevice(0); + delete outputDev; if(middev) { gfxdevice_rescale_setdevice(middev, 0x00000000); middev->finish(middev); } + }