Loading ...

DotNet Printing from Windows 7 to Printer on Windows XP

Who is online?  0 guests and 0 members
home  »  forums   »  basic asp.net   »  web forms   » DotNet Printing from Windows 7 to Printer on Windows XP

DotNet Printing from Windows 7 to Printer on Windows XP

Posts under the topic: DotNet Printing from Windows 7 to Printer on Windows XP

Posted: 9/5/2011

vikas.athawalegmail.com
V A
Lurker 10  points  Lurker
  • Joined on: 9/5/2011
  • Posts: 2

I have "HP LaserJet 1022" printer installed on Windows XP machine (SSS4).
My ASP.NET 2.0 Published Website is installed on Windows 7 machine.
The corresponding printer driver (lj1020_1022-HB-pnp-win32-en) is installed on Windows 7 machine.
Both the machines are under same workgroup.
At Windows level, the Print Request from Windows 7 machine to the Printer on XP is processed successfully.

Through the Published Website, The Print Request is given as :-
Dim rptChq As New ReportDocument
rptChq.PrintOptions.PrinterName = "\\SSS4\HP LaserJet 1022"
rptChq.PrintToPrinter(1, True, 1, 1)

It gives "Invalid Printer specified."

Can anyone suggest a solution?


Posted: 9/12/2011

Starter 727  points  Starter
  • Joined on: 6/6/2011
  • Posts: 74

Hi,

Try to change the line:

rptChq.PrintOptions.PrinterName = "\\SSS4\HP LaserJet 1022"

with line:

rptChq.PrintOptions.PrinterName = @"\\SSS4\HP LaserJet 1022"

Best Regards,

Gjorgji


Page 1 of 1 (2 items)