Which product are you using?
PDF.js Express Plus
PDF.js Express Version
|UI version|‘8.1.0’|
|Core version|‘8.1.1’|
|Build|‘MTAvMjEvMjAyMXw2OGY2MTQ1NWU=’|
|WebViewer Server|false|
|Full API|false|
Detailed description of issue
We recently bought your product.
After adding the keys however we started experiencing an issue where calls to the “api.pdfjs.express/xfdf/merge” endpoint would return: Code: 26 Messager: “Origin does not match the domain set on license key”
We are calling the endpoint from a a subdomain of the domain set in the account settings of the account we bought the licence with.
Expected behaviour
A successful API call returning the { url, key, id }
Does your issue happen with every document, or just one?
Every document. Every call to the API.
Code snippet
const xfdf = await annotationManager.exportAnnotations({ links: false, widgets: false, useDisplayAuthor: true });
const fileData = await docViewer.getDocument().getFileData({});
const blob = new Blob([fileData], { type: ‘application/pdf’ });
const data = new FormData();
data.append(‘xfdf’, xfdf);
data.append(‘file’, blob);
data.append(‘license’, ‘ourclientlicencekey’);
const response = await fetch(‘https://api.pdfjs.express/xfdf/merge’, {
method: ‘post’,
body: data
}).then(resp => resp.json());
const { url, key, id } = response;