summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-03-24 13:41:05 +0100
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-03-24 13:41:05 +0100
commite02f57ef7a1ea3b917070b00ad0fdfb6f589a1d7 (patch)
treeac38fb9b4dd4d715754c487ae4678c748f7467a0 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
parentb448e46f6c6369b1dc6f7abcffc6606e50ef7848 (diff)
downloadpdf-over-e02f57ef7a1ea3b917070b00ad0fdfb6f589a1d7.tar.gz
pdf-over-e02f57ef7a1ea3b917070b00ad0fdfb6f589a1d7.tar.bz2
pdf-over-e02f57ef7a1ea3b917070b00ad0fdfb6f589a1d7.zip
properly close opened pdf document, cf. #74
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
index f4d104d5..fdbc2580 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
@@ -108,10 +108,8 @@ public class OpenState extends State {
// scan for signature placeholders
// - see if we want to scan for placeholders in the settings
if (config.getEnablePlaceholderUsage()) {
- try {
+ try (PDDocument pddocument = PDDocument.load(getStateMachine().getStatus().getDocument())) {
// - scan for placeholders
- PDDocument pddocument = PDDocument.load(getStateMachine().getStatus().getDocument());
-
boolean useSignatureFields = config.getUseSignatureFields();
boolean useMarker = config.getUseMarker();
log.debug("Placeholder usage enabled. Signature fields: {}, QR Markers: {}", useSignatureFields, useMarker);