View Full Version : How to program print output? General Question

17th March 2004, 03:03 PM
I have written a few ncurses and Gtk programs in Linux and when I needed to output to a printer, i used the basic lineprinter technique; i.e. ascii with cr/lf/ff.

I'm not sure how to even approach printing in linux. I have programmed graphics oriented printer streams in OS/2 and that other thing. I see no device-contexts in linux. And I sure don't want to learn postscript.

So my question is ;
A. What do you use to print a form with data? something like a order form.

B. Or even what's a general approach - output markup to a file and post-process it ?

C. or is there a device context that would handle the virtualization of printing a form?


19th March 2004, 02:43 AM
I have no idea... Perhaps you could find a CUPS printing/programming howto somewhere?

19th March 2004, 02:41 PM
Yes, I have found a few howto's. However, they always trigger the "Which is better?" question. I am still trying to get my head around how things can be done.

I am not lacking of answers, or tools - just an architectural/design approach.

THanks I will keep looking.

14th May 2004, 02:52 AM
It seems google is not the best search engine after all. After reading a ton of stuff anchored on gnome.org I found this ? libgnomeprint and libgnomeprintui, along with an indicator that gnomecanvas has the virtualized mapping I was looking for: here is the url - http://developer.gnome.org/arch/imaging/printing.html

The API looks fairly easy to use and I should be able to make short work of the next couple of projects that require linux printing.

Now I have to figure out which version Fedora Core 1 has installed and rebuild my development environment.