Print document via wordpad

grinder

Member
Hi there,

I want to do a printout on an Espon Receipt printer. Now it is solved via an output stream directly on the printer (OUTPUT TO blabla-stream. DISPLAY "text". OUTPUT CLOSE.).
As it is not possible in 4GL to give the printed elements a format (like different fonts, font size or bold print) I try to export it to wordpad (Winword isn't installed).
Can anybody tell me how to send a character var to wordpad with different format and margins and printout the file directly on specific printer?
Is there a COM object for wordpad which can be used?

Does this work with wordpad at all?

thx in advance,
grinder
 

grinder

Member
Thanks for the answer, great tool but this is not what I was searching for.
I'd like to use wordpad, but I cannot find a COM object for it :/ I'll keep you informed if I find it.
 

tamhas

ProgressTalk.com Sponsor
Bottom line, no need for Wordpad. You can either take the brute force approach and use PRINT CONTROL to embed control sequences directly in the output or use one of several packages to get to something like PDF output. In addition to PDF Include Alon Blich also has a package, also at OE Hive, which uses OpenOffice to do arbitrarily nice output. With something as simple as a receipt printer, you might be just as well, however, going the "stupid" route and just embed the codes because you probably don't need very many and the capabilities of the printer are likely to be simple enough that it can't really handle a PDF anyway. For something like bar code label printers, I think this is very much still the standard of the art, crude as it is. Just be clever about encapsulating the formatting separate from the business logic so that it will be easy to change if you change models of printer in the future.
 
Top