How to set anti-aliasing option to SimpleRenderer

I am using Ghost4J SimpleRenderer to convert my PDF to image. By default, the output PNG image is not smooth.

How can i install it?

I know that using the Core API we can do this. But, is there a way in the high-level API to configure it?

+7
source share
1 answer

It just isn't built in. Just look at the command line options that SimpleRenderer uses: http://ghost4j.svn.sourceforge.net/viewvc/ghost4j/trunk/src/main/java/net/sf/ghost4j/renderer/SimpleRenderer.java?revision=143&view= markup

I would recommend improving SimpleRenderer with the options mentioned here http://ghostscript.com/doc/current/Use.htm#Rendering_parameters

I think adding "-dTextAlphaBits=4","-dGraphicsAlphaBits=4" in gsArgs enough.

+7
source

All Articles