And there you go - once you show the definition of
navigateTo
, the problem becomes clear. 😊
All modern web browsers forbid a page served via
http:
or
https:
from navigating to a local file. This is a security measure, and cannot be bypassed.
The code works in Internet Explorer, because it's ancient, and is terribly insecure. Even Microsoft agree that
IE should not be used[
^].
You will need to create a handler on your site which reads the PDF file directly from the server and returns it to the user, so that the navigation is to an
http(s):
URL instead of a
file:
URL. That means your application will need to run as a user with sufficient permissions to read the files.