Which product are you using?
PDF.js Express Plus
PDF.js Express Version
UI Version = 8.7.0
Core version = 8.7.5
Detailed description of issue
I’m trying to use the PDF.js Express REST API to merge annotations onto a document and allow the user to download the resulting PDF. I have added the key the request but I’m still getting the watermark.
Expected behaviour
Expected to download PDF without the watermark or to receive an error if the wrong key is used.
Does your issue happen with every document, or just one?
Every document
Link to document
N/A
Code snippet
const data = new FormData();
data.append('xfdf', xfdf);
data.append('file', blob);
const licenceKey = getLicenceKeyForDownload();
if(typeof licenceKey === 'string') {
data.append('key', licenceKey);
}
// Process the file
const response = await fetch('https://api.pdfjs.express/xfdf/merge', {
method: 'post',
body: data
}).then(resp => resp.json());
const { url, key, id, error } = response;
if(error !== undefined) {
console.error(error);
}
// Download the file
const mergedFileBlob = await fetch(url, {
headers: {
Authorization: key
}
}).then(resp => resp.blob());