[Python] Docling Hyperlink Extraction Issue : I am using docling to convert pdf to markdown...

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I’m currently using the Docling library in Python to extract text from PDF files. While it works well for retrieving visible text, I’ve noticed an issue with hyperlinks. Specifically, the library only extracts the short display text of the links, but it doesn’t capture the full URLs embedded in the PDF. This is problematic because I need to extract both the visible text and the actual URLs. For example, if a link in the PDF displays as "Click here" but points to "https://example.com", I can only retrieve "Click here" using Docling. I was wondering if there is a way to make Docling extract this information or if anyone has encountered a similar issue and found a workaround. If Docling doesn’t support this, are there any recommended libraries or techniques to extract full URLs from PDF files?

    the TextItem class has a hyperlink attribute. this attribute returns None even though the PDFs contain visible hyperlinks.The library has the capability to store hyperlink information, but it's not detecting hyperlinks from PDF files during the parsing stage, so the hyperlink attribute remains empty. #textItem only not able to indentify hyperlink.

    Continue reading...

Compartilhe esta Página