Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pdfjs legacy build #2401

Closed
thanhchung06 opened this issue Jun 28, 2024 · 2 comments
Closed

Support pdfjs legacy build #2401

thanhchung06 opened this issue Jun 28, 2024 · 2 comments
Assignees
Labels
I'd like to help but it's difficult You've raised an issue that's just right - but for some reason, it's hard to solve. wontfix This will not be worked on

Comments

@thanhchung06
Copy link

release 20.x move to pdf 4 which case error Promise.withResolvers is not supported when open by old android webview.
As suggested by https://stackoverflow.com/questions/78415681/pdf-js-pdfjs-dist-promise-withresolvers-is-not-a-function, we should use legacy pdfjs.

Need an option to configure ngx-extended-pdf-viewer using pdfjs legacy build

@stephanrauh
Copy link
Owner

Please try [forceUsingLegacyES5]="true". If that doesn't solve the issue, I'm afraid I have to ask you to downgrade until you find a compatible version. However, I don't support old versions, so there are no bugfixes. Neither are there security fixes. This is a leisure-time project, and there's never enough leisure time, so I have to focus on making the majority of users happy. I hate that - I want everyone to be happy! - but there's only so much a guy can do.

In theory, you can force my viewer to use a different version of pdf.js, such as the ones published by Mozilla. However, I doubt that works well because my custom build contains many customizations and bug fixes. I know several developers successfully did that, but there's no guarantee the native pdf.js build is going to work.

@stephanrauh stephanrauh self-assigned this Jun 28, 2024
@stephanrauh stephanrauh added wontfix This will not be worked on I'd like to help but it's difficult You've raised an issue that's just right - but for some reason, it's hard to solve. labels Jun 28, 2024
@stephanrauh
Copy link
Owner

BTW, this reminds me of this discussion: #2337 (comment). I'm not entirely sure because I haven't tried it yet, but it should be possibly to polyfill Promise.withResolvers().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I'd like to help but it's difficult You've raised an issue that's just right - but for some reason, it's hard to solve. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants