Loading...

SetActivePrinter = False when using a network printer

Discussions about document printing in GdPicture.NET using GdPictureImaging.

SetActivePrinter = False when using a network printer

Postby SIIYM » Wed Nov 25, 2009 3:35 pm

Hi,

When I try to use a network printer (ex. \\srvdc1\dell-3115) with GdViewer/GdPictureImaging, the function SetActivePrinter return a false value. I can't define my network printer and GdPicture use a default local printer. I dont wan't to declare my network printer in windows, but use the network path directly to print.

GdViewer viewer = new GdViewer();
string printer = @"\\SRVDC1\dell-3115";
bool result = viewer.SetActivePrinter(printer);

Is it a problem ?
SIIYM
 
Posts: 3
Joined: Tue Nov 10, 2009 11:50 am

Re: SetActivePrinter = False when using a network printer

Postby Loïc » Thu Nov 26, 2009 5:17 pm

Hi,

Are you sure to enter to correct name ?

here a basic test to see what printer are reachable and to make a test of connection:


Code: Select all
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For i As Integer = 1 To oGdPictureImaging.PrintGetPrintersCount
            MsgBox("Next selection is: " + oGdPictureImaging.PrintGetPrinterName(i))
            MsgBox(Imaging1.PrintSetActivePrinter(oGdPictureImaging.PrintGetPrinterName(i)))
        Next
    End Sub



Hope this helps.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: SetActivePrinter = False when using a network printer

Postby SIIYM » Tue Dec 01, 2009 4:42 pm

Hi,

Your code only give me the printers available on the local machine, even if some of these are plugged on a network. You can have the same list in the "Printers and Faxes" Windows menu.
Our previous component used by my company can print a document on a network or local printer, even if the printer is not added on the local machine, in my case a Windows 2003 Server.
I test several times but the fact is GdPicture can't reach a network printer if we don't have a reference in "Printers and Faxes".
I don't want to add each printer I want to use for printing but used directly its network path to launch printing process.

I hope you understand my problem.

Kind regards,

Yann.
SIIYM
 
Posts: 3
Joined: Tue Nov 10, 2009 11:50 am

Re: SetActivePrinter = False when using a network printer

Postby Loïc » Tue Dec 01, 2009 4:49 pm

Ok Yann,

I understand you better. Unfortunately, GdPicture.NET works only with printer (local or network) which are declared on the computer.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to Document Printing

Who is online

Users browsing this forum: No registered users and 1 guest