I am not sure but I have done something of similar:
         G_PORTA=GetDefaultPrinter()
         G_PORTA =PrinterPortToName(G_PORTA)
         set printer to &G_PORTA


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ciro Vargas
Clemow
Sent: Monday, September 29, 2008 6:56 PM
To: Harbour Project Main Developer List.
Subject: [Harbour] st printer to diferences between harbour and xharbour


Hi all:

with the next code using an HP  USB pcl printer I obtain a valid print
test

but in harbour I obtain a file named (printer name) plus ".prn"


why is the concept diference ?

wich is correct ?

regards
Ciro

clear
?? 'Print test'
?  '---------------------------------'
? SET(_SET_DEVICE)
aPrinter:=GetPrinters()
IF EMPTY(aPrinter)
    ? '----- No Printers installed'
ELSE
    set printer to (GetDefaultPrinter())
    ? SET(_SET_PRINTER)
    ? SET(_SET_PRINTFILE)
     set console off
     set printer on

      ? 'Default Printer'
      ?'----------------'
       ? GetDefaultPrinter()
       ?
       ? 'Printers Available'
       ?'-------------------'
       FOR x:= 1 TO LEN(aPrinter)
         ? aPrinter[x]
       NEXT x
       aPrinter:= GetPrinters(.T.)
       ? 'Printers and Ports'
       ?'-------------------'
       FOR x:= 1 TO LEN(aPrinter)
         ? aPrinter[x,1]+' on '+aPrinter[x,2]
       NEXT x
       EJECT
       set printer off
       set console on
       set printer to
  ENDIF
  ? SET(_SET_PRINTER)
  ? SET(_SET_DEVICE)
   WAIT


-- 
http://sistemascvc.tripod.com  (la casa del clip2win y nodosimp / the
no2imp and 
clip2win home )

http://www.oohg.org ( Object Oriented Harbour GUI, more simple, more
powerfull )


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to