I am using Apache PDFBox to parse PDF files and replace link URLs in it. I am using page.getAnnotations() to get the links on the PDF page (please see the code
page.getAnnotations()