summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:39:08 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:39:08 +0000
commitd30ea266a1b0f617e9e90ba233b345490f217b4c (patch)
treee1a31539881536ef33bb3302f2bdf0732e114d20 /pdf-over-gui/src/main/java/at/asit
parent0596b077bdb07db40ebb067cdcda749f14cf6a9c (diff)
downloadpdf-over-d30ea266a1b0f617e9e90ba233b345490f217b4c.tar.gz
pdf-over-d30ea266a1b0f617e9e90ba233b345490f217b4c.tar.bz2
pdf-over-d30ea266a1b0f617e9e90ba233b345490f217b4c.zip
Show useful error msg if PDF is password protected
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@434 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index 8294c004..c9e14898 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -52,6 +52,7 @@ import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.SignaturePosition;
import com.sun.pdfview.PDFFile;
+import com.sun.pdfview.decrypt.PDFAuthenticationFailureException;
/**
* Composite which allows to position the signature on a preview of the document
@@ -180,6 +181,9 @@ public class PositioningComposite extends StateComposite {
{
this.pdf = new PDFFile(buf);
}
+ catch (PDFAuthenticationFailureException e) {
+ throw new IOException(Messages.getString("error.PDFProtected"), e); //$NON-NLS-1$
+ }
catch (IOException e) {
throw new IOException(Messages.getString("error.MayNotBeAPDF"), e); //$NON-NLS-1$
}