Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vfp on the fly printing...

Status
Not open for further replies.

digitalquatro

Programmer
Nov 11, 2002
22
MX
Hi...
I need to print some info to a printer...

i send the following info...

set console off
set printer on
set device to printer
@prow(),col() say "Whatever..."
set console off
set printer on
set device to printer

Doesn't comes out to the printer until i....

set printer to

Why?...
Thank's in advance...
 
Windows printers print a page at a time, so it can't send a page to the printer until the page is complete (with a Form Feed). This is due to many factors, such as Laser Printers must imprint a whole page at once.

Also, the windows print spooler can be set to spool a whole JOB before sending anything to the printer, so not just the page, but the whole print job must complete before you see output.
 
Just a thought on Mike's comment ...

>>>You can force the page to eject by doing either:

>>>@ 0,0 SAY ""

While it is true that it will force a page eject, it might also leave the printer with another page which has been begun but not ejected. Granted, it will have no visible characters on it. But it may get ejected prior to the beginning of the next print job.

Not sure about this. Just a thought.








Don


 
Csr,

I just tried @ 0,0 SAY "" and it didn't cause the behaviour you described -- at least, not on my trusty Laserjet. But you made a good point. Maybe printing CHR(12) would be better. I'm not sure.

Mike


Mike Lewis
Edinburgh, Scotland
 
ok...i did what mike lewis says but that one ejects the page ...see what i'm printing it's something like a customer receipt...in a matrix printer...

Kind Regards...
 
Hi,
what about usingthe 'eject' or 'eject page' command ?
-Bart
 
What i want to print is a customer receipt..like the old days...Eg. dBase
I dont want an ejected page..once the printing is finished
 
digitalquatro,

Do you mean that the printer doesn't print anything until after you issue the "set printer to" statement? I mean when you do some @say lines with the output directed to the printer, your dot-matrix printer doesn't start printing until the "set printer to" statmenet is executed?

Sometimes a Keyword Search on this forum will give you the answer you need. Please see thread184-534590 for one possible solution. Let us know if that gives you what you need.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
I'm already do that...Thank's slighthaze.

What i don't want it's an ejected page...i need that the printer stays in the last printed line...

Kind regards
 
digitalquatro,

One other thing you could try: Wrap the whole of the printing in a PRINTJOB ... ENDPRINTJOB:

PRINTJOB
@prow(),col() say "First receipt"
@prow(),col() say "Second receipt"
ENDPRINTJOB

Do NOT do a page eject, or any other command to force a page throw.

I'm not sure whether the SET DEVICE should go before or after the PRINTJOB, but you can experiment with that.


Mike



Mike Lewis
Edinburgh, Scotland
 
Is your receipt being printed on pre-printed paper? That is, is every receipt the same height?

You can adjust the printer's properties at start -> Settings ->Printers, and create a paper size of just the right height, so that when you page eject, it positions correctly, instead of feeding 11" of paper.
 
Look What i've done for a customer receipt...
All we got to do is in the properties printer page setup select the Tractor option instead of Form feed...What did "Form feed does?" Ejects the page...and if your printer driver has the ability to modify or choose an envelope...Listo...you got a customer receipt and the printer doesn't ejects the page.

Hope this can help...
Kind regards...
 
SET PRINTER TO is the command to redirect the printer port to the default port, usually LPT1. If you provided a destination you could also redirect to LPT2 or write the output to a file. In your case you are not really redirecting, but simply forcing the print job to go out, clearing the buffer, so to speak.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top