关于PDF打印vai asp.net [英] Regarding PDF printing vai asp.net

查看:49
本文介绍了关于PDF打印vai asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用C#代码以pdf格式打印发票.pdf的所有设置均照常进行,在我的本地计算机上可以正常工作,但是当通过创建虚拟目录将其部署在本地主机上或将pdf文件部署到Web服务器时无法打印.

请帮我..

我认为应该是问题的小段代码-----

Hi,

I am using C# code to print an invoice in pdf format.All the settings of pdf are done as usual,on my local machine it works fine,but when it is deployed on localhost by making virtual directory or deployed to web server the pdf file not gets printed.

Pls help me..

little piece of code where I thought the problem should be is-----

filename=Server.Mappath("~/Inv/1.pdf")
document.Save(filename);
document.Close();
document.Dispose();
Process.Start(filename);

推荐答案

尝试在web.config中更改服务器安全策略

Try the server security policy changes in web.config

<securitypolicy>
  <trustlevel name="Full" policyfile="internal" />
</securitypolicy>


这篇关于关于PDF打印vai asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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