开发者

ABCpdf7 Not Rendering Images using AddImageUrl

Fairly exotic it seems to me. We recently upgraded/migrated from Windows Server 2003 to 2008, and now it seems that images cannot be rendered when using Doc.AddImageUrl(). (when the pdf is saved, the images appear at the correct dimensions, but the IE8 missing image x shows up).

If I understand correctly, ABCpdf uses IE rendering internally for this sort of thing.

We thought it might be a permission issue, but we've check IE ESC and that seems to be configured as they suggest. Has anyone else run into a similar problem? Perhaps a code configuration is needed?

Not the entire snippe开发者_Go百科t, but the ABCpdf7 stuff:

using (Doc doc = new Doc())
        {
            doc.HtmlOptions.PageCacheEnabled = false;
            doc.HtmlOptions.UseNoCache = true;
            doc.HtmlOptions.PageCacheClear();
            doc.HtmlOptions.PageCachePurge();
            doc.HtmlOptions.UseResync = true;
            doc.HtmlOptions.ImageQuality = 25;

            int pageID = doc.AddImageUrl(url + "&guid=" + url.GetHashCode());

            while (true)
            {
                if (!doc.Chainable(pageID))
                    break;
                doc.Page = doc.AddPage();
                pageID = doc.AddImageToChain(pageID);
            }

  // file saving etc.
    }


Extracted a unit test out of the code to test on several environments. Turned out that our dev db server (which is the only other one running 2008) was able to run the unit test with almost the exact same config fine.

This information in hand, we were able to narrow it to the dll's on production. Even though the ABCpdf.dll was correct (32bit), a 64bit of the core (ABCpdf7ce.dll) was on production.

I guess since the core of the component is COM (iirc), we weren't throwing any errors. Further, the fact that we were able to generate the pdf from the html, sans images, is weird to me.

And, to top it all off, there is no record of a 64bit dll in our repository, and the 32bit dll was in our GAC. As far as I can tell, the core DLL is only used for building, so we removed those dlls from the affected environments and seem to be in good condition.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜