[xmlroff] Using libfo in a Scribus XSL-FO import plugin?

Tony Graham Tony.Graham at MenteithConsulting.com
Sun Jun 29 21:11:22 UTC 2008


On Sun, Jun 29 2008 12:33:38 +0100, elvstone at gmail.com wrote:
> (I sent this first to the wrong list address I think. I hope it won't
> end up twice on the list).

You sent it to the old xmlroff list on SourceForge first.  No harm done.

> Hello xmlroff-people,
>
> Recently on the #scribus IRC channel, someone expressed an interest in
> creating an XSL-FO import plugin for Scribus [1]. This would be a
> "real" import plugin, and not just something that renders a PDF and
> imports that. I knew about libfo from xmlroff since before, and
> figured it might be of some use in creating such an import plugin, and
> I offered my help in the investigation of this, and also in the
> possible development of the plugin. So I have a few quite general
> questions about this endeavor :)
>
> What are your thoughts as xmlroff developers (Tony?) on the
> feasibility of using libfo in an XSL-FO import plugin? Do you think
> that having access to the internal area tree using libfo will help in
> leveraging some of the formatting capabilities of xmlroff during
> import into Scribus?

I really don't know what is involved in making a Scribus plugin for
libfo.

Given that Scribus is written in C++, libfo may be the best fit for you,
since FOP is written in Java.

> I have a general knowledge about the formatting process of an XSL-FO
> formatter, and I know how formatting objects are broken up (or smashed
> together?) into areas and traits in an area tree. But I'm not quite
> sure what information is contained in this area tree, how much of it
> is accessible using the libfo API, or if it will be of any help in
> laying out pages, texts, images and tables in a Scribus document.

The libfo area tree has all the information about positioning on a page,
but information that doesn't change, such as colours, is just in the FO
tree.  Some work that I don't think I've checked in anywhere is to
implement a GObject interface for the common border and padding
properties (and, eventually, the other common groups of properties) to
make it easier to access the FO.

> I've taken a brief look at the gmodule-area-tree.c example from
> libfo-examples, but I'd love to have some input from knowledgeable
> xmlroff folks on the capabilities of libfo when it comes to retrieving
> layout information such as positioning, padding, font information
> et.c.

As I said, some of it's still in the FO tree, so you have to use the
generated_by reference to get to the FO.

> This may be a very hard task, but that's why I found it interesting
> and volunteered to help, to the best of my abilities :)

You should also look at which FOs and properties are currently
implemented to see whether libfo does enough to be useful.

> If you're not familiar with Scribus, it's a desktop publishing
> application. More details at http://www.scribus.net/.
>
> Thanks for your time everyone, and thanks to you Tony for still
> developing xmlroff.

My pleasure.  I just wish I had more time to work on it.

Regards,


Tony.


More information about the xmlroff-list mailing list