1

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.

dfader2
  • 131
  • 11
  • Possible duplicate : [addition Blank window opened with pdf file in javascript](http://stackoverflow.com/questions/32341466/addition-blank-window-opened-with-pdf-file-in-javascript) – A.Baudouin Jul 26 '16 at 14:35
  • What browsers have you tested? – Dark Falcon Jul 26 '16 at 14:45
  • Just Chrome. I don't have any other browsers capable of running the Symphony web app. It actually seems to be some sort of ssl / security issue as I've tested running the code outside of Symphony, and it works fine. – dfader2 Jul 27 '16 at 13:12

0 Answers0