W3C home > Mailing lists > Public > www-xsl-fo@w3.org > March 2001

Réf. : Re: Problem with fo:external-graphic

From: <palmarosa.dalpos@cnedi06.cnafmail.fr>
Date: Wed, 14 Mar 2001 14:16:37 +0100
To: Christian.Geisert@isu-gmbh.de
Cc: www-xsl-fo@w3.org
Message-ID: <OF926488E1.BF3F5B8C-ONC1256A0F.003B2E99@cnafmail.fr>

I tried BMP images with JDK1.18 but it's not OK , nor with JDK1.2.

With JDK1.18 or JDK1.2, I got this error message :

C:\>java -version
java version "1.1.8"

C:\>java org.apache.fop.apps.XalanCommandLine D:\exXML-016\atom\atom.xml D:
\exXM
L-016\atom\atomxslBMP.xsl D:\exXML-016\atom\atompdf.pdf
FOP 0.16.0 DEV
using SAX parser org.apache.xerces.parsers.SAXParser
transforming to xsl:fo markup
xml: file:/D:\exXML-016\atom\atom.xml
xslt: file:/D:\exXML-016\atom\atomxslBMP.xsl
using renderer org.apache.fop.render.pdf.PDFRenderer
using element mapping org.apache.fop.fo.StandardElementMapping
using element mapping org.apache.fop.svg.SVGElementMapping
using property list mapping org.apache.fop.fo.StandardPropertyListMapping
using property list mapping org.apache.fop.svg.SVGPropertyListMapping
building formatting object tree
setting up fonts
formatting FOs into areas
 [1Error while creating area : Error while recovering Image Informations
(file:/
linux.bmp) : \linux.bmp
] [2] [3] [4] [5]
rendering areas to PDF
writing out PDF

Here is the .xsl I've been using :

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">

 <xsl:template match="/">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="A4"
          page-width="297mm"  page-height="210mm"
          margin-top="0.5in"  margin-bottom="0.5in"
          margin-left="0.5in" margin-right="0.5in">
          <fo:region-before extent="1.0in"/>
          <fo:region-body margin-top="1.0in"
                         margin-bottom="1.0in"/>
          <fo:region-after  extent="1.0in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-name="A4"
        initial-page-number="1" language="en" country="us">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block>The Periodic Table</fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block>p. <fo:page-number/></fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">

          <fo:block>   <fo:external-graphic  src="file:linux.bmp"/>
</fo:block>

          <xsl:apply-templates select="//ATOM"/>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
 </xsl:template>
 <xsl:template match="ATOM">
    <fo:block><xsl:value-of select="NAME"/></fo:block>
 </xsl:template>
</xsl:stylesheet>

What is wrong ??
Thanks for your help

Palmarosa.

---------------------------------------------------------------------------------------------------------------------------------------------------------

ref :
palmarosa.dalpos@cnedi06.cnafmail.fr wrote:
>
> I was working with fop 0.16 and jdk 1.1.8 and I could'nt get images in
the
> pdf even for local images.
> I've been trying with jdk 1.3 and it's OK for local images.
> ( <fo:external-graphic  src="file:info.gif"/> )
>
> Do you succeed to have local images in pdf with jdk 1.1.8 ?
> Does somebody succeed ?

With JDK1.1, FOP supports only BMP images, for other image formats you need
at least JDK1.2 (it makes no difference if images are local or not)

> Thanks

Christian
Received on Wednesday, 14 March 2001 08:24:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT