I have a problem with printing to a new Epson Thermal printer for receipts in a restaurant.
In order to perform a 'cut' command, the font is supposed to be set to "control", a font installed by the printer drivers. This does not work in VFP (command window or program). Using the Format...Font dialog does not list the font, "control", in the list of available, installed fonts. Looking further, I found that WordPad (basic word editor in Windows) has the ability to choose this font and the 'cut' command can be printed, making a near-full cut of the paper receipt. However, what's interesting here is that in WordPad this font, and other similar fonts, only show as selections when using the Format Toolbar. They do not exist in the list of fonts in the Format...Font dialog. So it seems that only certain fonts are made available by Windows. Does anyone know how to get that other list of fonts (the one shown in WordPad's Format Toolbar). Try it. Quite surprising that all fonts aren't available and aren't consistent.
As a matter of fact, within FoxPro, I can't even print to the printer. Even if I choose another font (though I've only tried about 3-4 fonts). So my solution is to have a WordPad document that contains the character needed for 'cutting' the receipt paper, open, print and close the document. I know, but I have been unable to find a better way. I might be able to do something similar by using VB. The printer's manual even provides an example using VB to cut the receipt. I tried similar commands in VFP6 to no avail.
The commands were:
Set printer to EpsonThermal
set printer font "control" 10
??? "P" && Partial cut
I also tried ? "P" with no difference in results.
I have been able to create an olecontainer that is a WordPad document. I can open the file with the DoVerb(-1) command which edits/activates the document - got this from the example in the help. I have not been able to print the document (don't know the appropriate command to print or even if WordPad is capable of being commanded in this way). If I can do this last step, at least I have a funtioning 'cut' feature - the kludge it is.
Can anyone offer any suggestions on:
1. Getting the list of fonts that is displayed in the WordPad Format Toolbar - not the Format...Font dialog in either VFP or WordPad?
2. Issuing the print command to the WordPad application object?
Thanks in advance for any and all help.
In order to perform a 'cut' command, the font is supposed to be set to "control", a font installed by the printer drivers. This does not work in VFP (command window or program). Using the Format...Font dialog does not list the font, "control", in the list of available, installed fonts. Looking further, I found that WordPad (basic word editor in Windows) has the ability to choose this font and the 'cut' command can be printed, making a near-full cut of the paper receipt. However, what's interesting here is that in WordPad this font, and other similar fonts, only show as selections when using the Format Toolbar. They do not exist in the list of fonts in the Format...Font dialog. So it seems that only certain fonts are made available by Windows. Does anyone know how to get that other list of fonts (the one shown in WordPad's Format Toolbar). Try it. Quite surprising that all fonts aren't available and aren't consistent.
As a matter of fact, within FoxPro, I can't even print to the printer. Even if I choose another font (though I've only tried about 3-4 fonts). So my solution is to have a WordPad document that contains the character needed for 'cutting' the receipt paper, open, print and close the document. I know, but I have been unable to find a better way. I might be able to do something similar by using VB. The printer's manual even provides an example using VB to cut the receipt. I tried similar commands in VFP6 to no avail.
The commands were:
Set printer to EpsonThermal
set printer font "control" 10
??? "P" && Partial cut
I also tried ? "P" with no difference in results.
I have been able to create an olecontainer that is a WordPad document. I can open the file with the DoVerb(-1) command which edits/activates the document - got this from the example in the help. I have not been able to print the document (don't know the appropriate command to print or even if WordPad is capable of being commanded in this way). If I can do this last step, at least I have a funtioning 'cut' feature - the kludge it is.
Can anyone offer any suggestions on:
1. Getting the list of fonts that is displayed in the WordPad Format Toolbar - not the Format...Font dialog in either VFP or WordPad?
2. Issuing the print command to the WordPad application object?
Thanks in advance for any and all help.