简体   繁体   中英

Hosting Winnovative HTML to PDF Converter in Azure

I am looking to port ASP.NET MVC 5 application to being hosted on Azure.We are looking at hosting our application in an Azure App Service. One of the dependancies I have is Winnovative's HTML to PDF converter. The converter does not work in a web service, this is a well known issue with the software. Winnovative's advice is:

For the situations when you must use the converter in an Azure Website and you cannot deploy your web application as an Azure Web Role or Worker Role or install it on an Azure Virtual Machine we developed a solution consisting in a service that you can deploy as a separate Azure Worker Role and a client library that you can link directly into your Azure Website to call that service completely transparent for you.

I have downloaded this software and tried to host it in an App Service but this didn't work (Possibly due to the same underlying reason the converter didn't work in our main application). All of the instructions for hosting the service say to either host this in a Web role or a Worker role but these are deprecated by Azure. How can I host the service using the current Azure options?

As Winnovative HTML to PDF Converter for Azure states as follows:

For Azure Websites we developed a solution consisting in a service that you can deploy as a separate Azure Worker Role and a client library that you can link directly into your Azure Website to call that service completely transparent for you. The API of the client library is almost identical to the general .NET library API.

You could click Download HTML to PDF Converter v14.4 for Azure for downloading the solution. Then, you need to install the HTML to PDF Server. As the instructions in the Readme.txt file states that you could install the server as follows:

  • Running the HTML to PDF Server in an Azure Cloud Service

    For Azure Cloud Service Worker Role, you could find it under Server\\Azure\\TCP_Service folder. And the Azure Cloud Service Web Role can be found under Server\\Azure\\Web_Service folder.

  • Running the HTML to PDF Server in a Windows Service, you could use Azure VM

More details about the installation for the HTML to PDF Server, you could check the Readme.txt file as follows:

在此处输入图片说明

For your client, you could refer to the sample under WnvHtmlToPdf-Azure-v14.4\\Demo or you could directly reference the NuGet package WnvHtmlToPdf_Azure_Client into your project and follow the Azure Code Sample section under Winnovative HTML to PDF Converter for Azure to connection with the HTML to PDF server you installed before.

Additionally, as Azure-Web-App-sandbox states as follows:

The following PDF generators are supported:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM