Doc Extractor block extracts some PDF files with garbled code #12404

Closed
opened 2026-02-21 19:07:15 -05:00 by yindo · 4 comments
Owner

Originally created by @jalief on GitHub (Mar 31, 2025).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

The Document Extractor block extracts some PDF files that produce garbled code (with embedded fonts resulting?). The following are some suggestions:

  • 1, the doc extraction block will be PyPDF2 library to replace the current use of pypdfium2 library to parse pdf files
  • 2, the knowledge base of the pdf document extraction module to do the same replacement

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @jalief on GitHub (Mar 31, 2025). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. The Document Extractor block extracts some PDF files that produce garbled code (with embedded fonts resulting?). The following are some suggestions: * 1, the doc extraction block will be PyPDF2 library to replace the current use of pypdfium2 library to parse pdf files * 2, the knowledge base of the pdf document extraction module to do the same replacement ### 2. Additional context or comments No response ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 19:07:15 -05:00
yindo closed this issue 2026-02-21 19:07:15 -05:00
Author
Owner

@crazywoola commented on GitHub (Mar 31, 2025):

We are refactoring the RAG at this moment, we do know the limitation of the fixed extractor or some fixed methods. Afaik, we will split them into pipeline, so people can orchestrate things in workflow-like way

@crazywoola commented on GitHub (Mar 31, 2025): We are refactoring the RAG at this moment, we do know the limitation of the fixed extractor or some fixed methods. Afaik, we will split them into pipeline, so people can orchestrate things in workflow-like way
Author
Owner

@jalief commented on GitHub (Apr 1, 2025):

When is this part of the refactoring expected to go live?

@jalief commented on GitHub (Apr 1, 2025): When is this part of the refactoring expected to go live?
Author
Owner

@crazywoola commented on GitHub (Apr 16, 2025):

By the end of Q2

@crazywoola commented on GitHub (Apr 16, 2025): By the end of Q2
Author
Owner

@dosubot[bot] commented on GitHub (Aug 20, 2025):

Hi, @jalief. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that the Document Extractor block produces garbled text with some PDFs, likely due to embedded fonts.
  • You suggested replacing pypdfium2 with PyPDF2 for improved parsing.
  • You expressed interest in contributing to this improvement.
  • A maintainer mentioned an ongoing refactor of the RAG system to allow more flexible extraction pipelines, expected by the end of Q2.
  • This refactor may address the limitations you encountered, but no resolution has been implemented yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 20, 2025): Hi, @jalief. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that the Document Extractor block produces garbled text with some PDFs, likely due to embedded fonts. - You suggested replacing pypdfium2 with PyPDF2 for improved parsing. - You expressed interest in contributing to this improvement. - A maintainer mentioned an ongoing refactor of the RAG system to allow more flexible extraction pipelines, expected by the end of Q2. - This refactor may address the limitations you encountered, but no resolution has been implemented yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12404