Which product are you using?
PDF.js Express Plus
PDF.js Express Version
Detailed description of issue
As in the title, I am encountering Error 500 when using the REST API for merging annotations onto the PDF displayed and checking the payload, it says the the license key being used is invalid. I’ve double-checked the key I am passing with my boss who has purchased the license (I can provide proof of purchase) and copied exactly the code from the section in the documentation on merging annotations using the REST API.
Expected behaviour
A successful response with the required information to acquire the flattened PDF
Does your issue happen with every document, or just one?
It happens with every document I’ve tried.
Link to document
{Provide a link to the document in question if possible}
Code snippet
It is exactly like the one in the provided documentation.
const docViewer = instance.docViewer;
const annotManager = instance.annotManager;
const documentId = $('input:hidden[name="documentId"]').val();
const xfdf = await annotManager.exportAnnotations();
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', 'license_key_here');