- Code: Select all Expand view
aPrnAry:=aGetPrinters()
cPrinter:=aPrnAry[2]
PRINT oPrn DOC cDoc TO cPrinter
does not work because it cannot find the printer.
I have checked the printer.prg and I have realised that the lines below commented
- Code: Select all Expand view
cPrinter := GetProfString( "windows", "device" , "" )
WriteProfString( "windows", "device", cModel )
SysRefresh()
PrinterInit()
::hDC := GetPrintDefault( GetActiveWindow() )
SysRefresh()
WriteProfString( "windows", "device", cPrinter )
instead of them the lines below added
- Code: Select all Expand view
PrinterInit()
DeleteDC( ::hDC )
::hDC = PrinterDCfromName( cModel )
But the print system cannot find the printer to print.
Regards,
Birol BETONCU