Perspective PDF Viewer frustrations

Hello friends,

We’re trying to use the Perspective PDF Viewer to display a PDF on a remote web site. The internal web site hosting the PDF requires authentication and, after authenticating, the session information is stored in a cookie.

It appears the JavaScript fetch being used to grab the PDFs via the PDF Viewer is not using “withCredentials: true” for the XMLHTTP request. I can see this in PerspectivePdfViewer.js:


Is there any way to populate the _withCredentials variable with “true” so that cookies are sent along with the web request to load the PDF into the PDF Viewer? Per Mozilla, the " fetch() won’t send cross-origin cookies unless you set the credentials [init option]."

Thanks in advance for the help.


1 Like