PDF.js Express Version
Detailed description of issue
I am having issues with a error that keeps up recurring on my production environment. I have followed step three from this documentation [[Open a document, add annotations, download | Documentation]]. I know that i would probably have to add in my License key, Client Key and Server Key to remove all water marks. When i try and click on this external button it fails out on the merge giveening me the error message below. I have check my domain to make sure that I have set it correctly. Which it is. It seems to be working on the viewer it self just not on the external download.
Thanks For you help
Expected behaviour
Right now i am getting this error in my console
Does your issue happen with every document, or just one?
Every Document
Link to document
{Provide a link to the document in question if possible}
Code snippet
This is the code snippet that i use to download the PDF externally from the viewer.
const pdfUtils = new ExpressUtils({
serverKey: "Server_Key",
clientKey: "Client_Key",
});
async function _DownloadContracts() {
try {
setVisibilityShowen(true);
const xfdf = await instance?.annotManager.exportAnnotations({});
const fileData = await instance?.docViewer.getDocument().getFileData({});
if (xfdf && fileData) {
const resp = await pdfUtils.setFile(fileData).setXFDF(xfdf).merge();
resp.license = "License_Key";
const mergedBlob = await resp.getBlob();
FileSaver.saveAs(mergedBlob, selectedFile.name);
}
} catch (e) {
} finally {
setVisibilityShowen(false);
}
}