如何运行从应用程序Appharbor(HTML为PDF生成)外部可执行?

如何运行从应用程序Appharbor(HTML为PDF生成)外部可执行?

问题描述:

我要生成PDF的一个我的.NET Web应用程序目前托管于Appharbor的要求。

I have a requirement to produce PDF's for one my .Net web applications currently hosted on Appharbor.

传统上,我只想在计算机上安装的乳胶,并创建PDF与pdflatex苍蝇的。这个要求是HTML显示部分给最终用户,但也有一个下载的PDF - 所以它是略有不同。

Traditionally, I would simply install latex on the machine, and create PDF's on the fly with pdflatex. This requirement is to display sections in HTML to end users, but also have a downloadable PDF - so it's slightly different.

我已经发现了几个(免费)外部HTML到PDF转换器可能适用于这个实例。但是,我还没有发现任何库,允许我做这件事纯粹的编程。

I have found several (free) external HTML to PDF converters which may be applicable in this instance. However, I haven't found any libraries allowing me to do this purely programatically.

您有什么建议,如果我打算继续使用Appharbor?

What advice would you give if I plan to continue using Appharbor?

我应该成立一个单独的EC2(或类似)实例来运行这样的应用程序?还是有更好的选择。

Should I set up a seperate EC2 (or similar) instance to run such an application from? Or is there a better alternative?

我建议使用类似的 DocRaptor 。请注意,你也许可以与当前的计划继续,如果你把相关pdflatex可执行文件(它不要求整个乳胶运行时)和你们推到AppHarbor的代码。 AppHarbor也将引入背景工人的,这可能是非常适合这样的工作。

I'd recommend using something like DocRaptor. Note that you can probably continue with your current scheme if you place the relevant pdflatex executable (and it doesn't require the entire Latex runtime) alongside the code you push to AppHarbor. AppHarbor will also be introducing background workers, which might be a good fit for this sort of work.