X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;fp=pdf2swf%2FSWFOutputDev.cc;h=deef3f4306bc612b5a043865b243b7b0d2ed9d6f;hp=0eac33568a90cf4b374cc2d9a6c525389879afd4;hb=6feb1917fd84e9ed59c5cd0518287229ec1db20b;hpb=39b4341a457d527eeef80e35ec5b4c27dd2fa96b diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 0eac335..deef3f4 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -1463,14 +1463,20 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) points[4].x = x + user_movex; points[4].y = y + user_movey; points[4].next = 0; + + msg(" drawlink %.2f/%.2f %.2f/%.2f %.2f/%.2f %.2f/%.2f\n", + points[0].x, points[0].y, + points[1].x, points[1].y, + points[2].x, points[2].y, + points[3].x, points[3].y); LinkAction*action=link->getAction(); char buf[128]; char*s = 0; char*type = "-?-"; - char*url = 0; char*named = 0; int page = -1; + msg(" drawlink action=%d\n", action->getKind()); switch(action->getKind()) { case actionGoTo: { @@ -1541,6 +1547,7 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) } break; case actionURI: { + char*url = 0; type = "URI"; LinkURI*l = (LinkURI*)action; GString*g = l->getURI(); @@ -1563,8 +1570,10 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) } if(!s) s = strdup("-?-"); + + msg(" drawlink s=%s\n", s); - if(!linkinfo && (page || url)) + if(!linkinfo && (page || s)) { msg(" File contains links"); linkinfo = 1; @@ -1587,9 +1596,9 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) sprintf(buf, "page%d", lpage); output->drawlink(output, points, buf); } - else if(url) + else if(s) { - output->drawlink(output, points, url); + output->drawlink(output, points, s); } msg(" \"%s\" link to \"%s\" (%d)\n", type, FIXNULL(s), page);