[gs-devel] Extract ASCII Text From Crop
Russell Lang
gsview at ghostgum.com.au
Fri May 11 15:16:06 PDT 2007
Doug,
> Not sure if this is the right spot to post this question...If not, please
> direct me to where I shoud.
>
> I need a method to extract the ASCII from a spefic cropped area. Using
> Ghostscipt I can easily speicfiy a /CropBox and then execute GS against the
> file using -dUseCropBox. I'd like however, to now use something like
> ps2ascii to extract the text from just that 'cropped' box. Anyway to easily
> do that?
I suggest you use pstotext with the -b command line option. This outputs each word on a
separate line with the coordinates of the word. You could parse that to include only those
words that fall in your cropped area.
More information about the gs-devel
mailing list