Skip to content

Fix local Office processing, Korean fonts, and PDF previews - #109

Open
justinjoy wants to merge 4 commits into
lucasastorian:masterfrom
justinjoy:fix/local-office-preview
Open

justinjoy wants to merge 4 commits into
lucasastorian:masterfrom
justinjoy:fix/local-office-preview

Conversation

@justinjoy

Copy link
Copy Markdown

Local Office uploads could stay visibly processing after failure, fail to find an installed macOS LibreOffice, or open the original DOCX in the PDF viewer. Headless LibreOffice 26.8 on macOS could also omit Korean text because installed fonts were not discovered.

Changes:

  • Detect LibreOffice in system and user macOS Applications folders while preserving PATH precedence.
  • Include failed documents and their error messages in local document listings so upload status can settle.
  • Serve converted Office PDFs from local//converted.pdf, retain support for user-keyed caches, and return an explicit error when the PDF is unavailable.
  • Expose installed macOS fonts through symlinks in the disposable conversion profile, without modifying the application bundle or installed fonts.
  • Resolve PDF.js to its minified bundle in Webpack to avoid the development runtime collision.

Validation:

  • 72 focused Python tests passed across local extraction, reconciliation, uploads, schema, content writes, and file serving.
  • Web TypeScript check (npm run check) passed.
  • Verified actual DOCX conversion, application/pdf preview responses, and restored Korean text in the browser after reprocessing.

Existing PDFs generated without Korean fonts need reprocessing. Fonts unavailable on the host still use LibreOffice fallback fonts.

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