X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fpdf.c;h=aebc1bf731986a96cd3c56ee252b30df5b873632;hb=4191c8e4796a5c9eb56a2c4b0355fa839664da1c;hp=ef67d496fb09225f65c810eb872c68c5d7f0a44e;hpb=0b38eabf882d8bdcd0e92995e8a2478db9cb5ed8;p=swftools.git diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index ef67d49..aebc1bf 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -33,6 +33,7 @@ #include "../mem.h" #include "../gfxdevice.h" #include "../gfxtools.h" +#include "../gfximage.h" typedef struct _internal { PDF* p; @@ -234,7 +235,7 @@ void pdf_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyphnr, gfxcolor_t*color int fontid = (int)(ptroff_t)gfxfontlist_getuserdata(i->fontlist, font->id); PDF_setfont(i->p, fontid, matrix->m00); char name[32]; - sprintf(name, "%c\0", glyphnr+32); + sprintf(name, "%c", glyphnr+32); if(fabs(matrix->tx - i->lastx) > 0.001 || matrix->ty != i->lasty) { PDF_show_xy2(i->p, name, strlen(name), matrix->tx, matrix->ty); @@ -266,6 +267,7 @@ typedef struct pdfresult_internal { void pdfresult_destroy(gfxresult_t*gfx) { pdfresult_internal_t*i = (pdfresult_internal_t*)gfx->internal; + unlink(i->tempfile); free(i->tempfile); free(gfx->internal);gfx->internal = 0; free(gfx);