Re: OposPosPrinter
Posted: Fri Jan 15, 2021 12:33 am
Hola a todos :
funcionando a medias pude imprimir 2 mensajes mediante OPOS (OLE Point of Sale) en una impresora LDN (logical device names) con este codigo
no funciona oOposPrinter:CutPaper(100) pero al usar la aplicacion que viene con los drivers y hacer un test de impesion sale en el papel las 2 lineas mencionadas
los ejemplos en la web no indican otros metodos para que el buffer fuera impreso antes de desconetar la impresora y cerrar la conexion 
funcionando a medias pude imprimir 2 mensajes mediante OPOS (OLE Point of Sale) en una impresora LDN (logical device names) con este codigo
Code: Select all
*----------------------------------------------------------------------------*
procedure CreaRPT005()
*----------------------------------------------------------------------------*
/* Technically,
it's Open() / ClaimDevice() / DeviceEnabled = TRUE / DeviceEnabled = FALSE / ReleaseDevice() / Close().
Open() requests a handle to the named device, and should work if the device exists.
Close() is the matching pair function, and it should be called when the device is no longer needed by the application.
ClaimDevice() (previously known as ... */
IF ( oOposPrinter := CreateObject( RPT005 ) ) != NIL
lOposSuccess := oOposPrinter:open("RPT005")
If lOposSuccess := .T.
msgdebug( oOposPrinter , lOposSuccess )
oOposPrinter:ClaimDevice(1000)
oOposPrinter:DeviceEnabled := .T.
oOposPrinter:PrintNormal(2, "Test")
oOposPrinter:PrintNormal(2, "LDN RPT005")
oOposPrinter:CutPaper(100)
oOposPrinter:ReleaseDevice()
oOposPrinter:Close()
