Failed to load PDF document in Chrome

I have a PDF file stored on my server. I am unable to access the file using Google Chrome (or Ubuntu Chromium) via URL "sitename/pdfName.pdf"; while I am able to access the same PDF in Internet Explorer or FireFox without a problem. Chrome is giving this error: "Failed to load PDF document" Find attaching the error in this link Error Image.

456 1 1 gold badge 7 7 silver badges 19 19 bronze badges asked Aug 2, 2017 at 17:07 Sumit Dobhal Sumit Dobhal 151 1 1 gold badge 1 1 silver badge 9 9 bronze badges

4 Answers 4

We had object:none in our security policy inside web.config, that was causing chrome to refuse to open it, and pressing f12 in chrome and then click "console" shows the error message.

Changing web.config security policy to object:self fixed the problem

In our case we could open PDFs in firefox and IE but not in Chrome, so Chrome has a stricter implementation of the security policies.

The below is a suggested edit which I have not tested:

You may also find that Chrome has a problem with the header of the name: Content-Type value: charset=utf-8 . Removing it may fix it.

Also, as you are testing this, make sure that cache is not interfering with the response by keep on changing the request URL to something new sitename/pdfName.pdf?val=1 and then with the next test, ?val=2 and so on.