removed unused code

This commit is contained in:
Francesco Mangiacrapa 2023-11-21 14:32:47 +01:00
parent 0deeaff672
commit 5e2b90c1d4
3 changed files with 5 additions and 10 deletions

View File

@ -120,7 +120,7 @@
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext7-core</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
<type>pom</type>
</dependency>

View File

@ -3,13 +3,11 @@ package org.gcube.application.geoportaldatamapper.exporter;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.StandardCopyOption;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@ -185,7 +183,7 @@ public class Geoportal_PDF_Exporter {
try {
addPageNumber = Boolean.parseBoolean(pagenumber.getValue());
} catch (Exception e) {
// TODO: handle exception
// silent
}
if (addPageNumber) {
@ -199,12 +197,10 @@ public class Geoportal_PDF_Exporter {
try {
addWatermarker = watermarker.getValue();
} catch (Exception e) {
// TODO: handle exception
// silent
}
if (addWatermarker != null) {
// pdfDocument = addStringAsWatermark(pdfDocument, document,
// exportSource.getWatermarkText());
pdfDocument.addEventHandler(PdfDocumentEvent.END_PAGE, new WaterMarkerHandler(watermarker));
}
@ -221,9 +217,8 @@ public class Geoportal_PDF_Exporter {
}
}
// Project Name
// Project Title (i.e. project name)
PdfFont bold = PdfFontFactory.createFont(StandardFonts.TIMES_BOLD);
Text title = new Text(projectTitle).setFont(bold);
Style style = new Style();
style.setPaddingTop(20);

View File

@ -38,7 +38,7 @@ public class Geoportal_Export_To_PDF_Tests {
//private static String PROFILE_ID = "concessioni-estere";
private static String PROFILE_ID = "profiledConcessioni";
private static String PROJECT_ID = "6388e4f8a1e60e66b7b584ac";
private static String PROJECT_ID = "654e07a75bdd5478cca320c0";
// DEV
// 654e07a75bdd5478cca320c0