From: Matthias Kramm Date: Tue, 2 Mar 2010 20:12:34 +0000 (-0800) Subject: made pdf2pdf clean up after itself X-Git-Tag: version-0-9-1~124 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=caada7c5e05d789bde96929491f6fa2cfacac6fc;hp=5dc0fe4407c41da62af13449e0d8302001d5be66 made pdf2pdf clean up after itself --- diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index b96cda3..1e0d6a8 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -393,7 +393,7 @@ void pdf_addfont(gfxdevice_t*dev, gfxfont_t*font) font->unicode2glyph = 0; gfxfont_save(font, filename); font->id=old_id; - + #ifdef RUN_TTX /* for testing the generated fonts: run everything through ttx (fonttools) */ char cmd[256]; @@ -405,13 +405,15 @@ void pdf_addfont(gfxdevice_t*dev, gfxfont_t*font) sprintf(cmd, "rm -f test.ttx");system(cmd); #endif - int l = strlen(font->id); + int l = strlen(fontname); for(t=0;tp, fontname2, l*2, "host", "embedding=true"); i->fontlist = gfxfontlist_addfont2(i->fontlist, font, (void*)(ptroff_t)fontid); + unlink(filename); } } }