Skip to content

Only call PDFDocumentProxy.getPermissions, in the viewer, when pdfjs.enablePermissions is set (PR 14362 follow-up) #14364

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

Conversation

Snuffleupagus
Copy link
Collaborator

By making this API-call unconditionally, we introduce a (slight) delay in the initialization of all documents.
That seems quite unfortunate, since pdfjs.enablePermissions is off by default, and it thus seem better only do the API-call when actually needed; sorry about this!

…js.enablePermissions` is set (PR 14362 follow-up)

By making this API-call *unconditionally*, we introduce a (slight) delay in the initialization of *all* documents.
That seems quite unfortunate, since `pdfjs.enablePermissions` is off by default, and it thus seem better only do the API-call when actually needed; sorry about this!
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/2cf7388c3260fcf/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/2cf7388c3260fcf/output.txt

Total script time: 4.31 mins

Published

@timvandermeij timvandermeij merged commit d47b673 into mozilla:master Dec 12, 2021
@timvandermeij
Copy link
Contributor

Good point; even though it's a minor delay, it's better to avoid it. Thanks!

@Snuffleupagus Snuffleupagus deleted the BaseViewer-conditional-getPermissions branch December 12, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants