On Sat, Nov 13, 2004 at 04:33:52PM -0600, Hugo Vanwoerkom wrote:
David wrote:
I know this has nothing to do with Debian, but, really, I don't know
exactly where to ask this question anyway.
I have a program for my personal use, written in C. It's a
records-keeping application. So far, for my hardcopy, I simply fopen
/dev/lp0 and talk straight to the printer. My output is just a few
reports, all with a tabular output, and about the only printer
manipulations I need is to change the character size in an instance or
two.
The solution I've come up with is to rely upon Latex. That is, generate
the output text, insert any tex formatting and send this to a temporary
file, let "dvips" convert to postscript and pipe this to "lp" or "lpr".
Could someone indicate whether this is reasonable, or is there a more
straightforward approach?
I use Qt from Trolltech for that sort of stuff. Granted that means C++.
If that is no problem, everything becomes easier because you use its
classes for everything, including printing.
Well.. actually, I've never tried writing C++ code, but as a matter of
fact, just a day or two ago, I had downloaded some documentation on C++
considering getting into it - mainly for the class structuring.
What I do is mostly
graphics, so maybe that changes things.
Well, again, perhaps coincidentally, I had considered converting this
program to a GUI app, just for the fun of it, mostly. However, I've
been trying to learn GTK. Unfortunately, if I understand correctly, GTK
doesn't support printing directly, but you have to extend into the GNOME
interface for printer support. I was hoping to not spread myself too
thinly by adding another interface (GNOME) to learn.