不将表单asp.net页面转换为pdf [英] Not Converting form asp.net page to pdf

查看:73
本文介绍了不将表单asp.net页面转换为pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public void pdf()
   {
       try
       {
           Process p = new Process();
           p.StartInfo.UseShellExecute = false;
           p.StartInfo.FileName = @"C:\Program Files (x86)\wkhtmltopdf\wkhtmltopdf.exe";// HttpContext.Current.Server.MapPath("wkhtmltopdf.exe");
           p.StartInfo.Arguments = "http://localhost:7035/PolosysWebERP5.2_1/ACCOUNTS/Reports/LedgerReport.aspx" + HttpContext.Current.Server.MapPath("~") + @"\pdf\NEWPAGE.pdf";
           p.StartInfo.CreateNoWindow = true;
           p.StartInfo.RedirectStandardOutput = true;
           p.Start();
           p.WaitForExit();
       }
       catch (Exception ex)
       {
           Console.WriteLine(ex.Message);
       }
   }





没有错误没有制作pdf?如何调试任何正文都有任何想法。



not getting error not making pdf? how to debug any body have any idea.

推荐答案

你需要做的就是打开 http:// localhost:7035 / PolosysWebERP5.2_1 / ACCOUNTS / Reports / LedgerReport.aspx [ ^ ]



调试moe中的页面并检查是否有任何错误。一旦你完成了发布你的项目并放置在其他系统并尝试转换为pdf,你将看到它的工作原理。



我经历过同样的问题,所以我知道痛苦。 Plz试着让我知道。
Well what you need to do is opening "http://localhost:7035/PolosysWebERP5.2_1/ACCOUNTS/Reports/LedgerReport.aspx[^]"

your page in debug moe and check if any error is coming. Once you are done with that publish your project and place in some other system and try converting to pdf and you will see the magic that it works.

I have experienced the same problem so i know the pain. Plz try and let me know.


这篇关于不将表单asp.net页面转换为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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