Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text location extraction from .ps

Status
Not open for further replies.

bngsk

Programmer
Oct 26, 2007
2
US
Hello,

I am a beginner with postscript and have one query.

When I view a .ps file in GhostView, the coordinates of the text as seen from the viewer do not match the coordinates used the source code. This may be because of SCALING or TRANSLATION.

==========================================
For file 3pageportraitN.ps

325 296 M (001This is a three page portrait postscript file. ABCDEFGHIJKLMNOPQRSTUVWXYZ)

In Ghostview I get the coordinates of 001This as 90 710. Why this is not same as 325 296? I want to retrieve 325 296 without looking at the source code. Is there a way to locate the start coordinate of a word is .ps?

==========================================
Where as For file hello-text.ps

72 72 moveto
(Hello, world!) show

In Ghostview I get the coordinates of Hello, world as 72, 72.

The problem here is how to find a relation of between the text coordinates from the raster view(in GhostScript) and the source code.

The requirement here is that the server parses a .ps file based on the text coordinates given by the user.

Thanks,

Sanjay
 
Hi Sanjay,

The answer to your question might lie in what 'M' does - it sounds as if its more complex than a simple moveto.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top