Pdf files not getting open in Nextcloud 28 with PDF viewer app

PDF file gets downloaded instead of getting open in nextcloud even after enabling PDF viewer app

Hi,

did you try this:

  1. Log out and log in again
  2. Do a hard reload without Cache: Ctrl + Shift + R (Cmd + Shift + R on macOS)

yes already tried in incognito mode as well

Does it happen for all PDF files, or just one specific file?

Unfortunately, I cannot help you further instead of basic suggestions like this (uninstall / reinstall or disable / enable the app etc). Since it works for everyone else, there must be something wrong with your configuration.

Is this a fresh install? How did you install Nextcloud?

Is there any additional app or setting needs to be enabled along with PDF viewer

@Pranjal Can you navigate to apps/files_pdfviewer/js and post the output of ls -li?

Maybe you have the same problem:

thanks @mritzmann for your suggestion

files_pdfviewer-public.js is present in apps/files_pdfviewer/js directory

I got the issue, somehow viewer app (GitHub - nextcloud/viewer: 🖼 Simple file viewer with slideshow for media) was not present in my /apps directory. After installing viewer app, PDF viewer app started working.

Hi, based on the posted log in Nextcloud 29.0.9: files_pdfviewer-public.js are missing · Issue #1080 · nextcloud/files_pdfviewer · GitHub, this looks like a jsresourceloader app issue:

{
    "reqId": "hisLNxFNFjl13wRNglUg",
    "level": 3,
    "time": "2024-11-07T13:59:13+00:00",
    "remoteAddr": "**",
    "user": "--",
    "app": "jsresourceloader", <-- here is the app name
    "method": "GET",
    "url": "/index.php/s/**",
    "message": "Could not find resource files_pdfviewer/js/files_pdfviewer-public.js to load",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0",
    "version": "29.0.9.2",
    "data": {
        "app": "jsresourceloader"
    }
}