Re: High level layout API for gnome print
Dave Malcolm <[email protected]>
| Newsgroups | gmane.comp.gnome.print |
|---|---|
| Message-ID | <1067444604.2171.50.camel@shirehorse1> |
On Fri, 2003-10-24 at 14:46, Will Newton wrote: > On Friday 24 Oct 2003 14:18, Allin Cottrell wrote: > > > > We need to do some reports of various things - database metrics, > > > etc. For this it would be good to be able to do tables, centering > > > and justification. We've looked at various layout languages like > > > LaTeX, XSL-FO and Docbook, but none of them seem to really be > > > flexible enough. > > > > XML is supremely flexible -- look more closely. > > I didn't mention XML, but XSL-FO. Our page layouts are designed in XML, and > trust me, I know XML. The difficulty is rendering these layouts. Using XSLT > it is possible to produce all sorts of outputs such as those listed above. > However, in terms of actual page layout capability, we found these solutions > were not adequate (nested tables, absolute positioning, intelligent page > breaking, esoteric page sizes etc.). This need led us to look at gnome print. > > > > We also have a requirement to be able to print some of our on screen > > > forms, which are built from glade and rendered by GTK. Would this be > > > possible to do easily? > > > > There are various ways of rendering XML in gtk and related libraries. > > From a base of XML (e.g. via docbook) you can generate HTML for > > on-screen use, PDF or Postscript for printing, plain text, etc. > > I was referring to being able to output to gnome print exactly (or close > enough) what is shown on screen similar to Xprint. A "print screen" > functionality. To throw a couple of ideas into the discussion: (i) xmlroff is attempting to allow you to hook XSL-FO directly into Gnome Print; see http://xmlroff.sourceforge.net/ AFAIK it has an intermediate stage in which it generates a tree of areas that have been reached their final position on the pages; they are GObject subclasses. There's been some talk of exposing these, so perhaps there could be an API at this level (and, I hope an XML serialisation format). This might be a good interchange format that you could generate your data in and send to GnomePrint. (ii) Perhaps a gnome print backend could expose a GdkDrawable, and allow you to render GDK primitives onto it directly? -- David Malcolm http://www.davemalcolm.demon.co.uk