在Azure中托管Winnovative HTML到PDF转换器 [英] Hosting Winnovative HTML to PDF Converter in Azure

查看:127
本文介绍了在Azure中托管Winnovative HTML到PDF转换器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将ASP.NET MVC 5应用程序移植到Azure托管.我们希望将应用程序托管在Azure App Service中.我的依赖之一是Winnovative的HTML到PDF转换器.该转换器不能在Web服务中使用,这是该软件的一个众所周知的问题. Winnovative的建议是:

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:

对于必须在Azure网站中使用转换器并且无法将Web应用程序部署为Azure Web角色或辅助角色或将其安装在Azure虚拟机上的情况,我们开发了一种包含可提供服务的解决方案部署为单独的Azure Worker角色和客户端库,您可以将它们直接链接到Azure网站中,以使该服务对您完全透明.

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.

我已经下载了该软件,并尝试将其托管在App Service中,但这没有用(可能是由于相同的根本原因,导致转换器在我们的主应用程序中无法使用).所有用于托管服务的说明都说是将其托管在Web角色中还是在Worker角色中,但是Azure已弃用了这些说明.如何使用当前的Azure选项托管服务?

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?

推荐答案

对于 Azure网站,我们开发了一种解决方案,其中包含可以作为单独的Azure Worker角色部署的服务可以直接链接的客户端库进入您的Azure网站,以使该服务对您完全透明.客户端库的API与通用.NET库API几乎相同.

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.

您可以单击将HTML下载到适用于Azure的HTML到PDF Converter v14.4 ,以下载解决方案.然后,您需要将HTML安装到PDF Server.根据 Readme.txt 文件中的说明,您可以按照以下步骤安装服务器:

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:

  • 在Azure云服务中运行HTML到PDF Server

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

对于Azure云服务辅助角色,您可以在Server\Azure\TCP_Service文件夹下找到它.还有Azure云服务Web角色 可以在Server\Azure\Web_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.

在Windows服务中运行HTML到PDF Server,您可以使用Azure VM

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

有关将HTML安装到PDF Server的更多详细信息,您可以按以下方式检查Readme.txt文件:

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

对于您的客户,您可以参考WnvHtmlToPdf-Azure-v14.4\Demo下的示例,也可以直接参考NuGet包

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.

此外,作为 Azure-Web-App-sandbox 状态如下:

支持以下PDF生成器:

The following PDF generators are supported:

  • EVOPDF:请参见 http://www.evopdf.com/用于供应商解决方案的azure-html-to-pdf-converter.aspx
  • Rotativa/wkhtmltopdf:要求网站在Basic或更高版本中运行.
  • NReco PdfGenerator(wkhtmltopdf):需要基本或更高订阅计划
    • EVOPDF: See http://www.evopdf.com/azure-html-to-pdf-converter.aspx for vendor solution
    • Rotativa / wkhtmltopdf: requires the site to run in Basic or higher.
    • NReco PdfGenerator (wkhtmltopdf): requires subscription plan Basic or higher
    • 这篇关于在Azure中托管Winnovative HTML到PDF转换器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆