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.
Print to a shared Printer
Re: Print to a shared Printer
Support · Jul 1, 2013Hello,
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 [^a|mailto:support@cete.com|opennewwindow|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.
Re: Print to a shared Printer
Forum member · Jul 1, 2013Perfect! That's what I was looking for. Originally I thought I had to add it to my local printers.
Thanks for your help.