Print to a shared Printer

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF PrintManager for .NET (v1)  /  Print to a shared Printer

DynamicPDF PrintManager for .NET (v1) Forum

 Jun 28 2013 3:50 PM
Hello,
  We have a Windows XP machine that is sharing a printer connected to it via USB.  From my Windows 7 computer, I have added the shared printer to my local printers using the "Add a printer" wizard, going down the "Add a network, wireless or Bluetooth printer" route.

I can print to the printer using Notepad, but when I try to print to that printer using code, I am getting an error:

"Print job could not be created in the spooler. Error code:3003"

The code is the basic sample:

Dim testJob As New PrintJob(printerName, "C:\temp\test.pdf")
testJob.Print()

Where printerName is the name of the printer.

Is this the correct procedure?  Do I need to get a network addressable device (ex. JetDirect card) to print directly to the printer instead of through the share?

Thanks in advance.
 Jul 01 2013 9:51 AM
Posted by a ceTe Software moderator
Hello,

You can use the UNC path to print to the network printer. Please see the code below.

Dim testJob As New PrintJob(“\\computername\printername”, "C:\temp\test.pdf")
testJob.Print() 

If you still see this or a different error message after using the UNC path, please forward the following information to support@cete.com so we can look into it.

1. Printer model used.
2. Is the Win 7 machine 32-bit or 64-bit?
3. Is the Win XP machine 32-bit or 64-bit?
4. Complete error message including the stack trace.

Thanks,
ceTe Software Support Team.
 Jul 01 2013 1:23 PM
Perfect!  That's what I was looking for.  Originally I thought I had to add it to my local printers.

Thanks for your help.

All times are US Eastern Standard time. The time now is 8:59 AM.