Menu

#12 Send text to printer

closed
nobody
5
2002-02-12
2001-06-27
No

On Linux, how do I send a Hellow World to a local printer and to a network printer?

Discussion

  • Sam Weiner

    Sam Weiner - 2001-06-27

    Logged In: YES
    user_id=91577

    GT.M on UNIX does not have any special features for printers so it depends a lot
    on how you have the printers hooked up to the system.

    A local printer usually has an entry in /dev starting lp. If so, you should just be
    able to open it and write.

    Network printers are tricker. If you just want to print a file, zsystem "lpr filename"
    should do it if your /etc/printcap is setup properly. If you want to talk directly
    to the printer for some reason, you get to write your own program which can
    talk whatever protocol the printer wants. Setting up a process on a fifo which
    does the network stuff may also be an option.

    In short, it depends and is mostly a Linux issue.

    Good Luck, Sam

     
  • Ken Kruszynski

    Ken Kruszynski - 2002-02-12
    • status: open --> closed
     

Log in to post a comment.