[Gs-dgs-devel] Re: [gs-devel] Extracting Text from Ghost Script
Russell Lang
gsview@ghostgum.com.au
Thu, 21 Feb 2002 18:58:16 +1000
Rajkumar,
> Am trying to implement Accessibility for Ghost View(ggv) application in
> Linux. Ghost-View is an application which is used for viewing
> post-script and pdf files. Ghost view makes use of the "ghost script" to
> render text on the screen. From accessibility perspective the text
> (Document's Text) has to be exported to the AT (Assistive Technologies
> like Screen Reader, Screen Magnifier) which will make use of it to
> replicate the same to user (A screen reader will make use of the text to
> read out them to the disabled user). Since Ghost View makes use of
> "ghost script" to render the text on the screen, I believe there could
> be some ways of getting back the text (ASCII format) from ghost script.
>
> I have found many utilities like "pstotext", "ps2ascii", "prescript" to
> convert the postscript to text or html. But it will be helpful if there
> is a way by which the ghost script can be directly tuned to return back
> the text.
>
> PS: Is there any "mode" in which Ghost Script can be operated to return
> back the text to a file?
Not that I know about. The best of the tools you mention
is probably pstotext. However this can be confused by
PostScript or PDF files that contain (I think) embedded
Type 42 (TrueType) fonts.
pstotext can give you either the text with line breaks as
shown on the page, or it can give you each word separately
with a bounding box for the word. The latter is what I use
from GSview, since it allows me to highlight selected words
or the result of a "find".
Russell Lang gsview@ghostgum.com.au
Ghostgum Software Pty Ltd http://www.ghostgum.com.au/