Fork me on GitHub


Default behavior

The library uses the default JVM encoding, which is inherited from the host OS encoding or specified by the file.encoding system property.

Set Ghost4J encoding

However, in some cases (see it can be useful to use a specific encoding when dealing with stdin. To do so, use the ghost4j.encoding system property to override the default behavior.

When working with multiple JVMs (see Thread safety and multi-threading), this value is also set on the forked JVMs.

Important: if you consider changing the ghost4j.encoding system property at runtime, make sure to destroy the Ghostscript singleton instance first, otherwise the change will not be applied. To do so call: