带有 IKVM 的 FOP:无图像
我已经在.NET 中成功编译并使用了 FOP 1.0 和 IKVM 0.44.5,但是我无法让它在生成的 PDF 中显示任何图像。
当我在命令行中通过 ikvm 运行 FOP 时,出现 java.io.EOFException。当我使用 java 转换同一文件时,图像完美显示。
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.readUTF(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:612)
at org.apache.xmlgraphics.image.loader.util.ImageUtil$1.invoke(ImageUtil.java:246)
at $Proxy0.readUTF(Unknown Source)
at com.sun.imageio.plugins.png.PNGImageReader.parse_iTXt_chunk(PNGImageReader.java:469)
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:710)
at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(PNGImageReader.java:1543)
at org.apache.xmlgraphics.image.loader.impl.imageio.PreloaderImageIO.preloadImage(PreloaderImageIO.java:71)
at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:176)
at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:122)
at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
Caused by: java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:346)
at java.io.DataInputStream.readUTF(DataInputStream.java:607)
at javax.imageio.stream.ImageInputStreamImpl.readUTF(ImageInputStreamImpl.java:332)
... 49 more
有人使用 FOP+IKVM 获取图像吗?任何帮助或指向解决方案的指示将不胜感激!
I've successfully compiled and used FOP 1.0 with IKVM 0.44.5 in .NET, however I can't get it to show any images in the resulting PDF.
When I run FOP via ikvm in the command-line, I get a java.io.EOFException. When I transform the same file using java, the Images shows up perfectly.
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.readUTF(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:612)
at org.apache.xmlgraphics.image.loader.util.ImageUtil$1.invoke(ImageUtil.java:246)
at $Proxy0.readUTF(Unknown Source)
at com.sun.imageio.plugins.png.PNGImageReader.parse_iTXt_chunk(PNGImageReader.java:469)
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:710)
at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(PNGImageReader.java:1543)
at org.apache.xmlgraphics.image.loader.impl.imageio.PreloaderImageIO.preloadImage(PreloaderImageIO.java:71)
at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:176)
at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:122)
at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
Caused by: java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:346)
at java.io.DataInputStream.readUTF(DataInputStream.java:607)
at javax.imageio.stream.ImageInputStreamImpl.readUTF(ImageInputStreamImpl.java:332)
... 49 more
Has anyone gotten images to work using FOP+IKVM? Any help or pointers to a solution would be highly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 FOP 不太了解,但是一个简单的图像示例就可以了:
这会生成一个看起来不错的 images.pdf 。
如果您有这样的重现场景,请随时将其邮寄给我 ([email protected ])我会看看。
更新:感谢您提供导致问题的 .png。我用 0.44 重现了这个问题,但在当前的开发版本中它可以正常工作。最新的开发快照位于 http://weblog.ikvm.net/
I don't know much about FOP, but a simple example with images works:
This results in an images.pdf that looks good.
If you have a repro scenario for this, feel free to mail it to me ([email protected]) and I'll have a look.
Update: Thanks for the .png that caused the problem. I reproduced the problem with 0.44, but in the current development version it works correctly. The most recent development snapshot is available at http://weblog.ikvm.net/