USB Printing
Moderator: Rathinagiri
Re: USB Printing
A PCI paralell port for your new PC costs about U$D 5.-
Angel Pais
Web Apps consultant/architect/developer.
Web Apps consultant/architect/developer.
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: USB Printing
Thanks, I know they are cheap!
Serge
Serge
There's nothing you can do that can't be done...
Re: USB Printing
This harbour function will also do the job:
Also see:
c:\hmg.3.4.4\HARBOUR\contrib\hbwin\tests\prn2.prg
Theo
You can use the port used in Windows. I used it also with USB ports.PrintFileRaw()
Print a file to a windows printer in RAW mode.
SYNTAX
PrintFileRaw() -->
ARGUMENTS
<cPrinter> = a valid windows printer name<cFileName>= a valid filename that exists and can be printed<cDocName> = option text to appear as the document name in the spooler
DESCRIPTION
This function prints a file to a windows printer in RAW mode.
EXAMPLES
FUNCTION MAIN()
LOCAL cPrinter:= GETDEFAULTPRINTER(), cFileName:="MyFile.Txt"
LOCAL nPrn:= -1, cMess:= "PrintFileRaw(): "
IF !EMPTY(cPrinter)
IF (nPrn := PrintFileRaw(cPrinter,cFileName)) < 0
DO CASE
CASE nPrn = -1
Alert(cMess+"Incorrect parameters passed to function")
CASE nPrn = -2
Alert(cMess+"WINAPI OpenPrinter() call failed")
CASE nPrn = -3
Alert(cMess+"WINAPI StartDocPrinter() call failed")
CASE nPrn = -4
Alert(cMess+"WINAPI StartPagePrinter() call failed")
CASE nPrn = -5
Alert(cMess+"WINAPI malloc() of memory failed")
CASE nPrn = -6
Alert(cMess+"WINAPI CreateFile() failed - File "+cFileName+" not found??")
OTHERWISE
Alert(cFileName+" PRINTED OK!!!?")
ENDCASE
ENDIF
ENDIF
RETURN(NIL)
Also see:
c:\hmg.3.4.4\HARBOUR\contrib\hbwin\tests\prn2.prg
Theo
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: USB Printing
Hmmm.. I got a serious kob to investigate all possibilities !
Thx all !
Serge
Thx all !
Serge
There's nothing you can do that can't be done...
Re: USB Printing
PrinFileRaw
He usado esta herramienta con excelente resultado.
Si La recomiendo.
He usado esta herramienta con excelente resultado.
Si La recomiendo.
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: USB Printing
Just to let you know that this option did the job:
In the calling batchfile which afterwards caal the EXE.
So no changes to my EXE...
Thanks for all for helping!
Serge
Code: Select all
net use lpt1: \\pc1\EPSON
So no changes to my EXE...
Thanks for all for helping!
Serge
There's nothing you can do that can't be done...
Re: USB Printing
Serge,
I hmg you can do as follows
I send 2 parameters to print procedure DI and PR
I have also added a pinter on one computer
to send to a different computer I add a port
port is \\different\star
then make the port for the printer this port. then you print to installed on local computer but prints to other ..Works good.
Franco
I hmg you can do as follows
I send 2 parameters to print procedure DI and PR
Code: Select all
di := 'DIRECT'
pr := '\\PR1\STAR'
if upper(di) = 'DIRECT'
SELECT PRINTER PR TO LSUCCESS ; //PREVIEW ;
ORIENTATION PRINTER_ORIENT_PORTRAIT ;
QUALITY PRINTER_RES_MEDIUM
else
SELECT PRINTER P1 TO LSUCCESS PREVIEW ;
ORIENTATION PRINTER_ORIENT_PORTRAIT ;
QUALITY PRINTER_RES_MEDIUM
endif
If lSuccess == .T.
*PrintDoc()
Else
MsgInfo('Print Not Available')
return
EndIf
create print area here.
to send to a different computer I add a port
port is \\different\star
then make the port for the printer this port. then you print to installed on local computer but prints to other ..Works good.
Franco
All The Best,
Franco
Canada
Franco
Canada
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: USB Printing
Thx, Franco !
I also replied to you in Private Mail.Please have a look!
Serge
I also replied to you in Private Mail.Please have a look!
Serge
There's nothing you can do that can't be done...