首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure WebJobs上的ABCPDF Gecko

Azure WebJobs上的ABCPDF Gecko
EN

Stack Overflow用户
提问于 2014-04-30 23:23:23
回答 2查看 601关注 0票数 1

有ABCPDF Gecko引擎将网页转换为PDF。在本地运行得很好,但在使用azure webjob时,我不知道如何调试它。我不确定这行代码(3518)是什么,因为有不同的版本,它从没有代码的地方抛出错误。

C#代码

代码语言:javascript
复制
    var url = "http://www.woot.com";
    Log("AddingImageUrl {0}", url);
    var theID = _doc.AddImageUrl(url);
    while (true)
    {
        if (!_doc.Chainable(theID))
        {
            break;
        }
        _doc.Page = _doc.AddPage();
        SetupRectangle();
        theID = _doc.AddImageToChain(theID);
    }

日志:

代码语言:javascript
复制
[04/30/2014 15:15:31 > 865961: INFO] AddingImageUrl http://www.woot.com
[04/30/2014 15:15:36 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:38 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:40 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:43 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:45 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:47 > 865961: ERR ] ??????????p: T###!!! ABORT: unable to find a usable font (serif): file c:/WSG/Projects/ABCpdf/Source/mozilla-release/gfx/thebes/gfxFont.cpp, line 3518
[04/30/2014 15:15:47 > 865961: ERR ] 
[04/30/2014 15:15:47 > 865961: ERR ] Unhandled Exception: WebSupergoo.ABCpdf9.Internal.PDFException: Failed to add HTML: Remote process terminated unexpectedly. (Possible causes: Out of memory or corrupted/incorrect version of XULRunner folder.). ---> WebSupergoo.TaskGarden.RemoteProcessTerminatedException: Remote process terminated unexpectedly.
[04/30/2014 15:15:47 > 865961: ERR ] 
[04/30/2014 15:15:47 > 865961: ERR ] Server stack trace: 
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.TaskGarden.Core.RpcCaller.EndCall(IAsyncResult result, Object[]& outArgs)
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.TaskGarden.Core.RpcCaller.Call(MethodBase method, Object[] args)
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.TaskGarden.Instance`1.Invoke(IMessage msg)
[04/30/2014 15:15:47 > 865961: ERR ] 
[04/30/2014 15:15:47 > 865961: ERR ] Exception rethrown at [0]: 
[04/30/2014 15:15:47 > 865961: ERR ]    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
[04/30/2014 15:15:47 > 865961: ERR ]    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.ABCpdf9.Internal.Gecko.IGeckoWorker.AddImageUrl(String url, Double pageWidthMm, Double pageHeightMm, AddImageUrlOptions options, UInt32& numCommands, Byte[]& data)
[04/30/2014 15:15:47 > 865961: ERR ]    --- End of inner exception stack trace ---
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.ABCpdf9.Doc.AddUrlHtml(String urlOrHtml, Boolean isHtml, Boolean paged, Int32 width, Boolean disableCache)
[04/30/2014 15:15:47 > 865961: ERR ]    at WebSupergoo.ABCpdf9.Doc.AddImageUrl(String url, Boolean paged, Int32 width, Boolean disableCache)
EN

回答 2

Stack Overflow用户

发布于 2019-06-28 13:04:55

当部署为Azure webjob时,ABCpdf Gecko引擎会失败,而您可以将其部署为Azure云服务(经典) Web角色。

只有在需要将图像或超文本标记语言转换为WebRole的情况下,才需要PDF。如果只需要将文本转换为PDF,我们可以将应用程序托管为App Service或WebJob (WebRole或云服务可能不是必需的)。

这里提供了ABCpdf Azure部署指南:

http://www.websupergoo.com/support-azure-abcpdf.htm

票数 1
EN

Stack Overflow用户

发布于 2014-05-01 00:43:34

不幸的是,由于沙箱的限制,我不认为这可以在Azure网站上工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23392060

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档