Re: fo:external-graphic

Tim Waugh <[email protected]> Wed, 20 Jul 2005 16:39:03 +0100
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
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:

Index: libfo-compat.xsl
===================================================================
RCS file: /cvsroot/xmlroff/xmlroff/libfo-compat.xsl,v
retrieving revision 1.14
diff -d -u -r1.14 libfo-compat.xsl
--- libfo-compat.xsl	8 Jul 2005 12:36:06 -0000	1.14
+++ libfo-compat.xsl	20 Jul 2005 15:32:18 -0000
@@ -150,12 +150,6 @@
     </fo:block>
   </xsl:template>
 
-  <xsl:template match="fo:external-graphic">
-    <xsl:if test="$verbose">
-      <xsl:message>Removing 'fo:external-graphic'.</xsl:message>
-    </xsl:if>
-  </xsl:template>
-
   <xsl:template match="fo:region-body/@region-name">
     <xsl:if test="$verbose">
       <xsl:message>Removing 'fo:region-body' region-name attribute.</xsl:message>

A couple of things seem wrong though:

* Transparency seems to come out as black though -- is that something
  that's easy to fix?

* 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?

Tim.
*/
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC3nAXHU/d4jnpWe0RAqc6AJ46NQmHyQHv/Bg+Zukrsk/g3S3/WgCfTMld
EUw4I/vQDHlLbuKXBtkj+U0=
=vJ/R
-----END PGP SIGNATURE-----