Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set anti aliasing option on SimpleRenderer

I'm using Ghost4J SimpleRenderer to convert my PDF to Image. By default the output png image is not anti aliased.

How can i set it.?

I know that, using Core API we can do it. But, is there any way in High Level API, for setting it?

like image 811
Dipin Avatar asked Oct 31 '12 08:10

Dipin


1 Answers

It is simply not built in. Just look at the command line options that SimpleRenderer is using: http://ghost4j.svn.sourceforge.net/viewvc/ghost4j/trunk/src/main/java/net/sf/ghost4j/renderer/SimpleRenderer.java?revision=143&view=markup

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

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

like image 158
chromanoid Avatar answered Oct 06 '22 17:10

chromanoid