In today's CVS there's rudimentary check printing based on
gnome-print.  gnome-print provides a lot of ready-built functionality
that is great, including a scalable postscript-like command set with
enough abstraction to ensure that what you see in the preview is what
you get on paper, good text formatting primitives, automatic
previewing using the gnome-canvas, printer, paper, and font selection
dialogs, etc.  The widely-available version that my code is based on
is 0.10, and it's a little unpolished; but I have the CVS version at
home, which is under rapid development and already has a lot more
functionality than is available in the version I built against.  By
the next round of Gnome component releases gnome-print will be really
slick.

What I'd really like to do is expand the stuff in print-session.{c,h}
to be a general-purpose interface for printing and output generation
in gnucash.  I think if we handle it right, we can leverage the
report-generation code already in place and integrate it with future
functionality to do graphical and even interactive display of charts
and graphs (since print previews are drawn on gnome-canvases, you can
add gnome-canvas commands to draw arbitrary UI elements on top of your
print output; imagine a transparent "pie wedge" overlaid on the
printed one that has a click callback to pop up an account's register
display).

The only technical barrier to making this work right away is the
absence of "reusable" HTML layout in the gtk-xmhtml widget.  By
reusable I mean that as far as I can tell there's no way for me to use
their algorithms to generate gnome-print commands rather than gtk
drawing commands; gtk-xmhtml is strictly screen-oriented.  This limits
the ability to print reports, and to do stuff like include a report in
the stub of a printed check.

The replacement Gnome HTML engine is the "gtk-html" widget, which
AFAICT is not widely available yet.  I grabbed the CVS sources and
started poking through it, and it looks like it is rather well
integrated with gnome-print.  You can hand it a pointer to a
GnomePrintContext and say "render yourself there", which gives us
everything we need to smoothly print reports and to integrate reports
with any arbitrary printout generation.

Does anybody know what the release status of the gtk-html widget is,
and how much trouble it would be to convert gnucash's usage of
gtk-xmhtml to use gtk-html?  Does it seem like a reasonable thing to
do?  What's everyone's gut feeling about gnome-print and printing in
general?

Thanks,
Bill Gribble


--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to