• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

output to the printer ???

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can any 1 pls tell me.
how can i send output to the printer using java.io classes
===
FAF
 
Faisal Farooqui
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2nd way to send a job to the printer:
Following is the discussion between me and William Brogden (Bill)
By Faisal Ahmed Farooqui (Faf) on Wednesday, July 11, 2001 - 02:46 pm: Edit
can any 1 pls tell me.
how can i send output to the printer using java.io classes
===
FAF
By William Brogden (Bill) on Wednesday, July 11, 2001 - 03:33 pm: Edit

If you just want to send a stream of characters to a printer, it would depend on how your operating system addresses the printer. On some systems you can open the printer like opening a file.
If you want to print a graphic page from a AWT or Swing application, look into the PrintJob class in the java.awt package.
By Faisal Ahmed Farooqui (Faf) on Wednesday, July 11, 2001 - 07:54 pm: Edit

thanks Mr. Bill
Im specifying following details of my printer and OS
OS : Windows 2000 server
Installed Printer : HP DeskJet
Specified printer name : HP
Port : LPT 1
can u tell me how can I use it as a file? I mean which location would I have to provide in constructors.
thanks again
===
FAF
By William Brogden (Bill) on Thursday, July 12, 2001 - 12:17 am: Edit

It has been a while since I have done this but I think you can open it as
FileOutputStream( "LPT1:");
By Faisal Ahmed Farooqui (Faf) on Thursday, July 12, 2001 - 08:27 am: Edit

I m very very thankful to u Mr. Bill
It's working perfectly
===
FAF
 
reply
    Bookmark Topic Watch Topic
  • New Topic