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
6 changes: 3 additions & 3 deletions Demos/Dropwizard/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Groupdocs document & pdf annotator](https://raw.githubusercontent.com/groupdocs-annotation/groupdocs-annotation.github.io/master/resources/image/banner.png "GroupDocs.Annotation")
# GroupDocs.Annotation for Java Dropwizard Example
###### version 1.12.24
###### version 1.12.25

[![GitHub license](https://img.shields.io/github/license/groupdocs-annotation/GroupDocs.Annotation-for-Java-Dropwizard.svg)](https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Dropwizard/blob/master/LICENSE)

Expand Down Expand Up @@ -123,10 +123,10 @@ Download [latest release](https://github.com/groupdocs-annotation/GroupDocs.Anno
**Note**: This method is **recommended** for running this sample behind firewall.

```bash
curl -J -L -o release.tar.gz https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Dropwizard/releases/download/1.12.24/release.tar.gz
curl -J -L -o release.tar.gz https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Dropwizard/releases/download/1.12.25/release.tar.gz
tar -xvzf release.tar.gz
cd release
java -jar annotation-1.12.24.jar configuration.yaml
java -jar annotation-1.12.25.jar configuration.yaml
## Open http://localhost:8080/annotation/ in your favorite browser.
```

Expand Down
4 changes: 2 additions & 2 deletions Demos/Dropwizard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.groupdocs.ui</groupId>
<artifactId>annotation</artifactId>
<version>1.12.24</version>
<version>1.12.25</version>
<packaging>jar</packaging>

<name>GroupDocs.Annotation Dropwizard</name>
Expand Down Expand Up @@ -81,7 +81,7 @@
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>21.7.2</version>
<version>23.2</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Area;
return AnnotationType.AREA;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected Reply getAnnotationReplyInfo(CommentsEntity comment) {

@Override
protected int getType() {
return AnnotationType.Arrow;
return AnnotationType.ARROW;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected final AnnotationBase initAnnotationBaseDistanceAnnotator(AnnotationBas

@Override
protected int getType() {
return AnnotationType.Distance;
return AnnotationType.DISTANCE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Point;
return AnnotationType.POINT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Polyline;
return AnnotationType.POLYLINE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.ResourcesRedaction;
return AnnotationType.RESOURCES_REDACTION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextField;
return AnnotationType.TEXT_FIELD;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextHighlight;
return AnnotationType.TEXT_HIGHLIGHT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public AnnotationBase annotateWord() {

@Override
protected int getType() {
return AnnotationType.TextRedaction;
return AnnotationType.TEXT_REDACTION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextReplacement;
return AnnotationType.TEXT_REPLACEMENT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextStrikeout;
return AnnotationType.TEXT_STRIKEOUT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextUnderline;
return AnnotationType.TEXT_UNDERLINE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Watermark;
return AnnotationType.WATERMARK;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.groupdocs.ui.annotation.service;

import com.groupdocs.annotation.license.License;
import com.groupdocs.annotation.licenses.License;
import com.groupdocs.annotation.models.annotationmodels.AnnotationBase;
import com.groupdocs.annotation.Annotator;
import com.groupdocs.annotation.IDocumentInfo;
import com.groupdocs.annotation.exceptions.AnnotatorException;
import com.groupdocs.annotation.models.PageInfo;
import com.groupdocs.annotation.options.LoadOptions;
import com.groupdocs.annotation.options.PreviewFormats;
import com.groupdocs.annotation.options.pagepreview.PreviewFormats;
import com.groupdocs.annotation.options.export.AnnotationType;
import com.groupdocs.annotation.options.export.SaveOptions;
import com.groupdocs.annotation.options.pagepreview.CreatePageStream;
Expand Down Expand Up @@ -146,7 +146,12 @@ public final AnnotatedDocumentEntity loadDocument(LoadDocumentRequest loadDocume
try {
annotator = new Annotator(guid, loadOptions);

IDocumentInfo info = annotator.getDocument().getDocumentInfo();
IDocumentInfo info = null;
try {
info = annotator.getDocument().getDocumentInfo();
} catch (IOException e) {
e.printStackTrace();
}
List<AnnotationBase> annotations = annotator.get();

description.setGuid(loadDocumentRequest.getGuid());
Expand Down Expand Up @@ -301,7 +306,7 @@ public InputStream annotateDocument(String documentGuid, String documentType, Li
Annotator annotator = new Annotator(documentGuid);

SaveOptions saveOptions = new SaveOptions();
saveOptions.setAnnotationTypes(AnnotationType.None);
saveOptions.setAnnotationTypes(AnnotationType.NONE);

annotator.save(documentGuid, saveOptions);

Expand Down Expand Up @@ -448,7 +453,7 @@ public static void removeAnnotations(String documentGuid, String password) {
final Annotator annotator = new Annotator(inputStream, getLoadOptions(password));
try {
SaveOptions tmp0 = new SaveOptions();
tmp0.setAnnotationTypes(AnnotationType.None);
tmp0.setAnnotationTypes(AnnotationType.NONE);
annotator.save(tempPath, tmp0);
} finally {
if (annotator != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ public class DocumentTypesConverter {
* @return int
* @param documentType string
*/
public static int getDocumentType(String documentType) {
switch (documentType) {
case "Portable Document Format":
case "PDF":
return DocumentType.Pdf;
case "Microsoft Word":
case "WORDS":
case "Microsoft Word Open XML format (.docx)":
return DocumentType.Words;
case "Microsoft PowerPoint":
case "SLIDES":
return DocumentType.Slides;
case "image":
return DocumentType.Images;
case "Microsoft Excel":
case "CELLS":
return DocumentType.Cells;
case "AutoCAD Drawing File Format":
case "diagram":
return DocumentType.Diagram;
default:
return DocumentType.Undefined;
}
}
// public static int getDocumentType(String documentType) {
// switch (documentType) {
// case "Portable Document Format":
// case "PDF":
// return DocumentType.Pdf;
// case "Microsoft Word":
// case "WORDS":
// case "Microsoft Word Open XML format (.docx)":
// return DocumentType.Words;
// case "Microsoft PowerPoint":
// case "SLIDES":
// return DocumentType.Slides;
// case "image":
// return DocumentType.Images;
// case "Microsoft Excel":
// case "CELLS":
// return DocumentType.Cells;
// case "AutoCAD Drawing File Format":
// case "diagram":
// return DocumentType.Diagram;
// default:
// return DocumentType.Undefined;
// }
// }

/**
* Check image and diagram document types
Expand Down
6 changes: 3 additions & 3 deletions Demos/Spring/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Groupdocs document & pdf annotator](https://raw.githubusercontent.com/groupdocs-annotation/groupdocs-annotation.github.io/master/resources/image/banner.png "GroupDocs.Annotation")
# GroupDocs.Annotation for Java Spring Example
###### version 1.12.27
###### version 1.12.28

[![GitHub license](https://img.shields.io/github/license/groupdocs-annotation/GroupDocs.Annotation-for-Java-Spring.svg)](https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Spring/blob/master/LICENSE)

Expand Down Expand Up @@ -131,10 +131,10 @@ Download [latest release](https://github.com/groupdocs-annotation/GroupDocs.Anno
**Note**: This method is **recommended** for running this sample behind firewall.

```bash
curl -J -L -o release.tar.gz https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Spring/releases/download/1.12.27/release.tar.gz
curl -J -L -o release.tar.gz https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java-Spring/releases/download/1.12.28/release.tar.gz
tar -xvzf release.tar.gz
cd release
java -jar annotation-spring-1.12.27.jar configuration.yml
java -jar annotation-spring-1.12.28.jar configuration.yml
## Open http://localhost:8080/annotation/ in your favorite browser.
```

Expand Down
22 changes: 19 additions & 3 deletions Demos/Spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.groupdocs.ui</groupId>
<artifactId>annotation-spring</artifactId>
<version>1.12.25</version>
<version>1.12.28</version>
<packaging>${packaging.type}</packaging>

<name>GroupDocs.Annotation for Java Spring Sample</name>
Expand Down Expand Up @@ -128,13 +128,24 @@
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>

<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>21.7.2</version>
<version>23.2</version>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-note</artifactId>
<version>22.3</version>
<classifier>jdk17</classifier>
</dependency>


<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -153,6 +164,11 @@
<name>GroupDocs Java API</name>
<url>https://artifact.groupdocs.com/repo/</url>
</repository>
<repository>
<id>aspose-central</id>
<name>repository.aspose.com-releases</name>
<url>https://repository.aspose.com/repo</url>
</repository>
</repositories>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Area;
return AnnotationType.AREA;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected Reply getAnnotationReplyInfo(CommentsEntity comment) {

@Override
protected int getType() {
return AnnotationType.Arrow;
return AnnotationType.ARROW;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected final AnnotationBase initAnnotationBaseDistanceAnnotator(AnnotationBas

@Override
protected int getType() {
return AnnotationType.Distance;
return AnnotationType.DISTANCE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Point;
return AnnotationType.POINT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.Polyline;
return AnnotationType.POLYLINE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.ResourcesRedaction;
return AnnotationType.RESOURCES_REDACTION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextField;
return AnnotationType.TEXT_FIELD;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public AnnotationBase annotateDiagram() {

@Override
protected int getType() {
return AnnotationType.TextHighlight;
return AnnotationType.TEXT_HIGHLIGHT;
}
}
Loading