[PR #3221] [MERGED] Drop Node canvas for manual sharp conversion #4239

Closed
opened 2026-02-22 18:35:25 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3221
Author: @timothycarambat
Created: 2/14/2025
Status: Merged
Merged: 2/14/2025
Merged by: @timothycarambat

Base: masterHead: sharp-pdf-image-converter


📝 Commits (3)

  • 09dbe6f Drop Node canvas for manual sharp conversion
  • 0e65c17 bump dev
  • 2fe1d91 Merge branch 'master' into sharp-pdf-image-converter

📊 Changes

5 files changed (+94 additions, -126 deletions)

View changed files

📝 .github/workflows/dev-build.yaml (+1 -1)
📝 collector/package.json (+1 -2)
collector/utils/OCRLoader/CanvasFactory.js (+0 -52)
📝 collector/utils/OCRLoader/index.js (+91 -35)
📝 collector/yarn.lock (+1 -36)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

What is in this change?

  • Removes canvas parser for sharp PDF to image parsing to it will work with tesseract. It is about 50% faster and canvas binary support is pretty bad.

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/3221 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 2/14/2025 **Status:** ✅ Merged **Merged:** 2/14/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `sharp-pdf-image-converter` --- ### 📝 Commits (3) - [`09dbe6f`](https://github.com/Mintplex-Labs/anything-llm/commit/09dbe6f97cd0cee159ee0b6d8e3f12cca89d7577) Drop Node `canvas` for manual `sharp` conversion - [`0e65c17`](https://github.com/Mintplex-Labs/anything-llm/commit/0e65c17c760bab0650a38a147367ecb3efa28110) bump dev - [`2fe1d91`](https://github.com/Mintplex-Labs/anything-llm/commit/2fe1d91d3d2f11d44a071c8a247c3bf0d1d431f3) Merge branch 'master' into sharp-pdf-image-converter ### 📊 Changes **5 files changed** (+94 additions, -126 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/dev-build.yaml` (+1 -1) 📝 `collector/package.json` (+1 -2) ➖ `collector/utils/OCRLoader/CanvasFactory.js` (+0 -52) 📝 `collector/utils/OCRLoader/index.js` (+91 -35) 📝 `collector/yarn.lock` (+1 -36) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### What is in this change? - Removes `canvas` parser for `sharp` PDF to image parsing to it will work with tesseract. It is about 50% faster and canvas binary support is pretty bad. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:35:25 -05:00
yindo closed this issue 2026-02-22 18:35:25 -05:00
yindo changed title from [PR #3221] Drop Node `canvas` for manual `sharp` conversion to [PR #3221] [MERGED] Drop Node `canvas` for manual `sharp` conversion 2026-06-05 15:17:32 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4239