Author | Topic: Printing using ?/?? | |
---|---|---|
JAYARAM MYSORE | Printing using ?/?? on Sat, 15 Aug 2009 05:27:38 +0530 I have to a greater extent migrated from Clipper 87 to Xbase in non GUI mode. My problem now is with printing. I am able to print like in Clipper 87 by turning off the print spooler and using ?/?? commands All my reports are output to a text file using ?/?? command. example file is attached Now please help me in printing this TEST.DOC from with in the appliaction using print spooler on and printer system Is there a easy method? CAN SOMBODY SHOW THEIR CODE FOR PRINTING? | |
AUGE_OHR | Re: Printing using ?/?? on Sat, 15 Aug 2009 05:21:49 +0200 hi, >I have to a greater extent migrated from Clipper 87 to Xbase in non GUI >mode. My problem now is with printing. why ? > I am able to print like in Clipper 87 by turning off the print spooler and > using ?/?? commands Xbase++ is compatible to Cl*pper v5.2e so you can still use most of S87 > All my reports are output to a text file using ?/?? command. example file > is attached no attachment > Now please help me in printing this TEST.DOC from with in the appliaction > using print spooler on and printer system did you try it ? as Xbase++ is compatible just try it > Is there a easy method? > CAN SOMBODY SHOW THEIR CODE FOR PRINTING? look into "your" Source ... you must not use "GUI-Printing", but than you cant get any benefit from it. *** Code *** SET CONSOLE OFF *SET PRINTER TO LPT2 SET PRINT ON use PRINT ON IF _2FILEFLAG() if print to file SET PRINTER TO C:\TEMP\Artikel.prn ENDIF some ESC Printer Code ?? CHR( 27 ) + CHR( 64 ) ?? CHR( 27 ) + CHR( 80 ) ? ' ' ? DTOC( DATE() ) .... EJECT *SET PRINTER TO LPT1 SET PRINT OFF SET CONSOLE ON ************************************************** or using @ x,y SAY SET CONSOLE OFF SET DEVICE TO PRINT use DEVICE ... @ 1, 71 SAY DTOC( DATE() ) ... EJECT SET CONSOLE OFF reset Printer * SET PRINTER TO LPT2 SET PRINT ON ?? CHR( 27 ) + CHR( 80 ) ?? CHR( 27 ) + CHR( 64 ) * SET PRINTER TO LPT1 SET PRINT OFF IF _2FILEFLAG() SET PRINTER TO ENDIF SET DEVICE TO SCREEN reset DEVICE SET CONSOLE ON *** Eof also my S87 Code for "debug" still work under GUI in background if need. *** Code *** still work in Xbase++ GUI SET ALTER TO MyDeBUG.TXT SET CONSOLE OFF SET ALTER ON ? blabla SET ALTER OFF SET CONSOLE ON SET ALTER TO ... Cl*pper IF PrintNow() RUN("COPY MyDeBUG.TXT >LPT1:") IF EjectNow() RUN("echo ? >LPT1") ENDIF ENDIF greetings by OHR Jimmy | |
Jack Duijf | Re: Printing using ?/?? on Sat, 15 Aug 2009 12:22:40 +0200 Hello, Check the ISPRINTER post of 13-08-2009 12:10 in the bugreport. Regards, Jack Duijf "JAYARAM MYSORE" schreef in bericht news:21ad16ed$458fe8bc$4d4c7@news.alaska-software.com... >I have to a greater extent migrated from Clipper 87 to Xbase in non GUI >mode. My problem now is with printing. > I am able to print like in Clipper 87 by turning off the print spooler and > using ?/?? commands > All my reports are output to a text file using ?/?? command. example file > is attached > Now please help me in printing this TEST.DOC from with in the appliaction > using print spooler on and printer system > Is there a easy method? > CAN SOMBODY SHOW THEIR CODE FOR PRINTING? > > | |
JAYARAM MYSORE | Re: Printing using ?/?? on Sun, 16 Aug 2009 13:28:50 +0530 Dear Jack, Thank you for your help. I have done the following and I am able to print. But I do not have control over FONT and it's size. I want all the out put in Courier 10 point size aList := xbpPrinter():New():List() if ValType(aList) <> "A" aList := {} endif if Len(aList) >0 cPrinter = aList[2] oPrinter := xbpPrinter():New():Create(cPrinter, PRN_Q_TEXT ) nStatus := oPrinter:PrinterStatus() cMsg := "" do while nStatus <> XBPPRN_STATUS_READY do case case nStatus = XBPPRN_STATUS_OFFLINE cMsg := "is off line." case nStatus = XBPPRN_STATUS_NOPAPER cMsg := "out of paper." otherwise cMsg := "not ready." endcase cMsg :=AllTrim(oPrinter:devname) + cMsg DO ERRMESG WITH cMsg MsgBox(cMsg) nStatus := oPrinter:PrinterStatus() Enddo SET PRINTER TO OBJECT oPrinter SET PRINTER ON SET CONSOLE OFF endif <Jack Duijf> wrote in message news:61700b3c$1999003f$4d569@news.alaska-software.com... > Hello, > > Check the ISPRINTER post of 13-08-2009 12:10 in the bugreport. > > Regards, > Jack Duijf > > "JAYARAM MYSORE" schreef in bericht > news:21ad16ed$458fe8bc$4d4c7@news.alaska-software.com... >>I have to a greater extent migrated from Clipper 87 to Xbase in non GUI >>mode. My problem now is with printing. >> I am able to print like in Clipper 87 by turning off the print spooler >> and using ?/?? commands >> All my reports are output to a text file using ?/?? command. example >> file is attached >> Now please help me in printing this TEST.DOC from with in the appliaction >> using print spooler on and printer system >> Is there a easy method? >> CAN SOMBODY SHOW THEIR CODE FOR PRINTING? >> >> > | |
James Loughner | Re: Printing using ?/?? on Sun, 16 Aug 2009 10:26:55 -0400 1) you need to use esc codes to control the printer. note some printers may not be able to do this and some may not print at all from RAW data. 2) If you want full control over any Windows capable printer you must use graphic printing and print through the print driver. Jim JAYARAM MYSORE wrote: > Dear Jack, > Thank you for your help. > > I have done the following and I am able to print. But I do not have control > over FONT and it's size. I want all the out put in Courier 10 point size > > aList := xbpPrinter():New():List() > if ValType(aList) <> "A" > aList := {} > endif > if Len(aList) >0 > cPrinter = aList[2] > oPrinter := xbpPrinter():New():Create(cPrinter, PRN_Q_TEXT ) > nStatus := oPrinter:PrinterStatus() > cMsg := "" > do while nStatus <> XBPPRN_STATUS_READY > do case > case nStatus = XBPPRN_STATUS_OFFLINE > cMsg := "is off line." > case nStatus = XBPPRN_STATUS_NOPAPER > cMsg := "out of paper." > otherwise > cMsg := "not ready." > endcase > cMsg :=AllTrim(oPrinter:devname) + cMsg > DO ERRMESG WITH cMsg > MsgBox(cMsg) > nStatus := oPrinter:PrinterStatus() > Enddo > SET PRINTER TO OBJECT oPrinter > SET PRINTER ON > SET CONSOLE OFF > endif > > > > > <Jack Duijf> wrote in message > news:61700b3c$1999003f$4d569@news.alaska-software.com... >> Hello, >> >> Check the ISPRINTER post of 13-08-2009 12:10 in the bugreport. >> >> Regards, >> Jack Duijf >> >> "JAYARAM MYSORE" schreef in bericht >> news:21ad16ed$458fe8bc$4d4c7@news.alaska-software.com... >>> I have to a greater extent migrated from Clipper 87 to Xbase in non GUI >>> mode. My problem now is with printing. >>> I am able to print like in Clipper 87 by turning off the print spooler >>> and using ?/?? commands >>> All my reports are output to a text file using ?/?? command. example >>> file is attached >>> Now please help me in printing this TEST.DOC from with in the appliaction >>> using print spooler on and printer system >>> Is there a easy method? >>> CAN SOMBODY SHOW THEIR CODE FOR PRINTING? >>> >>> > > | |
Carlos A Beling | Re: Printing using ?/?? on Sat, 15 Aug 2009 10:54:55 -0300 Helo Jayaram: good morning. You will can not printing this way using the new one printers. Beling Cheers JAYARAM MYSORE escreveu: > I have to a greater extent migrated from Clipper 87 to Xbase in non GUI > mode. My problem now is with printing. > I am able to print like in Clipper 87 by turning off the print spooler and > using ?/?? commands > All my reports are output to a text file using ?/?? command. example file > is attached > Now please help me in printing this TEST.DOC from with in the appliaction > using print spooler on and printer system > Is there a easy method? > CAN SOMBODY SHOW THEIR CODE FOR PRINTING? > > |