I am running a local Tomcat server within which I am hosting a PDF report. Once my Tomcat server is up and running, if I enter the following URL in my browser:
https://localhost:9000/Report.pdf
Then the page displays just fine. But within my javascript application if I call window.open(https://localhost:9000/Report.pdf), then a page will open with that URL, but it will display as blank. Refreshing or reloading the page won’t help, I need to close the whole tab and paste the URL in order to get it to load properly.
The server is being linked through the Symphony Messaging application, so https is a must. I'm not quite sure if that's what's causing the error or windows.open just doesn't work with a pdf file. I've tested it with other file types (ex. https://localhost:9000/logo.png) and it works just fine.
I've seen some similar questions about passing a byte array into window.open to display a PDF, but this seems kind of redundant: do I really have to convert the PDF to a byte array and then have window.open convert it back to PDF format just to display?
FYI both the HTML page and underlying Javascript from which I am attempting to call window.open are hosted on localhost:9000 as well.