× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Tamas,

        Thanks for the response - I am still trying to get this thing to
work.  I can print to a normal printer but can't seem to get the escape
sequences right on the thermal - rpg does it fine but that may be because of
the device setup.  Anyway, I am fighting the configuration wars with it...

        I used the new FileOutputStream("LPT1") method and it seems to work
but for the proper escapes.  It will have to give up eventually <smile>.
Thanks again.

Regards,
Rick


[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tamas Perlaky
Hi Rick,

The way I did it in the past with a line printer (which I had 
to access from several computers) was to share the line 
printer on a Win2K print server and then open the UNC path to 
the printer as an output file stream from my Java code.  I 
think you could also print to open LPTx: or COMx: on the 
local machine as if they were files too, but I've not tried 
that in a while.

If you want to get more sophisticated about it, you could try 
working with the parallel or serial port directly.  This is 
something I've never tried personally, but if you want to 
give it a go then I'd suggest starting with 
http://www.rxtx.org/, which is a toolkit that allows this 
kind of stuff.  Sun actually has an API for port access, but 
I don't think it's supported in Windows any more.

(In all of this I'm assuming that your Java code will be 
running on Windows based on your Swing comments in the 
initial post... please let me know if I'm wrong.)

t.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.