diff options
author | emusic <emina.music@egiz.gv.at> | 2018-06-27 13:04:48 +0200 |
---|---|---|
committer | emusic <emina.music@egiz.gv.at> | 2018-06-27 13:04:48 +0200 |
commit | 85b644b1e7a10aa74196613b0daa921d8d721934 (patch) | |
tree | 786abc13caa2b9e3758e378349207cf193645c27 /pdf-as-web/src | |
parent | 797634c687c6f44d314e4baa3fed220d142eed73 (diff) | |
download | pdf-as-4-85b644b1e7a10aa74196613b0daa921d8d721934.tar.gz pdf-as-4-85b644b1e7a10aa74196613b0daa921d8d721934.tar.bz2 pdf-as-4-85b644b1e7a10aa74196613b0daa921d8d721934.zip |
small changes in pdfa
Diffstat (limited to 'pdf-as-web/src')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java index 4d3d1872..bc773ec8 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java @@ -95,31 +95,6 @@ public class PDFData extends HttpServlet { if (signedData != null) { - /*if (WebConfiguration.isPdfProtected()) { - File tempFile = new File(System.getProperty("java.io.tmpdir"),"protect.pdf"); - FileUtils.writeByteArrayToFile(tempFile, signedData); - Path tempPath = tempFile.toPath(); - SecureRandom random = new SecureRandom(); - byte seed[] = random.generateSeed(50); - String ownerPassword = new String(seed, StandardCharsets.UTF_8); - PDDocument document = PDDocument.load(tempFile); - 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(tempFile); - document.close(); - //accessPermission.setCanModify(false); - signedData = Files.readAllBytes(tempPath); - logger.info("Added Protection Parameters"); - if (tempFile.exists()) { - tempFile.delete(); - } - }*/ - if(WebConfiguration.isKeepSignedDocument()) { if(PdfAsHelper.isSignedDataExpired(request, response)) { logger.info("Destroying expired signed data in session"); |