Skip to content

feat: image export, PDF image compression, and hydration/worker fixes - #6

Open
dh031200 wants to merge 1 commit into
mainfrom
feat/image-export-compression-fixes
Open

feat: image export, PDF image compression, and hydration/worker fixes#6
dh031200 wants to merge 1 commit into
mainfrom
feat/image-export-compression-fixes

Conversation

@dh031200

@dh031200 dh031200 commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Add ImageExportModal: download pages as PNG/JPG in a ZIP (jszip)
  • Add image compression option in PDF settings (@jsquash/jpeg), with a fast path that recompresses embedded images only
  • Fix hydration mismatch on the title: useTranslations now renders en during SSR/hydration via useSyncExternalStore, then switches to the browser language
  • Skip service worker registration in development (next-pwa does not emit /sw.js there, causing a 404)
  • Load the pdf.js worker bundled from pdfjs-dist instead of a stale copy in /public. The lockfile bump to 5.7.284 mismatched the 5.4.149 worker and broke every PDF upload with "Failed to process ...".

Verification

  • Korean-locale Chrome on next dev: no hydration or sw.js errors, title renders as "PDF 마법사"
  • Uploaded a 2-page test PDF: both pages listed, no console errors
  • tsc --noEmit passes, npm run build succeeds and emits .next/static/media/pdf.worker.min.*.mjs

…er errors

- Add ImageExportModal to download pages as PNG/JPG in a ZIP (jszip)
- Add image compression option in PDF settings (@jsquash/jpeg), with a
  fast path that recompresses embedded images only
- Fix hydration mismatch: useTranslations now renders 'en' during SSR and
  hydration via useSyncExternalStore, then switches to the browser language
- Skip service worker registration in development (next-pwa does not emit
  /sw.js there, causing a 404)
- Load the pdf.js worker bundled from pdfjs-dist instead of a stale copy in
  /public; the lockfile bump to 5.7.284 mismatched the 5.4.149 worker and
  broke all PDF uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant