X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=pdf2swf%2Fswfoutput.cc;h=25fa510bad9a43afb9039f18398f01f05f082033;hb=428ec7f1a78a0111576a851166ec8a6b629120d7;hp=797488fcf1bedbbd3d88cf5aad9b174e359098a6;hpb=e426eda350175a0bfacf76468b4b4dcac0371e9c;p=swftools.git diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 797488f..25fa510 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1167,11 +1167,6 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) } } - if(charnr>=0 && charnrnumchars) { - msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); - return charnr; - } - if(font->encoding != FONT_ENCODING_UNICODE) { /* the following only works if the font encoding is US-ASCII based. It's needed for fonts which return broken unicode @@ -1180,8 +1175,13 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, font->ascii2glyph[charnr]); return font->ascii2glyph[charnr]; } + } + + if(charnr>=0 && charnrnumchars) { + msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); + return charnr; } - + return -1; } @@ -1339,7 +1339,8 @@ static void endpage(struct swfoutput*obj) static int firstpage = 1; void swfoutput_newpage(struct swfoutput*obj, int pageNum, int x1, int y1, int x2, int y2) { - endpage(obj); + if(!firstpage) + endpage(obj); for(depth--;depth>=startdepth;depth--) { tag = swf_InsertTag(tag,ST_REMOVEOBJECT2);