Please give a brief summary of your issue:
Can not find any annotation.
Conditional expression: !import_list.empty() || !strings.empty()
Please describe your issue and provide steps to reproduce it:
We’re generating annotations using the server SDK, but when viewing it on the web viewer, we saw bunch of errors in the console log tab of browser
Exception:
Message: Exception:
Message: Can not find any annotation.
Conditional expression: !import_list.empty() || !strings.empty()
Version : 11.5.0-0bf366ff78
Platform : Emscripten
Architecture : Emscripten
Filename : AnnotationConversion.cpp
Function : WriteAppearancesAsXod
Linenumber : 164
Filename:
Function:
Linenumber:
Please provide a link to a minimal sample where the issue is reproducible:
You can replicate the issue with these files in the showcase page. semantic_1.pdf (215.2 KB) semantic_1.xml (876 Bytes)
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re encountering an issue with annotations not being found when viewing them in WebViewer, which could be related to how annotations are being generated or imported. This error message suggests a problem with the annotation list being empty or improperly formatted during the conversion process.
Some things you can try:
Ensure that the annotations are correctly formatted and associated with the PDF document. You may need to verify the annotation data structure.
Check if the server SDK is generating the annotations as expected and that they are being correctly loaded into WebViewer.
Verify that the document and annotations are being loaded with the correct paths and identifiers.
Consider using the loadDocument method to ensure documents and their respective annotations are properly loaded into the viewer.
Can you describe the exact steps to get your error? Opening the semantic_1.pdf in https://showcase.apryse.com/ does not generate any console exceptions for me.
That specific exception you’re getting appears to be because you’re trying to convert the PDF to Xod, but the file does not contain any annotations. Can you provide more info on what you are trying to achieve?
I believe this issue is related to the annotations appearance. The apref tag references an appearance object on the PDF document which is why there are errors if you try importing the annotations to a different document. Even if the semantic_1.pdf was used on the backend to create these annotations, once you save the document without annotations the appearance object is removed.
If you remove the apref tag, then the error disappears when importing.