【发布时间】:2014-03-17 11:18:18
【问题描述】:
我正在使用 wkhtmltopdf 将页面转换为 pdf,但是当我想通过用户名和密码转换受保护的页面时,站点将 url 重定向到另一个请求用户名和密码的页面,尽管用户已经登录。
转换的方法使用进程var p = new System.Diagnostics.Process()
{
StartInfo =
{
FileName = pdfHtmlToPdfExePath,
Arguments = ((options == null) ? "" : String.Join(" ", options)) + " " + urlsSeparatedBySpaces + " " + outputFilename,
UseShellExecute = false, // needs to be false in order to redirect output
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = false, // redirect all 3, as it should be all 3 or none
WorkingDirectory = HttpContext.Current.Server.MapPath(outputFolder)
}
};
有人知道如何解决这个问题吗?
【问题讨论】:
-
你现在有工作版本吗?
-
@Dhara 我得到了这个工作,但几年前我离开了这个项目,很抱歉我没有解决方案。
-
哦!不是问题:) @Fakhry
标签: pdf wkhtmltopdf