如何运行从应用程序Appharbor(HTML为PDF生成)外部可执行? [英] How to run external executables from an Appharbor application (HTML to PDF generation)?

查看:214
本文介绍了如何运行从应用程序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.

这篇关于如何运行从应用程序Appharbor(HTML为PDF生成)外部可执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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