chore: update dependencies and improve OCR functionality

- Added @cherrystudio/pdf-to-img-napi dependency to package.json and yarn.lock for enhanced PDF processing.
- Updated pdfjs-dist to version 4.10.38 for improved PDF rendering capabilities.
- Modified MacSysOcrProvider to utilize the new pdf-to-img-napi module for OCR processing of PDF files.
- Removed unnecessary Windows build steps from the release workflow to streamline the process.
This commit is contained in:
suyao
2025-06-15 21:00:04 +08:00
parent f907f7fe5e
commit 4530872372
4 changed files with 145 additions and 262 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ export default class MacSysOcrProvider extends BaseOcrProvider {
Logger.info(`[OCR] Starting OCR process for file: ${file.name}`)
if (file.ext === '.pdf') {
try {
const { pdf } = await import('pdf-to-img')
const { pdf } = await import('@cherrystudio/pdf-to-img-napi')
const pdfBuffer = await fs.promises.readFile(file.path)
const results = await pdf(pdfBuffer, {
scale: 2