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

How to determine text properties for particular text usin javascript?

harishmahadevan
Registered: May 26 2010
Posts: 6

Hi friends,

Can anyone please help me if we can find text properties(like font,font size) of a particular text in a pdf using javascript???

My Product Information:
Acrobat Standard 8.1, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You can use the 'textFont' and 'textSize' properties of the field object.

George Kaiser

harishmahadevan
Registered: May 26 2010
Posts: 6
Thanks for the reply.I am a newbie to java script.Can u please give a small sample script to elaborate the textFont and textSize property to determine the text properties of a given word.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Sorry, my mistake, I thought you wanted this for a field. For a work you will need a 3rd party plug in to get to the properties of a word in the PDF. Acrobat JavaScirpt can only get you the word and its quads or location on the page.

You can use the free [url=http://www.pdflib.com/download/free-software/fontreporter/]PDFlib FontReporter[/url] to get a PDF report of the embedded fonts.

George Kaiser

harishmahadevan
Registered: May 26 2010
Posts: 6
Thanks for the software!!!!!!it is giving the text font..but i guess it doesnt give font size.Am i right??