[PR #24184] feat: add simple pptx_extractor for etl_type=dify #30541

Closed
opened 2026-02-21 20:47:42 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24184

State: closed
Merged: No


Summary

This PR introduces simple PPTXExtractor to support PPTX files in the Knowledge in the environment with ETL_TYPE=dify (which is default deployment).

By referring existing WordExtractor with python-docx, this PR implements simple text-extaction method for PPTX:

  • Using python-pptx by the same maintainer of python-docx.
  • Based on the WordExtractor with minimal modification.
  • Support extracting images, tables, and hyperlinks (with http or https) in the slides.

Closes #24182

Screenshots

Example PPTX file (includes some images and tables): https://create.microsoft.com/en-us/template/business-plan-presentation-96423eb0-8e02-4a99-b83b-bc60d19202d5

Before After
image PPTX is accepted: image

Preview of Chunks, works fine for images and tables:imageimage

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/24184 **State:** closed **Merged:** No --- ## Summary This PR introduces simple PPTXExtractor to support PPTX files in the Knowledge in the environment with ETL_TYPE=dify (which is default deployment). By referring existing WordExtractor with [python-docx](https://pypi.org/project/python-docx/), this PR implements simple text-extaction method for PPTX: - Using [python-pptx](https://pypi.org/project/python-pptx/) by the same maintainer of python-docx. - Based on the WordExtractor with minimal modification. - Support extracting images, tables, and hyperlinks (with http or https) in the slides. Closes #24182 ## Screenshots **Example PPTX file (includes some images and tables)**: https://create.microsoft.com/en-us/template/business-plan-presentation-96423eb0-8e02-4a99-b83b-bc60d19202d5 | Before | After | |--------|-------| | <img width="678" height="260" alt="image" src="https://github.com/user-attachments/assets/5c8e17b4-19af-47c9-ab80-5f29190e7867" /> | PPTX is accepted: <img width="666" height="251" alt="image" src="https://github.com/user-attachments/assets/c4414bf9-b654-4ee6-b9b4-f28af2e0444c" /><br><br>Preview of Chunks, works fine for images and tables:<img width="1612" height="1190" alt="image" src="https://github.com/user-attachments/assets/59425351-856a-4eef-826f-0ff2a8da84fd" /><img width="1544" height="1314" alt="image" src="https://github.com/user-attachments/assets/c843265d-9605-45ca-bd59-4e3f36b0eb24" /> | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [ ] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:47:42 -05:00
yindo closed this issue 2026-02-21 20:47:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30541