Printing to HP OfficeJet from CHUI

reptcon

New Member
8.3B CHUI / Win98 / HP OfficeJet T45. When I open output to value(x) where x = "LPT1" it appears as if it is printing but nothing actually prints. If I write a little 5 liner it will print. I can print OK from the procedure editor. Leading escape sequences might be the problem. Or -Wa -wpp might not have been in the correct order. Is "LPTx" case-sensitive? My mind is spinning with possibilities but none seem to solve the problem. Anybody get past similar frustrations?

------------------
Chris Heins
Report Concepts, Inc.
812 State Road
Princeton, NJ 08540
800-733-7776
chris@reportconcepts.com
 

Chris Kelleher

Administrator
Staff member
Hi Chris-

How are you doing? When I am printing directly to a printer (to bypass the windows printing), I will output to a temporary file then do an
<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
OS-COMMAND SILENT COPY VALUE(file-name) VALUE(port-name).
[/code]
where port-name is "LPT1:".

You also might want to take a look at http://home.wxs.nl/~jurjen.dijkstra/api/dl/printfile.zip which is how to print a text file using Win API calls. I have used this as well sucessfully.

HTH.

-Chris

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 

reptcon

New Member
Thanks Chris, it seems like as time goes by we have to do things in increasingly-less elegant ways just to get the job done and move on. I did some testing last night and was flabbergasted to find that there is no way to print escape sequences via _osprint (it eats them). Glad I didn't buy into THAT one whole-hog. I'll use the COPY method for the time being.
 

Chris Kelleher

Administrator
Staff member
Hi Chris-

Yes I know some things should be simplier to do when they aren't. I recently was working on a custom print form with bar codes, where I needed to use escape codes, and noticed _osprint doesn't like that. Actually, I think it's the Windows print driver that eats the control characters. I did find out something interesting though, if you set up a "Generic / Text Only" printer in Windows, the control characters seem to work ok. Of course, you have to make sure you are doing all the control chars properly and everything.

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 
Top