Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

Update PDF.js integration and dependencies

Open Ludy87 opened this issue 3 months ago • 3 comments

This pull request updates several dependencies and improves PDF processing compatibility and performance in the frontend. The most important changes are grouped below:

Dependency Upgrades and Tooling Improvements

  • Updated multiple dependencies in frontend/package.json and devDependencies, including major libraries such as react, @mui/material, @mantine/core, pdfjs-dist, and testing tools, to their latest versions for improved stability and security. [1] [2]
  • Switched build and test plugins from @vitejs/plugin-react to @vitejs/plugin-react-swc in both vite.config.ts and vitest.config.ts, which should result in faster builds and tests. [1] [2]

PDF.js Integration and Compatibility Fixes

  • Changed all imports of pdfjsLib to use the new ESM-compatible path pdfjs-dist/legacy/build/pdf.mjs in hooks and services, ensuring compatibility with the updated pdfjs-dist package. [1] [2] [3] [4]
  • Updated the PDF worker initialization in pdfWorkerManager.ts to use the correct ESM worker path, fixing worker loading issues with the new PDF.js version.

PDF Export Bug Fixes

  • Fixed PDF export in pdfExportService.ts by wrapping saved PDF bytes in a Uint8Array before creating a Blob, ensuring proper file encoding and compatibility. [1] [2]

Ludy87 avatar Sep 03 '25 03:09 Ludy87

oooo getting your foot into V2 now I see

Frooodle avatar Sep 04 '25 22:09 Frooodle

oooo getting your foot into V2 now I see

I still have to deal with something 😄

Ludy87 avatar Sep 04 '25 22:09 Ludy87

https://github.com/Stirling-Tools/Stirling-PDF/actions/runs/17528797431/attempts/1#summary-49782887434

Ludy87 avatar Sep 07 '25 12:09 Ludy87