You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using an iframe to display the viewer.html within a web application. The pdf itself is being served from a server so I am passing the server endpoint to the viewer file like this /pdfjs/web/viewer.html?file=${encodeURIComponent(url)}. This is all working as expected however I can't figure out how to pass parameters to pdfjs in this method. In particular, I need to set disableStream, disableAutoFetch, and httpHeaders. It appears there is such a thing as passing disableStream and disableAutoFetch as hashParams but if I understand correctly those are only supposed to be used for debugging purposes. In any event I wasn't able to get them to work. That still leaves me with the httpHeaders. These are additional authentication headers that I need pdfjs to send to my server for it to accept the request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using an iframe to display the viewer.html within a web application. The pdf itself is being served from a server so I am passing the server endpoint to the viewer file like this
/pdfjs/web/viewer.html?file=${encodeURIComponent(url)}
. This is all working as expected however I can't figure out how to pass parameters to pdfjs in this method. In particular, I need to setdisableStream
,disableAutoFetch
, andhttpHeaders
. It appears there is such a thing as passingdisableStream
anddisableAutoFetch
ashashParams
but if I understand correctly those are only supposed to be used for debugging purposes. In any event I wasn't able to get them to work. That still leaves me with thehttpHeaders
. These are additional authentication headers that I need pdfjs to send to my server for it to accept the request.Beta Was this translation helpful? Give feedback.
All reactions