The AjaxRequestSettings
module is used to set the ajax Request Headers of PDF viewer.
<div id="pdfViewer" style="height: 100%;width: 100%;"></div>
let viewer: PdfViewer = new PdfViewer();
// HTTP header "X-Custom-Header": "Custom header value" // Custom HTTP header
viewer.ajaxRequestSettings = {
ajaxHeaders: [
{
headerName : "Authorization",
headerValue : "Bearer"
}
],
withCredentials: false
};
viewer.appendTo("#pdfViewer");
set the ajax Header values in the PdfViewer.
boolean
set the ajax credentials for the pdfviewer.