如何使用wkhtmltopdf.exe在ASP.net [英] How to use wkhtmltopdf.exe in ASP.net

查看:655
本文介绍了如何使用wkhtmltopdf.exe在ASP.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

10小时后,并尝试其他4 HTML到PDF的工具我即将准备爆炸。

After 10 hours and trying 4 other HTML to PDF tools I'm about ready to explode.

wkhtmltopdf 听起来像一个优秀的解决方案......问题是,我无法执行从asp.net足够的权限过程,以便...

wkhtmltopdf sounds like an excellent solution...the problem is that I can't execute a process with enough permissions from asp.net so...

Process.Start("wkhtmltopdf.exe","http://www.google.com google.pdf");

启动,但没有做任何事情。

starts but doesn't do anything.

有没有一种简单的方法之一:

Is there an easy way to either:

-a)允许asp.net启动过程(即实际上可以做的东西)或结果
-b)编译/包装/不管wkhtmltopdf.exe到我的财产以后可以从C#中使用这样的: WkHtmlToPdf.Save(http://www.google.com,google.pdf);

-a) allow asp.net to start processes (that can actually do something) or
-b) compile/wrap/whatever wkhtmltopdf.exe into somthing I can use from C# like this: WkHtmlToPdf.Save("http://www.google.com", "google.pdf");

推荐答案

您也可以使用 Pechkin

.NET包装器WkHtmlToPdf DLL,库,它使用的Webkit引擎
  转换成HTML页面的PDF。

.NET Wrapper for WkHtmlToPdf DLL, library that uses Webkit engine to convert HTML pages to PDF.

的NuGet包:

Pechkin.Synchronized

Pechkin

这篇关于如何使用wkhtmltopdf.exe在ASP.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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