Saptarshi Sen wrote:

>       I am trying to convert an SVG into PDF using the PDF 
> Transcoder in FOP. There are external fonts embedded into the 
> PDF. FOP has been embedded into our application which runs on 
> Weblogic. The entire process works fine on my local machine 
> which runs Win 2k.
> 
>       However, when I try the same on our integration machine 
> running Solaris, the call to the 'transcode' process just 
> brings down my Weblogic server. There is no exception thrown. 
> The PDF generated is of size 0 KB.
> 
>       I have no clue as to what is causing this problem. What 
> are the various details I need to take care of while running 
> FOP on Solaris?

Based on your description, the likely cause is that Batik can't find a local
graphical environment in which to run on the Solaris box. If Solaris has a
GUI, try running it under that (I am more familiar with Linux which has a
graphical console that can be used for such things). Also, here is some code
that can be used to check *before* running a task requiring a graphical
environment:

    /**
     * Determines whether this environment can support graphical functions
that
     * are required for system fonts, Batik (SVG processing), and other
     * AWT-dependent systems. The result returned here is somewhat different
     * from that returned by [EMAIL PROTECTED]
java.awt.GraphicsEnvironment#isHeadless()}.
     * Some environments that are not headless, i.e. that support a mouse,
     * keyboard, and display, are nevertheless not graphical. A Unix/Linux
     * terminal is a good example.
     * @return True iff a local graphical environment can be created.
     */
    public static boolean isGraphicalEnvironment() {
        GraphicsEnvironment ge = null;
        try {
            ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        } catch (LinkageError e) {
            return false;
        }
        return true;
    }

HTH.

Victor Mote


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

Reply via email to