Loading...

Select something other than default printer

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Select something other than default printer

Postby varcarme » Mon Mar 01, 2010 9:21 pm

Hi Loic

I'm trying to set the default 'active' printer with the code below but my report always goes to the windows default printer and not the one I selected.

The line oImaging.PrintSetActivePrinter(nLoop) returns .f.

I'm using an XP machine logged in as administrator.

I wondered if you had any ideas?

Code: Select all

oImaging  = CreateObject("gdpicturepro5s.imaging")

oImaging.SetLicenseNumber("xxxxxxx")

nPrinters = oImaging.PrintGetPrintersCount()

cPrinter  = "My Printer"

FOR nLoop = 1 TO nPrinters

   cMatch = oImaging.PrintGetPrinterName(nLoop)
   
   IF cMatch == cPrinter
   
      oImaging.PrintSetActivePrinter(nLoop)
           
      EXIT
     
   ENDIF
   
NEXT nLoop

oImaging.PrintImageBySize(0,0,100,100)

varcarme
 
Posts: 40
Joined: Tue Feb 05, 2008 8:56 pm

Re: Select something other than default printer

Postby varcarme » Tue Mar 02, 2010 12:08 am

I see the problem Loic

I need to pass the printer name not the id...... :oops:
varcarme
 
Posts: 40
Joined: Tue Feb 05, 2008 8:56 pm


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 3 guests

cron