Author | Topic: How to print from Clipper POS application to USB | |
---|---|---|
Gert van der Wouden | How to print from Clipper POS application to USB on Fri, 06 Apr 2007 13:00:45 +0200 Does anyone know the steps I have to take to get printing on a USB connected printer to work from my Clipper POS application? From the ads I understood XBase was the answer to my problems, but we prefer to have a minimum of source changes to get things work. Clipper doesn't know about USB, but prints just on LPT-port connected printers. Any help is welcome. | |
Guido Twieling | Re: How to print from Clipper POS application to USB on Fri, 06 Apr 2007 18:36:49 +0200 Hi Gert, my old Clipper apps are printing well under XP with USB printers. You have to activate printerpool at the USB-printer portconfiguration. Then you can select all ports you want. Hope that helps. Guido "Gert van der Wouden" <gwouden@planet.nl> schrieb im Newsbeitrag news:720436f$1c56dc83$b4fb5@news.alaska-software.com... > Does anyone know the steps I have to take to get printing on a USB > connected > printer to work from my Clipper POS application? From the ads I understood > XBase was the answer to my problems, but we prefer to have a minimum of > source changes to get things work. > > Clipper doesn't know about USB, but prints just on LPT-port connected > printers. > > Any help is welcome. > > > 0079.jpg | |
Osvaldo Ramirez | Re: How to print from Clipper POS application to USB on Fri, 06 Apr 2007 13:22:14 -0600 Hello Gert van der Wouden I am using this in my batch program net use \\pc\printername lpt1: and share the USB Printer and done. set printe to lpt1 set pinter on ... etc etc HTH Osvaldo Ramirez | |
Gale Ford | Re: How to print from Clipper POS application to USB on Fri, 06 Apr 2007 14:23:35 -0500 Gert van der Wouden wrote: > Does anyone know the steps I have to take to get printing on a USB connected > printer to work from my Clipper POS application? From the ads I understood > XBase was the answer to my problems, but we prefer to have a minimum of > source changes to get things work. > > Clipper doesn't know about USB, but prints just on LPT-port connected > printers. > > Any help is welcome. > > > A number of printers need to print through windows driver. Even if you get the port configured it might not accept the characters from you Clipper applications. Even if you convert to xBase++ or (x)Harbour you may still need to print through Windows driver. You might try a product called Pagescript. If you convert to xBase++ or (x)Harbour you might still have to convert printing routines to Windows printing methods. | |
Regan Cawkwell | Re: How to print from Clipper POS application to USB on Tue, 10 Apr 2007 10:13:54 +0100 Hi Gert Gert van der Wouden wrote: > Does anyone know the steps I have to take to get printing on a USB connected > printer to work from my Clipper POS application? From the ads I understood > XBase was the answer to my problems, but we prefer to have a minimum of > source changes to get things work. > > Clipper doesn't know about USB, but prints just on LPT-port connected > printers. > > Any help is welcome. I presume you mean that you are doing this in Xbase++, not Clipper... If it's a USB POS printer and you still talk to it using textual commands/printing you can just share the print spooler for the USB port with a name (eg, receipt) and then print with something like: set printer to \\<your pc name>\receipt and all the rest of your code can be as before... You do not need to set the port for the printer to an LPT port at all. Regan Cawkwell Company : Real Business Applications Ltd Title : Technical Support Websites : www.rbauk.com Email : regan@rbauk.com ------------------------------------------------------ | |
DanAbel | Re: How to print from Clipper POS application to USB on Fri, 12 Oct 2007 15:13:31 -0400 We are looking into using the ability of SET PRINTER TO <network printer> as well... and this is what I have working: I prompt the user with a print dialog (XbpPrintDialog), and set a var to class it returns (lets call it oPrinter) Then: SET PRINTER TO OBJECT oPrinter This removes our dependancy on "hardcoded" printers in the app, and gives the user the ability to print to a different printer without getting tech support involved in re-configuring a locally installed printer... Just another way, Dan "Regan Cawkwell" <regan@rbauk.com> wrote in message news:52caec3a$1e0a3c0$309ce8@news.alaska-software.com... > Hi Gert > > Gert van der Wouden wrote: >> Does anyone know the steps I have to take to get printing on a USB >> connected >> printer to work from my Clipper POS application? From the ads I >> understood >> XBase was the answer to my problems, but we prefer to have a minimum of >> source changes to get things work. >> >> Clipper doesn't know about USB, but prints just on LPT-port connected >> printers. >> >> Any help is welcome. > > I presume you mean that you are doing this in Xbase++, not Clipper... > > If it's a USB POS printer and you still talk to it using textual > commands/printing you can just share the print spooler for the USB port > with a name (eg, receipt) and then print with something like: > > set printer to \\<your pc name>\receipt > > and all the rest of your code can be as before... > > You do not need to set the port for the printer to an LPT port at all. > > -- > Regan Cawkwell > Company : Real Business Applications Ltd > Title : Technical Support > Websites : www.rbauk.com > Email : regan@rbauk.com > ------------------------------------------------------ | |
Reinthaler Rudolf | Re: How to print from Clipper POS application to USB on Wed, 11 Apr 2007 12:26:17 +0200 Hello Gert there are converter programs like DOSPRINT, you can print to any windows printer without any change of code. regards Rudolf "Gert van der Wouden" <gwouden@planet.nl> schrieb im Newsbeitrag news:720436f$1c56dc83$b4fb5@news.alaska-software.com... > Does anyone know the steps I have to take to get printing on a USB > connected > printer to work from my Clipper POS application? From the ads I understood > XBase was the answer to my problems, but we prefer to have a minimum of > source changes to get things work. > > Clipper doesn't know about USB, but prints just on LPT-port connected > printers. > > Any help is welcome. > > > | |
Barry Jackson | Re: How to print from Clipper POS application to USB on Wed, 12 Mar 2008 00:40:50 +0000 Just read this and remember hitting this problem many years ago when an old dot matrix printer finally died. I have dug out the source and here is how I did it in Clipper 5.1 and Win98SE. I used the ability of WORDPAD to load files and print from the command line. Since at the time I also wanted to Fax the printouts I found that the standard plain text printouts were almost unreadable when faxed and so I also wrote a crude but effective .TXT to .RTF converter which allowed a good solid faxable printout to be made on the USB inkjet I had . (Also the RTF files could be faxed directly with WinFax) It ran seamlessly for years and did not upset the Clipper program as it ran in the background with no user intervention or third party software. It's a long time since I last used this, and it's not the most elegant solution but it does allow ANY printer to be used as long as it is the default Windows printer. Have fun! Barry Snippets from main routines :- * Open file for print. SET DEVICE TO PRINT SET PRINTER TO (txfilename) SET PRINTER ON do print job here --------------- Close print file SET PRINTER TO SET PRINTER OFF Reset device to screen SET DEVICE TO SCREEN Convert plain text file to RTF if you wish rtf_it(txfilename,rtfFileNameandPath) Print it to the default Windows printer runstring="dos_prin.bat "+rtfFileNameandPath This loads the RTF into Wordpad and prints it in the background RUN (runstring) That's it! The batch file dos_prin.bat is needed in the app home directory and is simply one line:- wordpad.exe %1 /p Wordpad.exe needs to be available - I put a copy in the app home directory. If you use the rtf_it function below - it needs two text files to be available - RTF_HEAD.txt and RTF_TAIL.txt ************************************************ RTF_IT This was devised by disecting an RTF and using the bare bones. * It does the job it was written for - nothing more! * FUNCTION rtf_it ( FileSource, FileTarget ) LOCAL rt_str, pk_str, EndOfLine, Linestr, p_handle FileSource = UPPER(FileSource) * Open file for read only p_handle = FOPEN(FileSource) Open file & get handle IF p_handle = -1 ? 'Error' IF FERROR() = 2 ? 'File not found '+FileSource ENDIF ENDIF rt_str = '' rt_str = rt_str + MEMOREAD('RTF_HEAD.TXT') * Read chunk of 5k into pk_str. pk_str = FREADSTR(p_handle,5000) DO WHILE LEN(pk_str)>0 EndOfLine = AT(chr(10),pk_str) Chars to end of line IF EndOfLine = 0 EndOfLine = LEN(pk_str) ENDIF Linestr = LEFT(pk_str,EndOfLine) Extract line * Routine to replace \ with \\ IF AT('\',Linestr)>0 private newline := '',ch := '',a := 0,loop :=0 a = LEN(linestr) FOR loop = 1 to a ch=substr(linestr,loop,1) newline = newline+IF(ch='\','\\',ch) NEXT linestr=newline ENDIF rt_str = rt_str+'\par '+linestr And add it to RTF pk_str = SUBSTR(pk_str,EndOfLine+1) Chop off line used * Re-fill file buffer if getting low IF LEN(pk_str)<200 pk_str = pk_str + FREADSTR(p_handle,2000) ENDIF ENDDO rt_str = rt_str + MEMOREAD('RTF_TAIL.TXT') FCLOSE(p_handle) MEMOWRIT(FileTarget,rt_str) RETURN nil RTF_HEAD.txt:- {\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern\fprq1 Courier New;}{\f3\froman Times New Roman;}} {\colortbl\red0\green0\blue0;} \deflang2057\pard\plain\f2\fs24\b RTF_TAIL.txt:- \par } -------------------------------------------------------------------------------------------------------------- "Gert van der Wouden" <gwouden@planet.nl> wrote in message news:720436f$1c56dc83$b4fb5@news.alaska-software.com... > Does anyone know the steps I have to take to get printing on a USB > connected > printer to work from my Clipper POS application? From the ads I understood > XBase was the answer to my problems, but we prefer to have a minimum of > source changes to get things work. > > Clipper doesn't know about USB, but prints just on LPT-port connected > printers. > > Any help is welcome. > > > |