microsoft / microsoft/markitdown
OCR PPTX converter crashes on SVG images without a raster fallback
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
Summary
PptxConverterWithOCR still crashes on SVG pictures that do not have a raster fallback, even though the core PptxConverter was fixed for this in #2233.
Current OCR path:
if self._is_picture(shape):
image_stream = io.BytesIO(shape.image.blob)
For an SVG-only picture, python-pptx raises ValueError("no embedded image") when shape.image is accessed. The core converter now resolves the <asvg:svgBlip> relationship directly, but the OCR converter does not use that helper/path.
Reproduction on current main
I used the repository's existing regression fixture:
packages/markitdown/tests/test_files/test_svg_no_fallback.pptx
In a clean local venv with the source packages installed:
core 57
ocr error ValueError 'no embedded image'
So the same file that proves #2233 fixed the core converter still fails through PptxConverterWithOCR.
Proposed scope
If this is available to take, I can send a focused OCR-only follow-up that reuses the core converter's SVG image-resolution behavior where practical and adds an OCR-side regression test using the existing fixture. No unrelated PPTX refactor.
I searched open and closed issues/PRs for an OCR-specific SVG/no-raster-fallback fix and found no matching implementation.
AI-assisted audit disclosure: found by comparing recent merged core-converter fixes against sibling OCR converters; reproduction was executed locally against current source.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the PptxConverterWithOCR picture-handling path and compare it with the core PptxConverter SVG resolution introduced for #2233. Run packages/markitdown/tests/test_files/test_svg_no_fallback.pptx through the existing regression-test setup, then add an OCR-side regression test showing the fixture converts without the ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100