Thank you for sharing the details. We’ll take a look and update you.
Hello,
Please try updating to the latest version of the GroupDocs.Annotation library — the current version is 25.6.
If you encounter any issues after the update, please let us know, and we’ll be happy to assist you.
I am using groupdocs total 25.7
already updated older version
I am using groupdocs total 25.7
Spring demo sample using groupdocs annotation library directly GroupDocs.Annotation-for-Java/Demos/Spring/pom.xml at 289e4b7a33854f6da793d71cca91ef9bb34c476b · groupdocs-annotation/GroupDocs.Annotation-for-Java · GitHub
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>24.6</version>
</dependency>
needs to be changed to 25.6
already did that change
everything is workimng just page number has issue i am sending correct page number and when preview options are coming with annotation it is visible one page before where i have applied them
Please send your project as a ZIP archive so we can investigate the issue further
Actually its integrated in my system with java +angular but you can check your logic I have not touched that
We have opened the following new ticket in our internal issue tracking system and we will investigate the problem
Issue ID(s): #ANNOTATIONJAVA-1522
Thanks Issue is somewhere in this method
@Override
public AnnotatedDocumentEntity annotate(AnnotationPostedDataEntity annotateDocumentRequest) {
AnnotatedDocumentEntity annotatedDocument = new AnnotatedDocumentEntity();
try {
// get/set parameters
String documentGuid = annotateDocumentRequest.getGuid();
String password = annotateDocumentRequest.getPassword();
//String documentType1 = DocumentTypesConverter.checkedDocumentType(documentGuid, annotateDocumentRequest.getDocumentType());
String documentType = SupportedImageFormats.contains(
FilenameUtils.getExtension(annotateDocumentRequest.getGuid())
) ? “image” : annotateDocumentRequest.getDocumentType();
String tempPath = getTempPath(documentGuid);
AnnotationDataEntity[] annotationsData = annotateDocumentRequest.getAnnotationsData();
// initiate list of annotations to add
List annotations = new ArrayList<>();
final Annotator annotator = new Annotator(documentGuid, getLoadOptions(password));
try {
IDocumentInfo info = annotator.getDocument().getDocumentInfo();
for (int i = 0; i < annotationsData.length; i++) {
AnnotationDataEntity annotationData = annotationsData[i];
PageInfo pageInfo = info.getPagesInfo().get(annotationsData[i].getPageNumber() - 1);
// add annotation, if current annotation type isn’t supported by the current document type it will be ignored
try {
BaseAnnotator baseAnnotator = AnnotatorFactory.createAnnotator(annotationData, pageInfo);
if (baseAnnotator.isSupported(documentType)) {
annotations.add(baseAnnotator.getAnnotationBase(documentType));
}
} catch (java.lang.RuntimeException ex) {
throw new AnnotatorException(ex.getMessage(), ex);
}
}
} finally {
if (annotator != null) {
annotator.dispose();
}
}
// Add annotation to the document
removeAnnotations(documentGuid, password);
// check if annotations array contains at least one annotation to add
if (annotations.size() != 0) {
final Annotator annotator1 = new Annotator(documentGuid, getLoadOptions(password));
try {
//foreach to while statements conversion
Iterator tmp0 = (annotations).iterator();
while (tmp0.hasNext()) {
AnnotationBase annotation = (AnnotationBase) tmp0.next();
annotator1.add(annotation);
}
annotator1.save(tempPath);
} finally {
if (annotator1 != null) {
annotator1.dispose();
}
}
try (OutputStream fileStream = new FileOutputStream(documentGuid)) {
InputStream inputStream1 = new FileInputStream(tempPath);
IOUtils.copyLarge(inputStream1, fileStream);
}
}
annotatedDocument = new AnnotatedDocumentEntity();
annotatedDocument.setGuid(documentGuid);
if (annotateDocumentRequest.getPrint()) {
annotatedDocument.setPages(getAnnotatedPagesForPrint(password, documentGuid));
Files.move(Paths.get(documentGuid), Paths.get(annotateDocumentRequest.getGuid()));
}
} catch (Exception ex) {
// set exception message
throw new TotalGroupDocsException(ex.getMessage());
}
return annotatedDocument;
Hi Could you please update
Hello, we are continuing our investigation, as soon as there are updates we will inform you
sure please do it fast we are stuck with this issue
Hello, we have made the necessary corrections. GitHub - groupdocs-annotation/GroupDocs.Annotation-for-Java: GroupDocs.Annotation for Java examples, plugins, and showcase
sure I will check and confirm
Hi Team,
I have integrated the groupdocs viewer signature and annotation but document is loading slow even I am not loading all pages at once can you check why spring code has this loading issue in load description and load document page methods