-
In the NextCloud, a folder can be shared by generating a link.
Once the shared link is opened, the entire contents of the folder is displayed.
Expected Behavior: When a PDF in the shared folder is opened, it opens a preview of the PDF.
Actual Behavior: If a PDF is opened in a shared folder, the PDF is not displayed. Instead, an error is displayed as follows:Invalid or corrupted PDF file. PDF.js v2.4.456 (build: 228a591c) Message: Invalid PDF structure.
How to replicate the bug.
- Create a folder in NextCloud and upload some PDF files to the folder.
- Share the folder by generating a share link (which is automatically copied to the clipboard)
- Open the folder using the share link (in an incognito tab of a browser)
- Once the folder is opened and the list of contents of files displayed, click on any PDF to open.
- The PDF will load in a preview mode, but instead of displaying the PDF, throw an error stating, 'invalid or corrupted PDF'.
Notes: If the PDF file is shared by generating a link and if the PDF is opened with this link, it loads correctly.
Only when the PDF is opened from the shared folder, the PDF does not load/open correctly.This bug is only in the recent update (Nextcloud 20.0.7). It was not there in the previous versions.
-
Thanks for the elaborate description, I guess that would be good reported upstream. There seems to be a few related issues already, maybe one of them is yours?
https://github.com/nextcloud/server/issues/25117
https://github.com/nextcloud/files_pdfviewer/issues/286 -
@nebulon said in Nextcloud : PDF does not load correctly if opened from shared folder:
Thanks for the elaborate description, I guess that would be good reported upstream. There seems to be a few related issues already, maybe one of them is yours?
https://github.com/nextcloud/server/issues/25117
https://github.com/nextcloud/files_pdfviewer/issues/286Thanks, @nebulon, https://github.com/nextcloud/files_pdfviewer/issues/286 matches the issue I am facing, I will follow that thread.