{"action":"created","issue":{"url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/167","repository_url":"https://api.github.com/repos/pdfminer/pdfminer.six","labels_url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/167/comments","events_url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/167/events","html_url":"https://github.com/pdfminer/pdfminer.six/issues/167","id":345122122,"node_id":"MDU6SXNzdWUzNDUxMjIxMjI=","number":167,"title":"Extracting text label for hyperlink in PDF?","user":{"login":"codeisnotcode","id":658553,"node_id":"MDQ6VXNlcjY1ODU1Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/658553?v=4","gravatar_id":"","url":"https://api.github.com/users/codeisnotcode","html_url":"https://github.com/codeisnotcode","followers_url":"https://api.github.com/users/codeisnotcode/followers","following_url":"https://api.github.com/users/codeisnotcode/following{/other_user}","gists_url":"https://api.github.com/users/codeisnotcode/gists{/gist_id}","starred_url":"https://api.github.com/users/codeisnotcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeisnotcode/subscriptions","organizations_url":"https://api.github.com/users/codeisnotcode/orgs","repos_url":"https://api.github.com/users/codeisnotcode/repos","events_url":"https://api.github.com/users/codeisnotcode/events{/privacy}","received_events_url":"https://api.github.com/users/codeisnotcode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T07:36:08Z","updated_at":"2018-07-28T11:46:51Z","closed_at":null,"author_association":"NONE","body":"I have PDFs with many hyperlinks. I want to get the text label for the hyperlinks, not the hyperlink URLs.  \r\n\r\nJust to be clear on what I am looking to extract, if this were HTML rather than a PDF and I had :\r\n{a href=\"https://www.w3schools.com/html/\"} Visit our HTML tutorial {/a} \r\n\r\nI want to extract \"Visit our HTML tutorial\". (And yes, I replaced \"<\" and \">\" with \"{\" and \"}\" in the HTML, so you can see the code.)\r\nI don't need the \"https://www.w3schools.com/html/\" URL and I don't need the contents of the page at \"https://www.w3schools.com/html/\".\r\n\r\n \r\nGoing back to the PDF case, I ran pdfx in PyCharm and halted after\r\npdf = pdfx.PDFx(filename)\r\nand then inspected pdf. I can see the URLs from the hyperlinks (in pdf.reader.references), but I can't find the text labels.\r\n \r\nAny assistance on how to extract the text labels would be much appreciated.  I have tried a number of PDF-to-Python text packages and none have been able to do this. It would make a unique feature for the next version of pdfx. Or is there some reason why this can't be extracted from PDF files? \r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/comments/408601756","html_url":"https://github.com/pdfminer/pdfminer.six/issues/167#issuecomment-408601756","issue_url":"https://api.github.com/repos/pdfminer/pdfminer.six/issues/167","id":408601756,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODYwMTc1Ng==","user":{"login":"tataganesh95","id":39157533,"node_id":"MDQ6VXNlcjM5MTU3NTMz","avatar_url":"https://avatars0.githubusercontent.com/u/39157533?v=4","gravatar_id":"","url":"https://api.github.com/users/tataganesh95","html_url":"https://github.com/tataganesh95","followers_url":"https://api.github.com/users/tataganesh95/followers","following_url":"https://api.github.com/users/tataganesh95/following{/other_user}","gists_url":"https://api.github.com/users/tataganesh95/gists{/gist_id}","starred_url":"https://api.github.com/users/tataganesh95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tataganesh95/subscriptions","organizations_url":"https://api.github.com/users/tataganesh95/orgs","repos_url":"https://api.github.com/users/tataganesh95/repos","events_url":"https://api.github.com/users/tataganesh95/events{/privacy}","received_events_url":"https://api.github.com/users/tataganesh95/received_events","type":"User","site_admin":false},"created_at":"2018-07-28T11:46:51Z","updated_at":"2018-07-28T11:46:51Z","author_association":"NONE","body":"@codeisnotcode Could you post the PDF here?"}}
{"actor":{"display_login":"tataganesh95"}}