Thread: Help: send text to printer.

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    Question Help: send text to printer.

    Hi there

    I want to know how I can send a text file to the printer in a text-based c program in Unix environment.

    Is it possible to get the name of the printers connected to the server, and choose among them if there are more than one?

    Thanks a lot.

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    you could consider using a system call, system("call");
    use teh standard command line syntax - so lp to print, its not a great way of doing it, if the printer is on lpt1 you may be able to use fopen("LPT1"), this works when using the com port i dont know about parallel.
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. New Project, text game, design stage.
    By Shamino in forum Game Programming
    Replies: 9
    Last Post: 05-23-2007, 06:39 AM
  3. Small HTML question
    By Thantos in forum Tech Board
    Replies: 4
    Last Post: 12-29-2003, 12:37 AM
  4. Email attachment via smtp - how?!
    By lucky760 in forum C++ Programming
    Replies: 2
    Last Post: 07-04-2002, 07:59 PM
  5. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM