You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Marc van Kempen <ma...@bowtie.nl> on 2000/10/18 10:52:30 UTC

Re: image floats?

Hi Eric,

> The latest version does it.
What version would that be? From CVS? And it does floats?

> 
> If you encounter problems, tell what version of FOP you use, and what FO
> file (image in a table, in a list, etc...)
> 
I tried generating a pdf file with an Image with fop 0.13., but the
start of the image was at the bottom of the page and the result was
that only the first part of the image was shown and the rest was cut off.

The syntax I used was:

 ...

  <fo:block>
   <fo:inline-graphic href="file:/tmp/test.gif" width="150mm"/>
  </fo:block>

 ...

I know version 0.14 and later use external-graphic, but I'm not sure
that they solve my problem, besides when I tried 0.14 I got the 
following error:

formatting FOs into areas
 [1java.lang.NoSuchMethodError: java.awt.image.ColorModel: method hasAlpha()Z not found
        at org.apache.fop.image.GifJpegImage.getImage(GifJpegImage.java:111)
        at org.apache.fop.image.GifJpegImage.getWidth(GifJpegImage.java:187)
        at org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:170)
        at org.apache.fop.fo.flow.Block.layout(Block.java:247)
        at org.apache.fop.fo.flow.Flow.layout(Flow.java:106)
        at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:239)
        at org.apache.fop.fo.pagination.Root.format(Root.java:116)
        at org.apache.fop.fo.FOTreeBuilder.format(FOTreeBuilder.java:295)
        at org.apache.fop.apps.Driver.format(Driver.java:380)
        at org.apache.fop.apps.CommandLine.main(CommandLine.java:184)

This is on a FreeBSD 4.1 box with jdk 1.1.8, and for sure:

/usr/local/jdk1.1.8/bin/javap java.awt.image.ColorModel
Compiled from ColorModel.java
public abstract synchronized class java.awt.image.ColorModel extends java.lang.Object 
    /* ACC_SUPER bit set */
{
    protected int pixel_bits;
    public static java.awt.image.ColorModel getRGBdefault();
    public java.awt.image.ColorModel(int);
    public int getPixelSize();
    public abstract int getRed(int);
    public abstract int getGreen(int);
    public abstract int getBlue(int);
    public abstract int getAlpha(int);
    public int getRGB(int);
    public void finalize();
}

It doesn't contain hasAlpha(), so is this a jdk 1.2 feature?
I thought we could use jdk 1.1.

Anyway,
thanks for any information.

Regards,
Marc.

> 
> 
> >
> > Hi,
> >
> > How do I make sure that an Image gets wrapped to the next page if it
> > doesn't fit? Floats would be a natural mechanism for that, but they
> > are not implemented. So how do you people do it?
> >
> > Regards,
> > Marc.
> >
> 

-- 
----------------------------------------------------
Marc van Kempen                 
BowTie Technology     	
Raiffeisenstraat 7
5611 CH  Eindhoven
tel. +31 40 2 64 98 60	       mailto:marc@bowtie.nl
fax. +31 40 2 64 98 61         http://www.bowtie.nl
----------------------------------------------------



Re: image floats?

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
Sorry, fop 0.14 needs Java2. A Java1 version should be available soon...

Eric.


----- Original Message -----
From: "Marc van Kempen" <ma...@bowtie.nl>
To: "Eric SCHAEFFER" <es...@posterconseil.com>
Cc: <fo...@xml.apache.org>
Sent: Wednesday, October 18, 2000 10:52 AM
Subject: Re: image floats?


> Hi Eric,
>
> > The latest version does it.
> What version would that be? From CVS? And it does floats?
>
> >
> > If you encounter problems, tell what version of FOP you use, and what FO
> > file (image in a table, in a list, etc...)
> >
> I tried generating a pdf file with an Image with fop 0.13., but the
> start of the image was at the bottom of the page and the result was
> that only the first part of the image was shown and the rest was cut off.
>
> The syntax I used was:
>
>  ...
>
>   <fo:block>
>    <fo:inline-graphic href="file:/tmp/test.gif" width="150mm"/>
>   </fo:block>
>
>  ...
>
> I know version 0.14 and later use external-graphic, but I'm not sure
> that they solve my problem, besides when I tried 0.14 I got the
> following error:
>
> formatting FOs into areas
>  [1java.lang.NoSuchMethodError: java.awt.image.ColorModel: method
hasAlpha()Z not found
>         at
org.apache.fop.image.GifJpegImage.getImage(GifJpegImage.java:111)
>         at
org.apache.fop.image.GifJpegImage.getWidth(GifJpegImage.java:187)
>         at
org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:170)
>         at org.apache.fop.fo.flow.Block.layout(Block.java:247)
>         at org.apache.fop.fo.flow.Flow.layout(Flow.java:106)
>         at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:239)
>         at org.apache.fop.fo.pagination.Root.format(Root.java:116)
>         at org.apache.fop.fo.FOTreeBuilder.format(FOTreeBuilder.java:295)
>         at org.apache.fop.apps.Driver.format(Driver.java:380)
>         at org.apache.fop.apps.CommandLine.main(CommandLine.java:184)
>
> This is on a FreeBSD 4.1 box with jdk 1.1.8, and for sure:
>
> /usr/local/jdk1.1.8/bin/javap java.awt.image.ColorModel
> Compiled from ColorModel.java
> public abstract synchronized class java.awt.image.ColorModel extends
java.lang.Object
>     /* ACC_SUPER bit set */
> {
>     protected int pixel_bits;
>     public static java.awt.image.ColorModel getRGBdefault();
>     public java.awt.image.ColorModel(int);
>     public int getPixelSize();
>     public abstract int getRed(int);
>     public abstract int getGreen(int);
>     public abstract int getBlue(int);
>     public abstract int getAlpha(int);
>     public int getRGB(int);
>     public void finalize();
> }
>
> It doesn't contain hasAlpha(), so is this a jdk 1.2 feature?
> I thought we could use jdk 1.1.
>
> Anyway,
> thanks for any information.
>
> Regards,
> Marc.
>
> >
> >
> > >
> > > Hi,
> > >
> > > How do I make sure that an Image gets wrapped to the next page if it
> > > doesn't fit? Floats would be a natural mechanism for that, but they
> > > are not implemented. So how do you people do it?
> > >
> > > Regards,
> > > Marc.
> > >
> >
>
> --
> ----------------------------------------------------
> Marc van Kempen
> BowTie Technology
> Raiffeisenstraat 7
> 5611 CH  Eindhoven
> tel. +31 40 2 64 98 60        mailto:marc@bowtie.nl
> fax. +31 40 2 64 98 61         http://www.bowtie.nl
> ----------------------------------------------------
>
>