Hi,

I have this application in Graphics that has to print a report on a laser printer.

Is there any way to do it....

Thanks

The application has been designed in Turbo C++...

I am planning to switch it to unix soon but for the time being require the code in above only..

If its the old 16-bit Turco C++ then you can forget it because all the drivers I know of are 32-bit Windows. I don't know how to do it in *nix -- probably postscript or something like that, but that is just a guess.

Hi,

I have this application in Graphics that has to print a report on a laser printer.

Is there any way to do it....

The application has been designed in Turbo C++...

Yes, output to stdprn.

#include <stdio.h>

int main()
{
    fprintf(stdprn, "knvnovnsvn;lvns;lvn;lvnda;lvndsvnd\f");
    return (0);
}

This worked fine in Turbo C++ v1.0
The '\f' at the end of the text forces a new page.

Here is a link that might help you. Sending graphics to a lazer printer is not quite as simple as what Walt described, but similar -- I have not tried it myself.

Here is a link that might help you. Sending graphics to a lazer printer is not quite as simple as what Walt described, but similar -- I have not tried it myself.

I was answering based on

... that has to print a report on a laser printer.

I've always output reports in text. Doesn't matter that the application is a graphics app.

So, is the report a graphical report, or just some basic text information?

Its a graphical one, unfortunately.

So i need to do pixel programming , thas what i presume.

Is there a way to send the output as an image to printer through C(something done by printscrn.)

Its a graphical one, unfortunately.

So i need to do pixel programming , thas what i presume.

Is there a way to send the output as an image to printer through C(something done by printscrn.)

Ewwww :eek: Can't really help with that one, sorry.

no probs...

But can't i have a program in C to capture the screen and later on print the same from windows.

If you have Win98 I think it can be done. Just run your program and press "Print Scr" button on your keyboard, minimize the Turbo C window, goto MSPaint and paste the image.

It should work out to be fine, but dont know if the same can be done in WinXP. Here you can try out ALT + Print Screen, though I have not personally tested it.

Another way is to press ALT + ENTER when you are in full screen mode of Turbo C to resize the window, then you can use comfortablly use PRINT SCREEN button to capture the whole screen, edit out the part which you require and print it.

One of this is sure to work and if not then dont think anything else will.

This article has been dead for over six months. Start a new discussion instead.