Re: DocBook to PDF with xmlroff

Tony Graham <[email protected]>
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Tim Waugh <[email protected]> writes:
> So I managed to get a DocBook document converted to PDF using xmlroff
> and the libfo-compat.xsl stylesheet (with the two modifications I
> posted) applied to docbook-xsl output, and I'm really impressed.

Music to my ears.

> The two immediately obvious things missing are:
>
> * PNG graphics (@background-image)
> * @white-space-treatment="preserve" for DocBook <screen> nodes
>
> The only other thing wrong with the output for this document is that
> an <orderedlist> comes out as a weird array of dots instead of any
> text.  I haven't been able to make a smaller test case yet.
>
> What steps are needed to add @background-image and
> @white-space-treatment support?

For @white-space-treatment="preserve", modify your whitespace munging
template to not apply to FOs with @white-space-treatment="preserve".
xmlroff preserves whitespace by default.

@background-image would probably be pretty simple (much simpler than
fo:external-graphic): in theory, you'd modify area-to-pdf.c to do the
FoDoc calls to render the background image before doing the FoDoc
calls to render the text.  You may also have to implement FoDocGP
functions to render the image, but how hard can that be?

Regards,


Tony.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.