Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get readable text (text with anti-aliasing) after converting PDF to image? [closed]

I have used ghostscript on a PDF document with text. Text looks like black and white map of bits. How can I get the image with readable text?

-r96
-dTextAlphaBits=1 
-sDEVICE=png16m
like image 410
Jimmy Avatar asked Mar 23 '23 09:03

Jimmy


1 Answers

You can use the higher resolution for your output image, say -r300 set -dTextAlphaBits=4 and -sDEVICE=pnggray

-dTextAlphaBits=n
-dGraphicsAlphaBits=n

These options control the use of subsample antialiasing. Their use is highly recommended for producing high quality rasterizations of the input files. The size of the subsampling box n should be 4 for optimum output, but smaller values can be used for faster rendering. Antialiasing is enabled separately for text and graphics content.

like image 89
Malhotra Avatar answered Apr 06 '23 12:04

Malhotra