Page 1 of 2
OposPosPrinter
Posted: Wed Jan 13, 2021 2:35 am
by danielmaximiliano
Hola a todos: me trajeron una impresora térmica 3nStar modelo RPT005
La configure en Windows bajo el nombre RPT005 la cual me aparece cuando hago un SelectPrinter.
La pregunta es.... La instalación viene con dos OCX , uno llamado OposPosPrinter.ocx y OPoSCashDrawer.ocx
Alguien trabajó con estos OCX.. quiero usarlos con con la impresora fiscal hasar 715F pero necesito saber los métodos de dichos OCX
Hi everyone, I got a 3nStar thermal printer model RPT005
I configure it in Windows under the name RPT005 which appears to me when I do a SelectPrinter.
The question is .... The installation comes with two OCXs, one called OposPosPrinter.ocx and OPoSCashDrawer.ocx
Someone worked with these OCX .. I want to use them with the hasar 715F fiscal printer but I need to know the methods of said OCX
- IMG_20210112_233437515_HDR.jpg (3.12 MiB) Viewed 2281 times
image sample
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 6:33 am
by mol
Maybe this printer can open cashdraw after finishing printing? Some kitchen/gastro printers can do that
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 7:00 am
by AUGE_OHR
hi,
there are different Tools to "view" a *.OCX
i use HTML Help COM Assistant
https://www.devcomponents.com/comassistant/
but do not expect too much ... it will not generate "Sample" or "Description"
it just show you Event, Property and Method so you get "Key-word" to do more search for Sample
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 6:00 pm
by franco
I have clients and myself using star and epson receipt printers. We mostly use Star, I like the best. I use a Star TSP100
To make the cutter work (if you have one) or cashdrawer which most star printers have a cash drawer cable outlet on bottom.
In my company file I have two fields. One is CASHDRAWER, the is CUTTER.
After the end of my print job before END PRINTPAGE.
Code: Select all
prline := prline+20
If CONTROLS->CUTTER = 'S' // S for Star ..... E for Epson
@ prline, -5 print chr(27)+ chr(100)+chr(01)
endif
if CONTROLS CASHDRAWER = 'S'
@ prline , -5 print chr(7)
endif
For the size on the body of receipt I use size 7
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 10:02 pm
by danielmaximiliano
Gracias a todos:
siguiendo el metodo que implemente para la impresora fiscal Hasar 715F registre los siguientes archivos, para registar se debe elevar los privilegios de administrador ya que solamente desde el cmd pude registrar solo los .dll
- 2021-01-13 18_53_45-Window.png (10.17 KiB) Viewed 2177 times
al inicio incluyo lo siguiente
Code: Select all
#include 'hmg.ch'
#include 'HFCL.CH'
#define RPT005 'OPOS.POSPrinter.1.14'
dentro del codigo
Code: Select all
Procedure Ventas()
*----------------------------------------------------------------------------*
PUBLIC oOposPrinter
CreaRPT005( )
Code: Select all
*----------------------------------------------------------------------------*
procedure CreaRPT005()
*----------------------------------------------------------------------------*
Return
IF ( oOposPrinter := CreateObject( RPT005 ) ) != NIL
despues seguire agregando las funciones y metodos que contiene el .ocx
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 10:34 pm
by Claudio Ricardo
Gracias Daniel...
Me será de gran ayuda ya que un cliente mío trabaja con dos impresoras 3nStar RPT005
Mi programa genera un .pdf que él imprime con Firefox o Sumatra (Solución de compromiso)
pero lo ideal sería imprimir directamente en la impresora.
Re: OposPosPrinter
Posted: Wed Jan 13, 2021 11:20 pm
by danielmaximiliano
Claudio Ricardo wrote: ↑Wed Jan 13, 2021 10:34 pm
Gracias Daniel...
Me será de gran ayuda ya que un cliente mío trabaja con dos impresoras 3nStar RPT005
Mi programa genera un .pdf que él imprime con Firefox o Sumatra (Solución de compromiso)
pero lo ideal sería imprimir directamente en la impresora.
no da error pero no logro imprimir, algo no estoy haciendo bien.
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
If ( oOposPrinter:open("RPT005") ) != NIL
oOposPrinter:ClaimDevice(1000)
oOposPrinter:AsyncMode := .T.
oOposPrinter:DeviceEnabled := .T.
//oOposPrinter:ResultCode
oOposPrinter:PrintNormal(2, "ddddddd")
oOposPrinter:CutPaper(100)
oOposPrinter:ReleaseDevice()
oOposPrinter:Close()
lOpen := .T.
Ventas.STATUSBAR.Item(1) := 'Impresora ' + oOposPrinter:DeviceName + ' Conectada '
else
Ventas.STATUSBAR.Item(1) := 'Impresora desconocida '
EndIf
Else
Msgbox ( ' No se puede inicializar la IMPRESORA ' , ' Mensaje de error !!! ' )
endIf
Return
Re: OposPosPrinter
Posted: Thu Jan 14, 2021 5:33 pm
by SALINETAS24
danielmaximiliano wrote: ↑Wed Jan 13, 2021 11:20 pm
Claudio Ricardo wrote: ↑Wed Jan 13, 2021 10:34 pm
Gracias Daniel...
Me será de gran ayuda ya que un cliente mío trabaja con dos impresoras 3nStar RPT005
Mi programa genera un .pdf que él imprime con Firefox o Sumatra (Solución de compromiso)
pero lo ideal sería imprimir directamente en la impresora.
no da error pero no logro imprimir, algo no estoy haciendo bien.
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
If ( oOposPrinter:open("RPT005") ) != NIL
oOposPrinter:ClaimDevice(1000)
oOposPrinter:AsyncMode := .T.
oOposPrinter:DeviceEnabled := .T.
//oOposPrinter:ResultCode
oOposPrinter:PrintNormal(2, "ddddddd")
oOposPrinter:CutPaper(100)
oOposPrinter:ReleaseDevice()
oOposPrinter:Close()
lOpen := .T.
Ventas.STATUSBAR.Item(1) := 'Impresora ' + oOposPrinter:DeviceName + ' Conectada '
else
Ventas.STATUSBAR.Item(1) := 'Impresora desconocida '
EndIf
Else
Msgbox ( ' No se puede inicializar la IMPRESORA ' , ' Mensaje de error !!! ' )
endIf
Return
Hola Daniel, una pregunta ingenua.. ¿has probado imprimir desde cualquier otro programa standard de Windows..?
No si desde oficce será posible, más que nada para verificar que esta correctamente instalada.
Un saludo,
Re: OposPosPrinter
Posted: Thu Jan 14, 2021 6:08 pm
by danielmaximiliano
SALINETAS24 wrote: ↑Thu Jan 14, 2021 5:33 pm
Hola Daniel, una pregunta ingenua.. ¿has probado imprimir desde cualquier otro programa standard de Windows..?
No si desde oficce será posible, más que nada para verificar que esta correctamente instalada.
Un saludo,
En Windows se agrega como impresora genérica y se instala sobre el puerto USB, se le asigna un nombre LDN y en base a ese Nombre se crea la conexión mediante el objeto OCX, la aplicación que viene con la impresora imprime perfecto , me costó hacer funcionar el OCX de la impresora fiscal hasar y está va por el mismo camino
Re: OposPosPrinter
Posted: Thu Jan 14, 2021 9:55 pm
by franco
I may be off track here but I do not know what ocx does,
I have no problems with these printers. As I stated above. I have a company control file with one record.
For printers I only have 2 fields . mine are Invoiceport and reportport. The report is for everything that is not an invoice and is set to default in my case.
REPORT Textbox "DEFAULT" field reportport
The invoice printer could also be default if system is using only 1 printer. If large invoices are using custom made invoices I use another
regular laser printer or normal printer with a different name.
INVOICE Texbox "hplaser' field invoiceport
When using star I install star using all star drivers. I have in the passed installed with generic text driver (not sure now it`s been a while.
mainly for dos programs. I THINK THEY NEED A PARALLEL PORT or COM PORT.
When Star is is invoice printer
INVOICE Textbox "STAR100" field invoiceport
IN PRINT PROGRAM:
DI := controls->invoiceport
select printer DI .................
maybe this ????
Franco