Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing with ??? in VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00510398
Message ID:
00512590
Views:
11
Got this bugger !

Here's the sequence to use :
SET PRINTER TO
SET PRINTER TO NAME GetPrinter()
??? " "
SET PRINTER ON
?"line 1"
SET PRINTER OFF
SET PRINTER TO
The mistake we made was that the ??? command is a printer-command by itself. Logic, huh ? well, not that much ...
It took me quite a number of hours to find the problem, since a laser-printer works fine with the SET PRINTER ON before the ???. However, luckily such a printer makes some noise when it receives data, though no paper comes out. This got me thinking ... BTW you can see this too, because as soon as you perform the ??? the printer-busy icon appears in the taskbar.
So I attached a matrix-printer, and there your problem was. Thus, you have a matrix !
And indeed, at the matrix an eject comes first.
Anyhow, the above sequence solves all, and now you must be able to perform what I said earlier : just start with the ??? " " and all works fine. However the following additional notes :

Any explicit Eject (-command) resets the Raw-mode, thus implying another ??? " " needed.
The same accounts for any SET PRINTER TO command i.e. as soon as the connection from VFP to its current printer gets disconnected, Raw-mode for that printer is reset too (it will be the other way around : connecting the printer initializes not in Raw-mode).

General (important) notice : when all seems to work but parts of the screen starts flickering (Toolbars, Win-taskbar) per say (or ? ??), something's still wrong. Once per VFP-session this will be preceeded by a message "memory is low, streaming output is disabled", and which will give side-effects on the print, such as a sudden change of font and ejecting a page too soon. Note that this really destroys the video-memory, and objects get corrupted on the screen.

Last one : The SET PRINTER TO NAME Getprinter() is not the best idea, since the user will be able to attach a fax or file, and in our comments on the latter it says : don't use Raw-mode for a file (the why is not explictly mentioned). So, perform the GetPrinter earlier, and decide on the mode to use depending on the selection made.

I think you can "mark" this one ...
Good luck !
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform