nextcloud / nextcloud/text

Optimize PDF preview (bigger / scalable / hidden menu bar)

Open
#8,608 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

Is your feature request related to a problem? Please describe.
The preview for embedded PDF files is still very limited and the size of the preview-window is fixed. It's not possible to see the whole page of a Document in a reasonable size. Also the menu of the PDF.js viewer and the miniature side-panel (which is on by default) take a lot of valuable page/screen space. This essentially limits the preview to a hint of what's inside the document, forcing the user to scroll a lot. Also, the button to open the document in another tab to have a better view is hard to find.

Default view
Image

"full width editor" and hidden miniature-view
Image

Describe the solution you'd like
I think it would make a lot of sense to provide options to:

  • scale the size of the PDF preview by dragging a corner with the mouse
  • optionally remove or hide the top menu bar of the PDF.js viewer (is that possible?)
  • open in another tab

Example: OneNote
In OneNote there is a very nice function, when you drag a PDF into a page, that lets you insert a "print" of the page. The view of the document then has zero border, menu, or anything distracting you from the actual page content:

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the embedded PDF preview and its PDF.js viewer integration in the JavaScript frontend. Compare the current fixed-size preview with the supplied screenshots, then determine how resizing, hiding the viewer controls and side panel, and opening the document in another tab should work. Done means the preview offers the requested viewing options without obscuring the document.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.