[xmlroff] Using libfo in a Scribus XSL-FO import plugin?
Elvis Stansvik
elvstone at gmail.com
Mon Jun 30 09:58:29 UTC 2008
Hi Tony.
2008/6/29 Tony Graham <Tony.Graham at menteithconsulting.com>:
> 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.
Yes, sorry. Well Scribus is, from an import plugin writer's point of
view, basically just a canvas on which you absolutely position objects
such as images, text frames, basic tables and other shapes. For text
frames it has support for paragraph styles to control paragraph
properties such as font, line spacing, et.c. Anyway, I guess this my
first question was pretty vague and useless :)
>
> Given that Scribus is written in C++, libfo may be the best fit for you,
> since FOP is written in Java.
Yes. I took a look at FOP too as I know that it is a more complete
implementation, and I saw that it's capable of dumping its area tree
to an XML format. But as you say, it's Java so it would have to be
interfaced with using an external process.
>> 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.
This is good news I think. But are you saying there's currently no way
to access these common properties you speak of using the libfo API.
>> 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.
Okay, thanks for the pointer.
>> 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.
Yes, I know xmlroff isn't full featured yet.
Elvis
>> 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.
> _______________________________________________
> xmlroff-list mailing list
> xmlroff-list at xmlroff.org
> http://lists.xmlroff.org/mailman/listinfo/xmlroff-list
>
More information about the xmlroff-list
mailing list