xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: extending xmlgraphics-commons
Date Sun, 18 Oct 2009 15:35:05 GMT
Hi Christian

No, that's not entirely true: the whole image loader package makes use
of at least ImageInputStream which is part of ImageIO. Without that
class you can't load any image. That was a convenient choice because
ImageIO is guaranteed to be available in any J2SE >=1.4 environment. Of
course, GAE plays you a bad joke here. You can probably retrofit the
minimal necessary parts of ImageIO in a separate JAR to make the image
loading work. You may want to look into the Apache Harmony [1] which has
a incomplete, but (for this case) probably sufficient clean-room
implementation available (bundled in a JAR) that could fill the gap here.

I guess one problem with ImageIO is that one of the ImageInputStream
implementations uses a temporary file to achieve random access to the
image data. If configured properly you can force that into memory:

What we have as documentation on the image loading framework is here:

If possible, try to avoid rewriting larger parts of the code as
you'll end up maintaining it on your end. It's better to analyze just
what can be improved in our code to make that unnecessary. You may also
want start a little document on the wiki about running FOP on GAE for
the benefit of anyone trying to do the same thing later.

Please keep us in the loop about your progress to run FOP in GAE. I'm
curious how well it goes. Good luck!

[1] http://harmony.apache.org

On 16.10.2009 12:52:45 Nicanor Cristian wrote:
> Hello everyone!
> This is my first email to this group.
> I have a couple of questions regarding xmlgraphics-commons (and also
> it's integration with fop). Here we go:
> I must port some java code that generates pdfs from xslfo to google
> application engine. Unfortunately, GAE (google application engine) does
> not support javax.imageio classes. My idea is to improve
> xmlgraphics-commons in some way, in order to do the same operations, but
> using the GAE imaging apis.
> Also I would consider as an option the rewriting of the only parts that
> are called by fop when converting xslfo to pdf and that are using
> javax.imageio classes. What is your advice? How could I accomplish that?
> Where could I find some good documentation about the classes?
> I took a fast look at the sources and it seemed to me that the classes
> using javax.imageio classes reside in the
> org.apache.xmlgraphics.image.loader.impl.imageio package only. Is that true?
> Thanks a lot,
> Christian.

Jeremias Maerki

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

View raw message