Using the PDFVIewer’s url property does NOT call the onBeforeAjax callback.
Looking at the code, Webix does not allow for the PDF.js ‘httpHeaders’ property to be included in the getDocument call, so there’s no real way to provide headers to the server.
The only work-around I can think of is to fetch the Base64 data from the server, then call the PDF.js API with the PDF data bytes.
Faced the same problem: w/o setting request header (Access-Control-Allow-Origin: *) before calling “load”, the PDFViewer returns CORS error.
Even Webix example fails to work: https://snippet.webix.com/b0980dc6
“We will check how it can be improved”
Any changes since 2016?