473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sending console output to printer

1
hello all,
how to send the program output to printer installed in any OS.



Vijayakumar
May 5 '07 #1
2 3062
Savage
1,764 Expert 1GB
hello all,
how to send the program output to printer installed in any OS.



Vijayakumar

There are couple of functions defined in bios.h.biosprint for Turbo C/C++ or _bios_printer for MS C/C++ and there is also this .

Savage
May 5 '07 #2
AdrianH
1,251 Expert 1GB
how to send the program output to printer installed in any OS.
There is no one single way to output to a printer across all OSs.
  • DOS/Windows: output to file PRN (will not work for network printer unless mapped)
  • Windows: use the appropriate API
  • pre Mac X: use the appropriate API
  • Mac X/Unix/Linux: Spawn a lpr process and pipe in the data to it. (lpr is the most common one of the interfaces I am aware of, but IIRC there may be others. Also, I'm assuming that Mac X does this as it is a Unix system. I may be wrong though)

Things are usually backwards compatible. See the OS's printing API or development package for more information. Also, I tried to state the print methods as generically as possible. There may however be other methods that I have not encompassed.

Enjoy.


Adrian
May 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

43
by: Dom | last post by:
can someone please help me display text in the console cout << "Testing"; in a different colour to the default one
2
by: Carramba | last post by:
hi! I'am wondering if I have program for ex int main(){ int Kod = 0; while(Kod >=0 && Kod <=126)
13
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
4
by: Schwarty | last post by:
I hope I posted this to the correct group. If not, please let me know and I will get it posted in the correct section. I have a web application developed in ASP.NET using C# for the code behind....
2
by: nautonnier | last post by:
Hello, I have a C# app that spawns several processes each containing a console app written by another developer in C++. The console app was written first to be just like a console app: it...
6
by: Barry Edmund Wright | last post by:
Hi, We are having a large cheque run printed by an outside printer. The printer asked us to give him the layout of the fields to print on a form and send it to him. As an example the form looks...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
2
by: sphinney | last post by:
OK, is Access 2007 driving anyone else nuts? I've got three lines of VBA code that sends a report to the printer: DoCmd.OpenReport RPT_NAME, acViewPreview, , , , ARGS DoCmd.RunCommand...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.