从vb.net2003 Web Appln打印pdf文件 [英] print a pdf file from vb.net2003 web appln

查看:65
本文介绍了从vb.net2003 Web Appln打印pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试从vb.net Web应用程序打印现有的pdf文件.
我正在使用vb.net2003.任何有pgm示例的人都请帮忙.
我尝试了此操作,但打印出空白页.任何人都找不到此代码的问题.

暗淡的pd为PrintDocument =新的PrintDocument
pd.DocumentName ="D:\ Test.PDF"
pd.OriginAtMargins = False
pd.PrinterSettings.PrinterName ="HP LaserJet P1500系列PCL 5e"
pd.PrintController()=新的System.Drawing.Printing.StandardPrintController
pd.Print()

Hi ALL,

I am trying to print an existing pdf file from vb.net webapplication.
I am using vb.net2003.Anyone having an example pgm please help.
I tried this but prints blank page .Can anyone find the problem with this code.

Dim pd As PrintDocument = New PrintDocument
pd.DocumentName = "D:\Test.PDF"
pd.OriginAtMargins = False
pd.PrinterSettings.PrinterName = "HP LaserJet P1500 Series PCL 5e"
pd.PrintController() = New System.Drawing.Printing.StandardPrintController
pd.Print()

推荐答案

写道:​​

Dim pd as PrintDocument = New PrintDocument
pd.DocumentName ="D:\ Test.PDF"
pd.OriginAtMargins = False
pd.PrinterSettings.PrinterName ="HP LaserJet P1500系列PCL 5e"
pd.PrintController()=新的System.Drawing.Printing.StandardPrintController
pd.Print()

Dim pd As PrintDocument = New PrintDocument
pd.DocumentName = "D:\Test.PDF"
pd.OriginAtMargins = False
pd.PrinterSettings.PrinterName = "HP LaserJet P1500 Series PCL 5e"
pd.PrintController() = New System.Drawing.Printing.StandardPrintController
pd.Print()



您的基本问题是您不了解ASP.NET的工作方式.这将在服务器的硬盘驱动器上的服务器计算机上打印PDF.您想要的是什么?

您无法做您想做的事情.



your basic issue is that you don''t get how ASP.NET works. This will print a PDF that is on the server''s hard drive, on the server computer. How is that what you want ?

You can''t do what you''re trying to do.


这篇关于从vb.net2003 Web Appln打印pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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