aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-cli/src/main/java')
-rw-r--r--pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java18
1 files changed, 0 insertions, 18 deletions
diff --git a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
index 4aceb329..1ab434d0 100644
--- a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
+++ b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
@@ -456,24 +456,6 @@ public class Main {
System.out.println("Signed document " + outputFile);
//make output file protected from copying and extraction content
-
- /*if(configuration.hasValue(DEFAULT_CONFIG_PROTECT_PDF) && IConfigurationConstants.TRUE.equalsIgnoreCase(configuration.getValue(DEFAULT_CONFIG_PROTECT_PDF)))
- {
- SecureRandom random = new SecureRandom();
- byte seed[] = random.generateSeed(50);
- String ownerPassword = new String(seed, StandardCharsets.UTF_8);
- PDDocument document = PDDocument.load(outputPdfFile);
- AccessPermission accessPermission = new AccessPermission();
- accessPermission.setCanExtractContent(false);
- accessPermission.setCanExtractForAccessibility(true);
- StandardProtectionPolicy spp = new StandardProtectionPolicy(ownerPassword,"",accessPermission);
- spp.setEncryptionKeyLength(128);
- spp.setPermissions(accessPermission);
- document.protect(spp);
- document.save(outputPdfFile);
- document.close();
- logger.info("Added Protection Parameters");
- }*/
}
private static void perform_verify(CommandLine cli) throws Exception {