Hi community !
I got some troubles using PDF Viewer widget of mappView. Here is what I would like to do :
I have some production report exported by MappReport that are saved on an external server (NAS). I would like to implement in my MappView application a page for the user where he can navigate through all reports available on the NAS.
For that the PLC send an HTTP request to a web server on the NAS, that return the list of report files available.
The NAS as a virtual host on the web server to redirect in the correponding folder, like this all report files are available using HTTP.
In my mappView application I have a PDF Viewer, for the moment I’ve hardcoded the source to a specific URL for tests. The widget is configure to usePlugin, this is because I need to have Android clients and Windows clients, on the Android clients I got I need this plugin else nothing is display.
So for example, my PLC as an IP address of : 192.168.200.2 so mappView is accessible on :
“http://192.168.200.2:81”
My NAS ip is : 192.168.200.150 and here is an example of url to access PDF :
“http://192.168.200.150/{virtual_host_name}/Production_report_2024_07_23_14_54_55.pdf”
My clients are on same subnet and have network access to PLC and NAS. When I go on my application and check PDF Viewer I got this error :
“PDF.js v2.9.359 (identifiant de compilation : e667c8cbc)
Message : file origin does not match viewer’s”
In PDF.js plugin that is used I see that if origin isn’t the same and the protocol is not “blob:” then an error is throw
Did someone have an idea to solve my issue, display PDF stored on external web server to mappView application ?
Regards,
Florent Boissadier