.net - Has anyone been able to get ABCpdf.Net's Gecko Engine to run in an Azure App Service? -
i'm trying configure abcpdf pdf generator run in azure app service , can generate simple hello world pdf try convert html pdf gecko engine never response.
the response azure 500 request timed out.
here's hello world code:
public fileresult helloworld() { activatelicense(); doc doc = new doc(); doc.addtext("hello world"); byte[] data = doc.getdata(); return file(data, "application/pdf", "hw.pdf"); }
here's html pdf code:
public fileresult googlepdf() { activatelicense(); byte[] pdfbytes; using (doc thedoc = new doc()) { thedoc.htmloptions.engine = enginetype.gecko; thedoc.addimageurl("http://google.com"); pdfbytes = thedoc.getdata(); } return file(pdfbytes, "application/pdf", "googlehomepage.pdf"); }
example: http://abcpdfazure.azurewebsites.net/
source code: https://github.com/andyrblank/abcpdfazure
in regards question being duplicate of one: abcpdf .net azure app service
the fundamental difference, in question, i'm using gecko engine instead of mshtml engine. gecko engine not require windows registry modification or internet explorer installed on host.
engine doc: http://www.websupergoo.com/helppdfnet/source/5-abcpdf/xhtmloptions/2-properties/1-engine.htm
i have additional information on how abcpdf works makers:
abcgecko runs in process pool need able spawn worker processes
i believe that's referring abcgeckowp.exe file uses gecko/firefox rendering engine inside xulrunner folder. i'm not sure if possible in azure or if has workaround.
i suggest have @ article: http://www.websupergoo.com/support-azure-abcpdf.htm#waws. here snippet:
the windows azure platform offers variety of ways host website. abcpdf recommend using azure virtual machine though can use abcpdf azure web role or worker role. if need use windows azure web site (waws) suggest using in conjunction abcpdf installed azure worker role.
as know, not support in azure web app now. recommended choose azure worker role instead.
Comments
Post a Comment