Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Demos/Spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>24.6</version>
<version>25.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected BaseAnnotator(AnnotationDataEntity annotationData, PageInfo pageInfo)
*/
protected final AnnotationBase initAnnotationBase(AnnotationBase annotationBase) {
// set page number to add annotation
annotationBase.setPageNumber(annotationData.getPageNumber() - 1);
annotationBase.setPageNumber(annotationData.getPageNumber());//-1
// set annotation type
annotationBase.setType(getType());
annotationBase.setCreatedOn(Date.from(Instant.now()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public AnnotatedDocumentEntity annotate(AnnotationPostedDataEntity annotateDocum

for (int i = 0; i < annotationsData.length; i++) {
AnnotationDataEntity annotationData = annotationsData[i];
PageInfo pageInfo = info.getPagesInfo().get(annotationsData[i].getPageNumber() - 1);
PageInfo pageInfo = info.getPagesInfo().get(annotationsData[i].getPageNumber() - 1);//-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);
Expand Down Expand Up @@ -507,7 +507,7 @@ public List<AnnotationBase> getAnnotationInfos(AnnotationPostedDataEntity annota
for (AnnotationDataEntity annotationData : annotationsData) {
// create annotator
// add annotation, if current annotation type isn't supported by the current document type it will be ignored
PageDataDescriptionEntity pageData = annotationPageDescriptionEntityList.get(annotationData.getPageNumber() - 1);
PageDataDescriptionEntity pageData = annotationPageDescriptionEntityList.get(annotationData.getPageNumber() - 1);//-1

PageInfo pageInfo = new PageInfo();
pageInfo.setHeight((int) pageData.getHeight());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static List<AnnotationDataEntity> mapForPage(List<AnnotationBase> annotat
// GroupDocs.Annotation library are obfuscated
for (int n = 0; n < annotations.size(); n++) {
AnnotationBase annotationInfo = annotations.get(n);
if (pageNumber == annotationInfo.getPageNumber() + 1) {
if (pageNumber == annotationInfo.getPageNumber()) {//+1
AnnotationDataEntity annotation = mapAnnotationDataEntity(annotationInfo, pageInfo);
pageAnnotations.add(annotation);
}
Expand Down Expand Up @@ -109,7 +109,7 @@ public static AnnotationDataEntity mapAnnotationDataEntity(AnnotationBase annota
annotation.setHeight(annotationInfo instanceof IBox ? boxHeight : (annotationInfo instanceof IPoints ? (maxY - minY) : 0));
annotation.setLeft(annotationInfo instanceof IBox ? boxX : (annotationInfo instanceof IPoints ? minX : 0));

annotation.setPageNumber((int)annotationInfo.getPageNumber() + 1);
annotation.setPageNumber((int)annotationInfo.getPageNumber());//+1
annotation.setSvgPath(annotationInfo instanceof ISvgPath ? (((ISvgPath)annotationInfo).getSvgPath().replace("l", "L")) : svgPath);

String text = "";
Expand Down