RED-4875 - remove spring boot in pom and add a javadoc-link

This commit is contained in:
Thomas Beyer 2023-03-21 11:16:57 +01:00
parent f971bd0ba0
commit 3e586722f2
2 changed files with 7 additions and 18 deletions

17
pom.xml
View File

@ -31,23 +31,6 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.pdftron</groupId>
<artifactId>PDFNet</artifactId>

View File

@ -74,14 +74,20 @@ public class InvisibleElementRemovalService {
pdfDoc.close();
}
/**
* This method is similar to {@link #removeInvisibleElements(InputStream, OutputStream, boolean)}, just with a PDFDoc
*/
@SneakyThrows
public void removeInvisibleElements(PDFDoc pdfDoc, boolean delta) {
execute(pdfDoc, delta);
}
@SneakyThrows
private void execute(PDFDoc pdfDoc, boolean delta) {
log.info("Start removing invisible Elements");
ElementWriter writer = new ElementWriter();
ElementReader reader = new ElementReader();
@ -93,7 +99,6 @@ public class InvisibleElementRemovalService {
visitedXObjIds.add(page.getSDFObj().getObjNum());
InvisibleElementRemovalContext context = InvisibleElementRemovalContext.builder()
.reader(reader)
.clippingPathStack(new ClippingPathStack(page.getMediaBox()))
@ -116,6 +121,7 @@ public class InvisibleElementRemovalService {
log.info("Finished removing invisible Elements");
}
private void removeClippedElementsAndInvisibleTextAndRememberOverlappedElements(Page page,
ElementWriter writer,
InvisibleElementRemovalContext context) throws PDFNetException {