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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user