Skip to content

Update react-fast-pdf to use modern pdfjs-dist lib - #40

Merged
mountiny merged 1 commit into
Expensify:mainfrom
rinej:use-only-modern-pdfjs-dist
Dec 19, 2024
Merged

Update react-fast-pdf to use modern pdfjs-dist lib#40
mountiny merged 1 commit into
Expensify:mainfrom
rinej:use-only-modern-pdfjs-dist

Conversation

@rinej

@rinej rinej commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

Details

In the PR we want to load only the modern version of pdf.worker.js from pdfjs-dist, it allows to use new features and perf optimisations technics.

slack discussion -> https://callstack-hq.slack.com/archives/C05LX9D6E07/p1734018797851159?thread_ts=1734018163.878969&cid=C05LX9D6E07

Related Issues

Expensify/App#54095

Manual Tests

  • Open the example app.
  • Open example PDF file.
  • Make sure that the file is displayed and are no warnings in the console

Linked PRs

Expensify/App#54250

@github-actions

github-actions Bot commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@rinej

rinej commented Dec 18, 2024

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@mountiny mountiny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mountiny
mountiny merged commit 6382967 into Expensify:main Dec 19, 2024
@os-botify

os-botify Bot commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 1.0.21 🎉

Comment thread example/webpack.config.js
{
// eslint-disable-next-line prefer-regex-literals
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs'),
test: new RegExp('node_modules/pdfjs-dist/build/pdf.worker.min.mjs'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming from Expensify/App#55176. Switching to the new version broke PDF rendering on iOS 17.x.

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.

4 participants