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

PDF Viewer: Full screen viewer #6821

Merged
merged 51 commits into from
Sep 11, 2022
Merged

Conversation

asrient
Copy link
Contributor

@asrient asrient commented Sep 5, 2022

This PR aims to bring the full-screen pdf viewer to desktop.
The full-screen viewer is rendered in an iframe similar to mini-viewer in a full-screen dialog modal.
To access the viewer, click on the pdf link or double click on any page in the embedded viewer to open that particular page.
Opening the file in an external viewer is still accessible from the full-screen viewer's menu.

The page rendering logic is revamped and a rendering queue is used to avoid certain bugs of simultaneous rendering. It also makes the text selectable with copy option on right click.

Demo

Screen Shot 2022-09-05 at 6 01 01 PM

full-screen-demo1.mov

packages/pdf-viewer/PdfDocument.ts Show resolved Hide resolved
packages/pdf-viewer/PdfDocument.ts Outdated Show resolved Hide resolved
packages/pdf-viewer/utils/renderQueue.test.ts Outdated Show resolved Hide resolved
packages/pdf-viewer/utils/renderQueue.ts Outdated Show resolved Hide resolved
@laurent22
Copy link
Owner

Thanks for the update, the queue code is simpler and clearer now, so let's merge

@laurent22 laurent22 merged commit f6a8bf9 into laurent22:dev Sep 11, 2022
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.

None yet

2 participants