# Why is this diagraph NOT extracted as images by pymupdf4llm.to\_markdown(write\_images=True)

**URL:** <https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62>\
**Category:** PyMuPDF\
**Created:** [July 18, 2025, 10:03am UTC](https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62 "2025-07-18T10:03:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhaobin](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/zhaobin/32/91_2.png) [@Zhaobin](https://forum.mupdf.com/u/Zhaobin)\
**Post date:** [July 18, 2025, 10:03am UTC](https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62/1 "2025-07-18T10:03:43Z")

</div>

hi there, I wonder why this vector graph is **not** extracted by pymupdf4llm.to\_markdown(“uart.pdf”, write\_images=True) as images.

 ![Screenshot from 2025-07-18 17-09-16](https://canada1.discourse-cdn.com/flex004/uploads/mupdf/original/1X/6bef99fcc10f149fa3da68b8c0d6bc11f98956b2.jpeg)

[https://github.com/pymupdf/RAG/issues/75#issuecomment-2228835925](https://github.com/pymupdf/RAG/issues/75#issuecomment-2228835925)  
I’ve found this comment, according to his word about the detection of “significant” vector graph, this **should** be detected. because inside the rectangle there are texts instead of being empty.

This is the original pdf and the diagram is on page 5.  
[uart.pdf](https://forum.mupdf.com/uploads/short-url/quTj4yEkP7RLT1FUpWFozqR4qBC.pdf) (221.4 KB)

---

<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:** [July 18, 2025, 1:18pm UTC](https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62/2 "2025-07-18T13:18:51Z")

</div>

Strange, I agree I can’t see the drawings in the MD content ( I ensure to have `ignore_graphics=False` ) , however if I do:

```auto
page = doc[4]
page.get_drawings()

for drawing in drawings:
    print(drawing)

```

I can get the drawing info okay. Need to investigate what is going on with PyMuDPF4LLM here …

---

<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:** [July 18, 2025, 1:23pm UTC](https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62/3 "2025-07-18T13:23:02Z")

</div>

Aha - I am appreciating the answer in the issue here too - [[Bug] A specific diagram recognized as significant is not extracted as images by pymupdf4llm.to\_markdown · Issue #296 · pymupdf/RAG · GitHub](https://github.com/pymupdf/RAG/issues/296#issuecomment-3089023887) 🙂

---

<div class="post-metadata">

**Author:** ![HaraldLieder](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/haraldlieder/32/14_2.png) [@HaraldLieder](https://forum.mupdf.com/u/HaraldLieder)\
**Post date:** [July 18, 2025, 5:24pm UTC](https://forum.mupdf.com/t/why-is-this-diagraph-not-extracted-as-images-by-pymupdf4llm-to-markdown-write-images-true/62/4 "2025-07-18T17:24:08Z")

</div>

There is a bug in pymupdf4lm obviously. We usually ignore fill-only vectors (have no borders) that have the same color as the page background. Which is white in this case.
