I\'m working on extract data from PDF files. This post helps me to determine for the coordinate position by word searching.
\n\n\n
\n
\n
\n\n\n\n
\n \n
\n
take a look on this, I think it\'s what you need.
\nhttps://jackson-brain.com/using-pdfbox-to-locate-text-coordinates-within-a-pdf-in-java/
\n\nHere is the code:
\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.DecimalFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nimport org.apache.pdfbox.exceptions.InvalidPasswordException;\nimport org.apache.pdfbox.pdmodel.PDDocument;\nimport org.apache.pdfbox.pdmodel.PDPage;\nimport org.apache.pdfbox.pdmodel.common.PDStream;\nimport org.apache.pdfbox.util.PDFTextStripper;\nimport org.apache.pdfbox.util.TextPosition;\n\npublic class PrintTextLocations extends PDFTextStripper {\n\npublic static StringBuilder tWord
\xe2\x80\xa6\n \n
\n \n
Open Full Answer\n \n
\n