Hello
I'm trying to use the component pe:documentViewer with PF11.0.0 and primefaces-extensions. The URL for the file I'm trying to view in the component is from a external URL.
However everytime I'm try to use it, the component is render with only the header but no a file is displayed. Instead of the file the following message is displayed in the screen and in the console:
PDF.js v2.11.338 (build: dedff3c98)
Message: file origin does not match viewer's
I try this same code with different versions of primefaces-extensions (11.0.0, 11.0.3, 11.0.5, 11.0.6) but nothing, all of them has the same results
documentViewer issues with PF-Ext 11
Yep if you are trying to load a URL that is not the same as your URL of your app that is a CORS issue: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
I would download the file in your Java code from the external site and then make that the value coming from your controller to render the PDF.
I would download the file in your Java code from the external site and then make that the value coming from your controller to render the PDF.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest