# Issue: Hyperlink extraction from pdf to markdown is not working

**URL:** <https://forum.mupdf.com/t/issue-hyperlink-extraction-from-pdf-to-markdown-is-not-working/263>\
**Category:** PyMuPDF\
**Tags:** text\
**Created:** [January 8, 2026, 2:23pm UTC](https://forum.mupdf.com/t/issue-hyperlink-extraction-from-pdf-to-markdown-is-not-working/263 "2026-01-08T14:23:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_s1](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/r_s1/32/318_2.png) [@r\_s1](https://forum.mupdf.com/u/r_s1)\
**Post date:** [January 8, 2026, 2:23pm UTC](https://forum.mupdf.com/t/issue-hyperlink-extraction-from-pdf-to-markdown-is-not-working/263/1 "2026-01-08T14:23:39Z")

</div>

I have the following code to convert PDF files into Markdown format, but the hyperlinks present in the PDF are not being preserved or converted correctly into Markdown.

```python
doc = pymupdf.open(file_path)
md_text = pymupdf4llm.to_markdown(
    doc,
    header=False,
    footer=False,
    embed_images=True,
    dpi=300,
    use_ocr=True
)

```

---

<div class="post-metadata">

**Author:** ![Jamie\_Lemon](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/jamie_lemon/32/5_2.png) [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Post date:** [January 8, 2026, 4:59pm UTC](https://forum.mupdf.com/t/issue-hyperlink-extraction-from-pdf-to-markdown-is-not-working/263/2 "2026-01-08T16:59:30Z")

</div>

This feature is not yet supported in PyMuPDF4LLM. Links are a little bit tricky to deal with as they can be internal (linking to other areas of the doc) or external (a website). Many links that you get from [Page - PyMuPDF documentation](https://pymupdf.readthedocs.io/en/latest/page.html#Page.get_links) will be invisible rects overlayed on areas of a doc too. For obvious text which is a website kink, you could use maybe post-process the resulting MD and look for any obvious inline text websites. e.g. if the text body contains `https:// `then figure out how to wrap that with correct markdown. ` `
