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

Unable to open PDF manifest #963

Closed
1 of 3 tasks
akrizana opened this issue Feb 5, 2024 · 7 comments
Closed
1 of 3 tasks

Unable to open PDF manifest #963

akrizana opened this issue Feb 5, 2024 · 7 comments

Comments

@akrizana
Copy link

akrizana commented Feb 5, 2024

UV version: 4.0.10

 universalviewer@<4.0.10>

I'm submitting a:

  • bug report => please fork one of these codesandbox examples with a repro of your issue and include a link to it below
  • feature request => please use the user stories repo
  • support request => Please do not submit support requests here, use stackoverflow

Current behavior:

PDF files cannot be displayed on the new version (even your test exaples), while the older version is displaying PDF files normally.
Universal Viewer Examples (uv-v4.netlify.app) - new version v4
Universal Viewer Examples - older version v3

Expected behavior:

Be able to see PDFs like in v3

Steps to reproduce:

You can open the links I have pasted in this ticket, or visit website https://universalviewer.io/ --> View manifest --> https://uv-v4.netlify.app/#?manifest=&c=&m=&cv=&xywh=-2441%2C-197%2C7449%2C3936 --> Select one of the default PDF manifests.

Related code:

// insert any relevant code here

Other information:

@demiankatz
Copy link
Contributor

@akrizana, it sounds like you may be describing the problem that was fixed by #940 (and discussed in #939). This fix was released in UV 4.0.23. I suspect that you need to upgrade to a newer UV release, or else backport the fix to your version and rebuild. Please let me know if you need additional help!

@akrizana
Copy link
Author

akrizana commented Feb 6, 2024

Hi, yes it looks like that is the same problem. However, when I update a version in my package.json ("universalviewer": "^4.0.25") file with the newer version, UV doesn't load at all, regardless if it is PDF, image, video...

@demiankatz
Copy link
Contributor

Hmm, that is strange; what method are you using to load the UV? Are you getting any errors in your console? I know that some others are successfully running newer releases...

@akrizana
Copy link
Author

akrizana commented Feb 6, 2024

We have created preact component (preact version: 10.18.1) of universalviewer, and we are importing the following:

import { IIIFEvents as BaseEvents } from "universalviewer";
import { init, Viewer } from "universalviewer";

In our package.json we have defined the version "universalviewer": "^4.0.10", and with it everything, except pdf, work as expected. I can confirm that the error was with mozilla.github.io/pdf.js. When we update it to a newer version, the universalviewer block closes as soon as it appears.

As for the error in the console, we have 404 for /node_modules/extensions/uv-pdf-extension/config/config.json?import=
(Loading failed for the module with source “http://localhost/node_modules/extensions/uv-pdf-extension/config/config.json?import”.)

@demiankatz
Copy link
Contributor

I wonder if this might be related to the issue fixed by #959 (which was merged recently and hasn't been released yet). Can you try this with a dev build?

@akrizana
Copy link
Author

akrizana commented Feb 6, 2024

Works like a charm. Thank you. Could you tell me can I use this version until the release or I should wait for the official release?

@demiankatz
Copy link
Contributor

@akrizana, if it's working for your purposes, it's probably okay to use it. Official releases are helpful for support purposes since they're easy to talk about, but it may be a little while before the next official release as the community is trying to formalize some of our procedures, and that may take time. I wouldn't want you to be stuck with a broken viewer in the meantime!

I think this issue is now resolved, so I'm going to close it... but please feel free to open a new one if you run into further trouble.

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

No branches or pull requests

2 participants