"Error loading annotations on page NaN" What produces this error?

WebViewer Version: 11.5.0

Do you have an issue with a specific file(s)?
No

Can you reproduce using one of our samples or online demos?
No

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?
No

Is your issue related to annotations?
Yes

Please give a brief summary of your issue:
(Think of this as an email subject)

I get this error but i can’t find where it comes from:

Error loading annotations on page NaN. This page will be skipped.: [object Object] webviewer-core.min.js:21:7153

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

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

1 Like

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


The error message “Error loading annotations on page NaN” typically suggests there may be an issue with the annotation data or the way it’s being processed. This could be due to incorrect page numbers being referenced or malformed annotation data.

Some things you can try:

  • Ensure that the annotation data you are loading is correctly formatted and references valid page numbers within your document.

  • Check if the documentId is specified correctly, especially if you’re using the serverUrl option for annotations.

  • Review your logic for loading annotations to ensure that it handles all cases and that page numbers are correctly parsed and passed to the viewer.

  • Consider adding logging or debugging statements to see the annotation data being processed and to identify where the NaN value might originate.

  • Ensure that your WebViewer instance is correctly initialized and that the document is fully loaded before attempting to load annotations.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

1 Like

Hi Peter,

Thank you for reaching out.

Could you provide the minimal sample project and the sample file for us to reproduce the issue?

You can find base samples here: Free Trial: JavaScript PDF Viewer | Apryse documentation

Best Regards,
Mickaël.

1 Like