export_to_pdf #8

Merged
francesco.mangiacrapa merged 84 commits from export_to_pdf into master 2024-06-28 15:17:39 +02:00
2 changed files with 20 additions and 17 deletions
Showing only changes of commit 1f33e820d5 - Show all commits

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -25,7 +26,8 @@
<wb-module deploy-name="uri-resolver-2.10.0-SNAPSHOT"> <wb-module deploy-name="uri-resolver-2.10.0-SNAPSHOT">
@ -51,7 +53,8 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -77,7 +80,8 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -103,7 +107,8 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -135,13 +140,8 @@
<dependent-module archiveName="geoportal-data-mapper-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper"> <dependent-module archiveName="geoportal-data-mapper-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="geoportal-client-1.2.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="geoportal-common-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -167,7 +167,8 @@
<property name="context-root" value="uri-resolver"/> <property name="context-root" value="uri-resolver"/>
@ -193,7 +194,8 @@
<property name="java-output-path" value="/uri-resolver/target/classes"/> <property name="java-output-path" value="/uri-resolver/target/classes"/>
@ -219,7 +221,8 @@
</wb-module> </wb-module>

View File

@ -130,7 +130,7 @@ public class GeoportalExporter {
LOG.info("Serving request as client..."); LOG.info("Serving request as client...");
FileReference pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user); FileReference pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user);
InputStream input = new URL(pdfURL).openStream(); InputStream input = pdfRef.getStorageVolatileURL().openStream();
StreamingOutput so = new SingleFileStreamingOutput(input); StreamingOutput so = new SingleFileStreamingOutput(input);
ResponseBuilder response = Response.ok(so) ResponseBuilder response = Response.ok(so)
@ -307,7 +307,7 @@ public class GeoportalExporter {
html += "<p style=\"font-size: 18px;\">" + action + "</p>"; html += "<p style=\"font-size: 18px;\">" + action + "</p>";
if (waiting) { if (waiting) {
html += "<img alt=\"D4Science Geoportal Loading...\" src=\"img/loading-gears.gif\"><br />"; html += "<img alt=\"D4Science Geoportal Loading...\" src=\"uri-resolver/img/loading-gears.gif\"><br />";
} }
html += "<br/><p id=\"message\">" + message + "</p>"; html += "<br/><p id=\"message\">" + message + "</p>";