Search results

AjaxRequestSettings API in Vue PDF Viewer API component

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");

Properties

ajaxHeaders

IAjaxHeaders[]

set the ajax Header values in the PdfViewer.

withCredentials

boolean

set the ajax credentials for the pdfviewer.