Xfdf file exported from pdftron not importing back in

Product: pdftron webviewer
Product Version: 8.3.3

Please give a brief summary of your issue:
Xfdf file exported from pdftron not importing back in

Please describe your issue and provide steps to reproduce it:
We have a heavy-usage saas application whereby users are generating xfdf annotations to later be flattened into the pdf and saved off permanently. For some reason a small percentage of these xfdf files are not importing back into the pdftron webviewer, here is an example file (it’s an xfdf file not txt, for some reason couldn’t upload an xml or zip file):
109157210.txt (1.9 MB)

Is there a way to validate this file or determine what is the root cause for it not being imported properly?
We are passing the annotations on bootstrap of the Webviewer, but it is failing to render with the above xfdf file and failing silently (no console logs).

HI iybar,

This XFDF contains invalid escape characters. Was this copied from the browser console? The browser console has been known to add escape characters that make the XFDF invalid.

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

Can you give more detail on what is invalid in the xfdf specifically? This was the raw xml that came from pdftron afaik.
Do you know why PDFTron webviewer dies silently when trying to load an invalid xfdf? We’re not seeing any errors thrown out making it difficult to understand when this is happening for our customers and/or come up with a remediation.

Thanks!

Hi Ahmad Moaaz,

Do you have any update or guidance here? The xfdf provided was directly from PDFTron using exportAnnotations from the annotationManager.

Thanks!

Hello iybar,

Can you try using exportAnnotations with our latest version?
The mention of the copying from the browser console is because Chrome adds random /'s and incorrect quoting sometimes.

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron