These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need to find an embeded font character within a document

Mark Green
Registered: Mar 29 2009
Posts: 19

G'day All

I produce maps with Acrobat and wish to write a script file that finds a particular character then adds a link to it. If it was a normal text string that would be easy.
But I need to find a "Star' symbol from an embedded font

Embedded font is : MapinfoSymbols (A True Type Font)
Character is: Ox24 ( the Star symbol from this font)

I am assuming I will have to look for it as a Hex code, but have no idea where to start.

I can create a small PDF with the symbol in it if that helps anyone, not sure how to attach it here.

Thanx In Advance

Mark

My Product Information:
Acrobat Pro 8.1, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
AcroJS can understand a string made of Unicode characters if you specify them with the format \uXXXX, where XXXX is the character code in hex. For example your character would be defined as

var searchString = "\u0024";

However, the JS exposed in Acrobat can't cope with the idea of searching by specific font, so if the Unicode is a common one (yours is, as it's the $ sign) the search (either using the search object or the loop-through-words method) will find every use, and determining what the font of each instance is involves a bit of hammering - but if you haven't used the dollar sign elsewhere (I guess not, if you're making maps) then it's not an issue.