printer

hey i need to make my java add use the printer .. for my pOS system how do i go abt it.. do i need to get the stuff from tyhe makers

Comments

  • : hey i need to make my java add use the printer .. for my pOS system how do i go abt it.. do i need to get the stuff from tyhe makers
    :
    :
    Check out the PrinterJob class and Printable interface. Those provide an easy to use interface to the installed printers in the OS.
  • But...
    when you have to write an stream of chars... should be easier to open it like a file ... for example (in Microsoft Windows/DOS/XP..etc)

    java.io.File f = new java.io.File("prn:")
    java.io.File f = new java.io.File("lpt1:")

    and wrap into a BufferedWritter or something like that.
    then you dont have to worry about the margins etc. only print

    f.println ("Print a stream");

    -----------------
    : : hey i need to make my java add use the printer .. for my pOS system how do i go abt it.. do i need to get the stuff from tyhe makers
    : :
    : :
    : Check out the PrinterJob class and Printable interface. Those provide an easy to use interface to the installed printers in the OS.
    :

    [red]Good luck![/red]
    [blue]Hackman[/blue]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories