summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:39:20 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:39:20 +0000
commit42d292e5cee2fc282a09e7e0b307844deb27f368 (patch)
tree74b73a6e470bb589b034f29e8a8abe7f1c321bea /pdf-over-gui/src/main
parentd30ea266a1b0f617e9e90ba233b345490f217b4c (diff)
downloadpdf-over-42d292e5cee2fc282a09e7e0b307844deb27f368.tar.gz
pdf-over-42d292e5cee2fc282a09e7e0b307844deb27f368.tar.bz2
pdf-over-42d292e5cee2fc282a09e7e0b307844deb27f368.zip
Also show error for encrypted PDFs
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@435 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java5
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties3
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties3
3 files changed, 8 insertions, 3 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 c9e14898..8eb31752 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
@@ -182,11 +182,14 @@ public class PositioningComposite extends StateComposite {
this.pdf = new PDFFile(buf);
}
catch (PDFAuthenticationFailureException e) {
- throw new IOException(Messages.getString("error.PDFProtected"), e); //$NON-NLS-1$
+ throw new IOException(Messages.getString("error.PDFPwdProtected"), e); //$NON-NLS-1$
}
catch (IOException e) {
throw new IOException(Messages.getString("error.MayNotBeAPDF"), e); //$NON-NLS-1$
}
+ if (this.pdf.getDefaultDecrypter().isEncryptionPresent())
+ throw new IOException(Messages.getString("error.PDFProtected")); //$NON-NLS-1$
+
if (this.viewer == null) {
this.viewer = new SignaturePanel(this.pdf);
this.frame.add(this.viewer, BorderLayout.CENTER);
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index d713a009..8d174012 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -78,7 +78,8 @@ error.InvalidSettings=Invalid settings are still present. Please check your inpu
error.IOError=Input/Output Error
error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at
error.MayNotBeAPDF=This may not be a PDF file
-error.PDFProtected=This PDF file is password protected
+error.PDFProtected=This PDF file is encrypted and can therefore not be signed
+error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed
error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
error.PrepareDocument=Failed to prepare document for signature.
error.Retry=Retry
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 8c46bb2c..e4add447 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -78,7 +78,8 @@ error.InvalidSettings=Ungültige Einstellungen vorhanden. Bitte überprüfen.
error.IOError=Ein-/Ausgabe-Fehler
error.LocalBKU=Bitte prüfen sie, ob Ihre lokale BKU (Bürgerkartenumgebung) läuft\n\nSie benötigen eine BKU, um auf Ihre Bürgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at
error.MayNotBeAPDF=Dies ist möglicherweise keine PDF-Datei
-error.PDFProtected=Diese PDF-Datei ist Passwortgeschützt
+error.PDFProtected=Diese PDF-Datei ist verschlüsselt und kann daher nicht signiert werden
+error.PDFPwdProtected=Diese PDF-Datei ist Passwortgeschützt und kann daher nicht signiert werden
error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten.
error.Retry=Wiederholen