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

Slideshow controls between multiple PDFs (like in nextcloud/viewer) #444

Open
tophneal opened this issue Jul 12, 2021 · 16 comments
Open

Slideshow controls between multiple PDFs (like in nextcloud/viewer) #444

tophneal opened this issue Jul 12, 2021 · 16 comments

Comments

@tophneal
Copy link

Steps to reproduce

  1. Enable Files viewer and Pdf viewer apps
  2. Navigate to folder of PDFs
  3. Open PDF in viewer lightbox

Expected behaviour

(More desired than expected behavior) Utilize same left/right controls that files viewer uses for photos/videos.

Actual behaviour

No controls, can only open a single PDF at a time.

Server configuration

Operating system:
Debian

Web server:
Apache2

Database:
MySql 10.3.30

PHP version:
7.4.19

Nextcloud version: (see Nextcloud admin page)
21.0.2

Where did you install Nextcloud from:
cloudamo script

(Excluding the rest of the info, as this is not an issue, but a feature request.)

Is this feature request a possibility? I understand from reading the initial issue submitted for this app to use nextcloud/viewer there may be limitations.

@skjnldsv
Copy link
Member

@jancborchardt does that make sense? I'm not sure tbh. Switching pdf like photos?

@tophneal
Copy link
Author

@jancborchardt does that make sense? I'm not sure tbh. Switching pdf like photos?

Precisely what I meant, yes! Sorry for any confusion in my explanation.

@gpz1100
Copy link

gpz1100 commented Oct 25, 2021

Or some means to switch to previous/next pdf in the folder without clicking on the X (top right corner) of the current one.

@pacaminda
Copy link

Any news on this? We are looking for exactly this feature

@tophneal
Copy link
Author

tophneal commented Feb 8, 2022

Found a better way to get what I was looking for. Came across this issue when troubleshooting errors from previews and used the advice to add "application/pdf", to the image mimetypes in /apps/viewer/viewer-main.js

Now the native file viewer loads pdfs and provides carousel controls to easily move to the next pdf!

@gpz1100
Copy link

gpz1100 commented Feb 8, 2022

@tophneal Can you clarify where and what exactly you're adding to the /apps/viewer/viewer-main.js file?

Not familiar at all with javascript, but looked at that file in notepad++, parsed through jstool (so it does the indents and all). Completely lost where to find the image mimetypes section. THanks!

@tophneal
Copy link
Author

tophneal commented Feb 8, 2022

@gpz1100 yes, I opened the file in vscode then searched for ‘mime’ until I reached a list with items like ‘image/jpg’ and add the ‘application/pdf’, to the end of the list/array.

@gpz1100
Copy link

gpz1100 commented Feb 8, 2022

@tophneal

I don't have viewer-main.js in .../apps/viewer, I have it in /var/www/nextcloud/apps/viewer/js. It's a pretty large file, 1,270,150 bytes.

It does not contain a line "image/jpg". Nextcloud 22.2.0 here.

@tophneal
Copy link
Author

tophneal commented Feb 8, 2022

@gpz1100

sorry for confusion, my NC is setup on a VPS, so locations may be a bit different. I’m also on v23, but idk if that affects this much or at all.

the folder you’re seeing would be the correct one. I placed mine in the file, around line 49109 for me. It should go into here:

Id: “images”,
Group: “media”,
Mimes: [ … ],

It’ll go in the list within the brackets.

@gpz1100
Copy link

gpz1100 commented Feb 8, 2022

Ok. Found the right spot by searching for image/png. I added "application/pdf" in the correct format as the rest of the entries. I now get an error when trying to open any kind of pdf file.

https://i.imgur.com/Wn9MLas.png

@tophneal

This comment was marked as off-topic.

@gpz1100

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@jancborchardt
Copy link
Member

This is possible e.g. in both preview on macOS, as well as in Google Drive. It is a nice quick way of jumping between documents if you want to check, and it would be good for us to have.

(In general it would also be good to look at the PDF viewer of Google Drive, it looks very sleek and would fit our style much more too.)

@gpz1100

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@joshtrichards joshtrichards changed the title Possible to utilize slideshow controls from nextcloud/viewer? Slideshow controls (like in nextcloud/viewer) Feb 19, 2025
@joshtrichards joshtrichards changed the title Slideshow controls (like in nextcloud/viewer) Slideshow controls between multiple PDFs (like in nextcloud/viewer) Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants