On Wed, 2007-02-07 at 15:51 +0100, Jeremias Maerki wrote:
> The attached FO file shows how to do this. Actually, Batik was so clever
> I had to trick it into resampling using a dummy feColorMatrix filter
> which does not modify the image. Without the filter the image doesn't
> get down-sampled.

Thanks!  I am working on getting this to work.  I think I have solved
the Xalan/Serializer endorsed jar setup, but now I get the an error:

SEVERE: svg graphic could not be built: Can't find bundle for base name
org.apache.fop.svg.resources.Messages, locale en_US
java.util.MissingResourceException: Can't find bundle for base name
org.apache.fop.svg.resources.Messages, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1508)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1262)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:964)
at org.apache.batik.i18n.LocalizableSupport.getResourceBundle(Unknown
Source)
at org.apache.batik.i18n.LocalizableSupport.formatMessage(Unknown
Source)
at
org.apache.batik.ext.awt.image.spi.DefaultBrokenLinkProvider.formatMessage(Unknown
 Source)
at
org.apache.batik.bridge.SVGBrokenLinkProvider.getBrokenLinkDocument(Unknown 
Source)
at
org.apache.batik.bridge.SVGImageElementBridge.createBrokenImageNode(Unknown 
Source)
at
org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Unknown 
Source)
at
org.apache.fop.svg.PDFImageElementBridge.superCreateGraphicsNode(PDFImageElementBridge.java:108)
at
org.apache.fop.svg.PDFImageElementBridge.createImageGraphicsNode(PDFImageElementBridge.java:100)
at
org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown 
Source)
at
org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at
org.apache.fop.render.pdf.PDFSVGHandler.renderSVGDocument(PDFSVGHandler.java:186)

Any idea how to fix this?  I am planning to chheck out and build the
current trunk in case this has been fixed.

> But for this to work, you need to know the image size. If you don't
> you're stuck unless you're happy to dive into FOP source code and
> implement an optional resampling of the images.

I do know the display-size in millimeters of the image, but not the size
in pixels.  Do I need to know this?  Could you explain why I need to
know this and where in your example I have to set the image size?

> An alternative if you don't know the image size and therefore cannot use
> the SVG work-around, you can try to find a tool that lets you
> postprocess the PDF and downsample the images that way. Or you
> preprocess the images to a maximum resolution before running FOP.

Yes, maybe I'll fall back on this, but it would be nice to let FOP do it
since FOP already has all the information regarding display-size and any
changes to displayed image size would trigger a duplicate change in the
FOP generation and the preprocess-script.

Hmm, maybe I can use the FOP file as input to the image preprocess
script...that just might work!


Uwe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to