The PDF Viewer library allows you to add header values for every Ajax request send from the PDF viewer. Header values can be added using the ajaxHeaders property available in the ajaxRequestSettings module.
Step 1: Follow the steps provided in the link to create simple PDF Viewer sample.
Step 2: The following code snippet explains how to add header values.
viewer.ajaxRequestSettings ={
ajaxHeaders: [
{
headerName: "Authorization",
headerValue: "Bearer 64565dfgfdsjweiuvbiuyhiueygf"
}
],
withCredentials: false
};
Find the Sample how to add Header values