1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-10 18:00:11 +01:00

tweaks and fix for #1381

This commit is contained in:
Anthony Stirling 2024-06-05 21:16:22 +01:00
parent 6ffa80c386
commit 87be41117f
9 changed files with 11 additions and 12 deletions

View File

@ -172,14 +172,14 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.32' annotationProcessor 'org.projectlombok:lombok:1.18.32'
} }
tasks.withType(JavaCompile) { tasks.withType(JavaCompile).configureEach {
dependsOn 'spotlessApply' dependsOn 'spotlessApply'
} }
compileJava { compileJava {
options.compilerArgs << '-parameters' options.compilerArgs << '-parameters'
} }
task writeVersion { tasks.register('writeVersion') {
def propsFile = file('src/main/resources/version.properties') def propsFile = file('src/main/resources/version.properties')
def props = new Properties() def props = new Properties()
props.setProperty('version', version) props.setProperty('version', version)
@ -211,6 +211,6 @@ tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
task printVersion { tasks.register('printVersion') {
println project.version println project.version
} }

View File

@ -13,7 +13,7 @@ services:
timeout: 10s timeout: 10s
retries: 16 retries: 16
ports: ports:
- 8080:8080 - "8080:8080"
volumes: volumes:
- /stirling/latest/data:/usr/share/tessdata:rw - /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw - /stirling/latest/config:/configs:rw

View File

@ -13,7 +13,7 @@ services:
timeout: 10s timeout: 10s
retries: 16 retries: 16
ports: ports:
- 8080:8080 - "8080:8080"
volumes: volumes:
- /stirling/latest/data:/usr/share/tessdata:rw - /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw - /stirling/latest/config:/configs:rw

View File

@ -13,7 +13,7 @@ services:
timeout: 10s timeout: 10s
retries: 16 retries: 16
ports: ports:
- 8080:8080 - "8080:8080"
volumes: volumes:
- /stirling/latest/data:/usr/share/tessdata:rw - /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw - /stirling/latest/config:/configs:rw

View File

@ -13,7 +13,7 @@ services:
timeout: 10s timeout: 10s
retries: 16 retries: 16
ports: ports:
- 8080:8080 - "8080:8080"
volumes: volumes:
- /stirling/latest/config:/configs:rw - /stirling/latest/config:/configs:rw
- /stirling/latest/logs:/logs:rw - /stirling/latest/logs:/logs:rw

View File

@ -13,7 +13,7 @@ services:
timeout: 10s timeout: 10s
retries: 16 retries: 16
ports: ports:
- 8080:8080 - "8080:8080"
volumes: volumes:
- /stirling/latest/data:/usr/share/tessdata:rw - /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw - /stirling/latest/config:/configs:rw

View File

@ -117,7 +117,6 @@ public class PDFTableStripper extends PDFTextStripper {
/** /**
* Instantiate a new PDFTableStripper object. * Instantiate a new PDFTableStripper object.
* *
* @param document
* @throws IOException If there is an error loading the properties. * @throws IOException If there is an error loading the properties.
*/ */
public PDFTableStripper() throws IOException { public PDFTableStripper() throws IOException {

View File

@ -52,7 +52,7 @@ public class FileToPdf {
command.add("--paper-size"); command.add("--paper-size");
command.add("a4"); command.add("a4");
if (request.getZoom() != 1.0) { if (request != null && request.getZoom() != 1.0) {
// Create a temporary CSS file // Create a temporary CSS file
File tempCssFile = Files.createTempFile("customStyle", ".css").toFile(); File tempCssFile = Files.createTempFile("customStyle", ".css").toFile();
try (FileWriter writer = new FileWriter(tempCssFile)) { try (FileWriter writer = new FileWriter(tempCssFile)) {

View File

@ -19,7 +19,7 @@
</div> </div>
<form method="post" enctype="multipart/form-data" th:action="@{api/v1/misc/flatten}" id="pdfForm" class="mb-3"> <form method="post" enctype="multipart/form-data" th:action="@{api/v1/misc/flatten}" id="pdfForm" class="mb-3">
<div class="custom-file"> <div class="custom-file">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf', remoteCall='false')}"></div> <div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
</div> </div>
<div class="form-check ms-3"> <div class="form-check ms-3">
<input type="checkbox" id="flattenOnlyForms" name="flattenOnlyForms"> <input type="checkbox" id="flattenOnlyForms" name="flattenOnlyForms">