From 85b644b1e7a10aa74196613b0daa921d8d721934 Mon Sep 17 00:00:00 2001 From: emusic Date: Wed, 27 Jun 2018 13:04:48 +0200 Subject: small changes in pdfa --- .../src/main/java/at/gv/egiz/pdfas/cli/Main.java | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'pdf-as-cli/src/main/java') 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 { -- cgit v1.2.3