Skip to main content
Participant
February 5, 2020
Answered

How to quantify indents

  • February 5, 2020
  • 2 replies
  • 1089 views

Looking to convert lots of documents to text.  Need meta data about the document and the text.  One data point that is needed is the indent.  Need to know if a line is indented from the left margin and some sort of quantification of that indent such as spaces, tabs or something else.  If such a tool does not exist I am willing to code it but this new to me.  What tools might help solve this problem?  

This topic has been closed for replies.
Correct answer try67

This can be done using Acrobat JavaScript, but it's quite a complex task.

2 replies

try67
Community Expert
Community Expert
February 5, 2020

There's no way to measure the distance of a word from the margin of a page in spaces or tabs, because those don't exist in a PDF files as such. You can measure the physical distance in points and then convert it to inches, centimeters, etc.

HandlebarAuthor
Participant
February 6, 2020

What tools/technology are usfull for measuring the physical distance?

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 6, 2020

This can be done using Acrobat JavaScript, but it's quite a complex task.

Thom Parker
Community Expert
Community Expert
February 5, 2020

Do you need this data before or after the document is converted?  We can only help with analyzing a PDF, i.e. after conversion. 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
HandlebarAuthor
Participant
February 5, 2020

After conversion is acceptable.