Reputation: 11
I want to write a program for printing stuff on a paper, roughly what commands or classes do i need to use in c++ or php to get me started ?
Upvotes: 1
Views: 208
Reputation: 57718
In C++, printing is handled by the operating system and thus platform specific. In general here are the following choices:
There are many ways in C++ to send data outside of the program. The standard methods are to use streams (using <<
operator) and C-style streams (using FILE *
and fprintf
).
Please provide platform information so more detailed assistance may be given.
Upvotes: 1
Reputation: 685
To print on the paper using php generally developers prefer JavaScript for the same, provided you are running your page on browser. The following code can used to do so
<a href="#" onclick="window.print(); return false;">Print Me</a>
Same kind of topic is discussed in following thread
Upvotes: 0
Reputation: 43243
Since you mention PHP, the easiest way out in this case would be to simply output HTML and CSS, using a browser to print it.
Besides that, I'm not aware of any ways of accomplishing this with just PHP.
Upvotes: 0
Reputation: 28892
Depends on which platform. For Linux I would look at: http://www.cups.org/
Upvotes: 0