Error with getFileData

WebViewer Version: 8

Do you have an issue with a specific file(s)? no
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server? no
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework? idk?
Is your issue related to annotations?

Please give a brief summary of your issue:
(Think of this as an email subject)
in making a call to getFileData, I receive the following error:
Uncaught (in promise) DOMException: Failed to execute ‘postMessage’ on ‘Worker’: # could not be cloned. Any ideas?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

This is my code snippet:

			const document = documentViewer?.getDocument();
			console.log('document is ', document);

			const xfdfString: any = annotManager?.exportAnnotations().then(async (xstring) => {
				const data = await document!.getFileData({
					// saves the document with annotations in it
					xfdfString,
				});
                             });

Hi dcheli
Thanks for contacting us for support.
From the code, I see that it is not correct just directly passing the undefined xfdfString to the function getFileData. Instead of doing this could you please try:

  instance.Core.annotationManager.exportAnnotations().then(async (xfdfString) => {
    const data = await doc.getFileData({
      // saves the document with annotations in it
      xfdfString,
    });
  });

Thanks I see my error and I was looking at it tooo long and overlooked that :frowning: Sorry for posting such a rookie mistake.

Dave

Hi Dave
No problem!! It’s good that I can help you! Any question any time!

Jack