Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
612 views
in Technique[技术] by (71.8m points)

asp.net mvc - Azure websites and wkhtmltopdf

So after beginning my azure websites-adventure, I have been encountering disappointment after disappointment to the point of 'almost' regretting taking the azure route..the latest: my app uses wkhtmltopdf(Rotativa) for all its PDF generation. And as I discovered now during my staging testing...that doesnt work. According to most info on the web, azure websites cannot run .exe's. However, most info I've seen is by now 2 years old and I know Azure development is going fast.

Is there by now a way to run wkhtmltopdf on azure websites, or a workaround atleast? I cannot really find a free alternative like wkhtmltopdf to seems to be working.(Itextsharp doesnt seem to like my html, so thats no option).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Running wkhtmltopdf is now supported in Azure Web Apps - just make sure you are using Basic, Standard, or Premium App Service Plan. Consumption Service Plan and Free App Service Plan have a more limited sandbox and are NOT supported in my testing. MS confirms supportability of wkhtmltopdf in Azure Web Apps.

Hosting - App Service Plan

enter image description here

There are numerous wrappers available (TuesPechkin, Codaxy, etc.). Codaxy is an EXE wrapper in .NET while TuesPechkin is a .NET wrapper around C++ runtime using P/Invoke over wkhtmltox.dll.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...