Re: fo:external-graphic

Tony Graham <[email protected]> Thu, 21 Jul 2005 01:17:29 +0100
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Tim Waugh <[email protected]> writes:
> On Sun, Jul 10, 2005 at 11:58:48PM +0100, Tony Graham wrote:
>> The code now in CVS formats fo:external-graphic with the GNOME Print
>> backend as well as used to be done with the PDFlib backend.  I.e.,
>> fo:external-graphic works, but you need to specify content-width and
>> content-height to get space allocated for the graphic.
>> 
>> Can someone try it out to see if it works for them?  If it does, I'll
>> then make a 0.3.5 and announce that on the external lists rather than
>> 0.3.4.
>
> Works here in that I get pictures included in the output (yay!),
> except of course you need to make this change to libfo-compat.xsl:

Committed, thanks.

...
> A couple of things seem wrong though:
>
> * Transparency seems to come out as black though -- is that something
>   that's easy to fix?

Presumably it would be fixed by some combination of GdkPixbuf and
libgnomeprint and/or your viewer/printer.

xmlroff is just opening the file with GdkPixbuf and handing it to
libgnomeprint.

There is undoubtedly scope for me to have added bugs, but AFAICT it's just the
standard usage of those two libraries.

I have a vague memory of seeing something about something like that on the
gnome-print-list, but I could be imagining it.

> * My captions seem to disappear, perhaps underneath the image.  I'm
>   using DocBook XML like this:
>
>     <figure id="fig-scale">
>       <title>Scale image using <application>The GIMP</application></title>
>       <mediaobject>
>         <imageobject>
>           <imagedata fileref="figs/photos-scale-en.png" format="PNG"
> 		     contentwidth="3in" contentdepth="4in"/>
>         </imageobject>
>       </mediaobject>
>     </figure>
>
>   I can see the caption in the XSL-FO, but not in the resulting PDF.
>   Known issue with external-graphic placement?

Not previously known, anyway.

Pango is supposed to be told the size of the space to leave, but I expect that
the title is in a separate fo:block in the FO anyway.

Two things come to mind:

 - The graphic is being rendered at the wrong resolution and is therefore too
   big; or

 - You have a small, fixed line-height and the graphic is overflowing that and
   overwriting the next block area.

Of course the other thing that comes to mind is that the graphic (and all
inline FO) handling still needs major work.  I have a week off work next month
so I should have time for xmlroff then.

Regards,


Tony.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click