ABCPDF Gecko on Azure WebJobs

Question!

Have ABCPDF Gecko Engine turning webpage into PDF. Works fine locally, but when pushing to azure webjobs I dont know how to debug this. I am not ecen sure what that line of code (3518) is, as there are different versions out and its throwing an error from somewhere that doesn't have code.

C# Code

    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);
    }

Logs :

[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)


Answers

Unfortunately I don't think this can work in Azure Website due to sandbox limitation.



This video can help you solving your question :)
By: admin