Skip to main content
Participant
November 21, 2019
Question

Acrobat Javascript extracting footnotes technique

  • November 21, 2019
  • 1 reply
  • 1164 views

Hi,

 

For PDFs that have been converted from Word files, I'm investigating how I can extract footnotes. One approach I'd like to validate the possibility of is writing a search that looks for footnotes in the text (understanding that "text" is not a straightfoward concept in a PDF). I've been looking at:

  • ADOBE PDF LIBRARY SDK
  • Acrobat DC SDK

for scripting options.

 

I'm wondering if I could first do a search for a number - e.g. 1 and then either determine the rectangle shape and relative offset to determine if it's a footnote reference; or if text properties are available, the superscript property (if there is one). If it finds a footnote reference, follow on to find the actual footnote content at the bottom of the page and extract that.

 

Thanks

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
November 21, 2019

You can search for words and their location.

To do that you would need to use the getPageNthWord and getPageNthWordQuads methods.

However, you can't find any additional information about them, like the font used, color, size, whether or not they are superscript, underline, italic, bold, etc.

OpenLawNZAuthor
Participant
November 21, 2019

Thanks for your reply.

Would I do a search and then call getPageNthWord to get more information? Without doing the search I won't know what index the word is (using this reference, which may be out-of-date: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf)

Or would I iterate through every word?

try67
Community Expert
Community Expert
November 21, 2019

That's great - thank you - I'll give that a go. Do you have any suggestions for other approaches to the extraction?


If you need to know the location of the word that's the only way (using a script).