xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: eps transcoder headless exception
Date Wed, 27 Sep 2006 11:39:31 GMT

On 27.09.2006 12:02:19 ruben malchow wrote:
> 
> 
> hello,
> 
> when using the epstranscoder in headless mode with a transparent svg 
> element, this exception is thrown:
> 
> [...]
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR    
> java.awt.HeadlessException (null)
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR    
> java.awt.HeadlessException
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR        at 
> sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:66)
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR        at 
> org.apache.xmlgraphics.java2d.ps.PSGraphics2D.getDeviceConfiguration(PSGraphics2D.java:759)
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR        at 
> org.apache.batik.ext.awt.image.GraphicsUtil.getDestination(GraphicsUtil.java:511)
> 2006.09.27 11:34:30 - TranscodeUtils...... - ERROR        at 
> org.apache.batik.ext.awt.image.GraphicsUtil.getDestinationColorModel(GraphicsUtil.java:525)
> [...]

This needs to be handled in one of the three ways outlined under:
http://xmlgraphics.apache.org/fop/latest/graphics.html#batik

Since you're using Java 1.4.2, using "-Djava.awt.headless=true" is
obviously the first choice.

> my code that's calling the epstranscoder is this:
> 
>         System.err.println("saving eps ... ");
>         try {
>             EPSTranscoder t = new EPSTranscoder();
>             TranscoderInput input = new TranscoderInput(doc);
>             TranscoderOutput output = new TranscoderOutput(os);
>             t.transcode(input, output);
>         } catch (Exception e) {
>             logger.error(e);
>         }
> 
> 
> now, if i run this in "normal" mode (i.e., not headless), the error is 
> not thrown, but the transparencies and strokes are not drawn correctly, 
> either. the elements are always fully opaque, and the strokes are 
> cropped to the actual path of the element, with parts of the stroke 
> extending to the outside not being rendered.

That's to be expected. Those features are not implemented, yet. :-)

> i am including an exampleof this behaviour (not including the stroke 
> thing for now). these were rendered using jdk1.4.2 and the most recent 
> svn revision as of 20 minutes ago. is this something i should file a bug 
> report for?

It's not a bug, it's a missing feature. You could volunteer to help
improve this part. That would be way cool!

Jeremias Maerki


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


Mime
View raw message