Thread: Accessing printer & touchscreen in Linux

  1. #1
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476

    Accessing printer & touchscreen in Linux

    Hi, can anybody tell me where I could get a tutorial about programming with printer & touchscreen in Linux? If it's in windows, I can use the methods in windows.h, but what about Linux?

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    I'm speculating here but I think you can open it as a file and specify the name of the port onto which the printer is attached as the filename like "LPT1" or something like this. I may be very far though.

  3. #3
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by g4j31a5
    Hi, can anybody tell me where I could get a tutorial about programming with printer & touchscreen in Linux? If it's in windows, I can use the methods in windows.h, but what about Linux?
    don't know about printers, but touchscreen drivers generally appear as a simple mouse.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  4. #4
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    Quote Originally Posted by Desolation
    I'm speculating here but I think you can open it as a file and specify the name of the port onto which the printer is attached as the filename like "LPT1" or something like this. I may be very far though.
    Yeah, I know that. But I also wanted to set the properties of the printer and the printed strings eg. using a true-type font, setting the position of each strings, maybe printing a pixel / picture, etc. How do I do that?

    Thanks.

  5. #5
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    Quote Originally Posted by ChaosEngine
    don't know about printers, but touchscreen drivers generally appear as a simple mouse.
    So basically if I installed the touchscreen's driver in Linux, I can use the same method for mouse to detect the touchscreen?

    Thanks.

  6. #6
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    Okay I've looked at the forum and found this thread. So, to print a simple line, I can use the method there. But how do I set, for example, the position of the string to be printed eg. in the middle of the paper, or it is printed in a landscape paper, etc?

    Also because that thread is about printing in Windows, I assume the MFC-printing won't work because I used Linux. Please, can anybody help me?
    Last edited by g4j31a5; 08-08-2006 at 02:07 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accessing TCP flags in TCP packets on Linux using C !!
    By vishamr in forum Linux Programming
    Replies: 2
    Last Post: 10-16-2006, 08:48 AM
  2. Linux gcc file printer output
    By ed bitwise in forum C Programming
    Replies: 1
    Last Post: 05-17-2006, 01:05 AM
  3. Accessing http in Linux using C?
    By JLPence in forum Linux Programming
    Replies: 2
    Last Post: 03-22-2004, 09:03 PM
  4. accessing printer
    By micklarko in forum C Programming
    Replies: 2
    Last Post: 10-19-2003, 10:43 PM