Thread: printing on network printer

  1. #1

    printing on network printer

    hi, i'm real c++ amateur and i need some help. I created simple program in C++ and i want to print resoults on network printer. I have no idea how to do that and i please someone to write c++ code that will start from dos command line and be able to print few double variables and few constants on network printer. i appreciate any help. Thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Fastest and easiest way is this:

    ofstream printFile("output.txt");
    printFile << "Test of printer" <<endl;
    system("notepad.exe /p output.txt");
    Not the most elegant way, but it's by far the easiest.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2009, 12:57 PM
  2. C# Printing Problem
    By silverlight001 in forum C# Programming
    Replies: 0
    Last Post: 03-23-2009, 01:13 AM
  3. Printing with printer
    By g4j31a5 in forum C++ Programming
    Replies: 5
    Last Post: 09-14-2006, 01:06 PM
  4. Printing Debug Without Printer :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 10-15-2002, 02:18 PM
  5. Printing to a printer....I already did a search :)
    By fastmonkey in forum C++ Programming
    Replies: 1
    Last Post: 10-09-2002, 01:51 AM