Printing PDF Or Scanned Document Via ASP.NET at network Printer
Hi Friends !
Can anyone help? Its an urgent.
I wanted to print PDF Document or Scanned Document Through
my .aspx page .By just clicking a button.I'm not using
codebehind.I want to do printing at my network printer.
I'm using System.Diagnosics.Process Namespace for calling
the print process at the server where i want to do my
printing.I'm only able to run Command.exe and notepad
process. Please help.
My code :
Public Sub PrintDoc(sender as Object, ev As EventArgs)
dim ERROR_FILE_NOT_FOUND As Integer = 2
dim ERROR_ACCESS_DENIED As Integer = 5
Dim myProcess As New Process()
myProcess.StartInfo.Verb = "Print"
myProcess.StartInfo.CreateNoWindow = True
Catch e As Win32Exception
If e.NativeErrorCode = ERROR_FILE_NOT_FOUND
Response.Write(((e.Message + ". Check the
If e.NativeErrorCode = ERROR_ACCESS_DENIED
' Note that if your word processor might
' such as this, which are handled first.
Response.Write(((e.Message + ". You do
not have permission to print this file.")))
if Not myProcess.HasExited Then
Re: Printing PDF Or Scanned Document Via ASP.NET at network Printer
Your access is limit due to the security permission granted to the
default ASP.NET user. You can change the user by using Identity tag in
Anyway refer to that sample that shows how to print via network printer:
You also might look at the following KB :
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|All times are GMT. The time now is 02:52 PM.|
SEO by vBSEO ©2010, Crawlability, Inc.