aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web
diff options
context:
space:
mode:
authorrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-09-23 14:48:12 +0000
committerrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-09-23 14:48:12 +0000
commit1a6fe82da2e01c7e0afa2a964d6c9aa74f34d45e (patch)
tree877999061ed1a2d93b1a4cb88ba1e2187ea27787 /pdf-as-web
parent8c30c02e8bb1dcecff3da0c3b1b10f6ecea804fd (diff)
downloadpdf-as-3-1a6fe82da2e01c7e0afa2a964d6c9aa74f34d45e.tar.gz
pdf-as-3-1a6fe82da2e01c7e0afa2a964d6c9aa74f34d45e.tar.bz2
pdf-as-3-1a6fe82da2e01c7e0afa2a964d6c9aa74f34d45e.zip
Added mobile-bku and mobile-test-bku as possible signature devices
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@804 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-web')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java
index 832b044..3b8937a 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java
@@ -21,6 +21,7 @@
* The "NOTICE" text file is part of the distribution. Any derivative works
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
+
package at.gv.egiz.pdfas.web.helper;
import java.io.IOException;
@@ -36,6 +37,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import at.gv.egiz.pdfas.PdfAsFactory;
import at.gv.egiz.pdfas.api.PdfAs;
import at.gv.egiz.pdfas.api.commons.Constants;
import at.gv.egiz.pdfas.api.commons.DynamicSignatureLifetimeEnum;
@@ -99,19 +101,20 @@ public class SignServletHelper
DataSink sink = new ByteArrayDataSink();
signParameters.setOutput(sink);
- /* // dynamically switch to pdf/a
- if (si.pdfa) {
+ // dynamically switch to pdf/a
+ /*if (si.pdfa) {
DynamicSignatureProfile dsp = pdfAs.createDynamicSignatureProfile(
signParameters.getSignatureProfileId(),
DynamicSignatureLifetimeEnum.AUTO
);
dsp.setPropertyRaw("key.SIG_PDFA1B_VALID", "true");
dsp.setPropertyRaw("table.main.Style.font", "TTF:DejaVuSansCondensed.ttf,8");
- dsp.setPropertyRaw("table.main.Style.valuefont", "TTF:DejaVuSansMono.ttf,8");
+ dsp.setPropertyRaw("table.main.Style.valuefont", "TTF:DejaVuSansMono.ttf,8");
dsp.apply();
signParameters.setSignatureProfileId(dsp.getName());
- }
- */
+ }*/
+
+
SignatureDetailInformation signatureDetail = pdfAs.prepareSign(signParameters);
si.sdi = signatureDetail;
@@ -169,7 +172,7 @@ public class SignServletHelper
String dispatch_to = LocalRequestHelper.processLocalSign(pdfAsInternal, si, request, response);
dispatch(request, response, dispatch_to, context);
- return;
+ return;
}
log.debug("Connector is not local -> finishing the sign."); //$NON-NLS-1$
@@ -223,11 +226,12 @@ public class SignServletHelper
String file_name = formatFileNameForSignResult(si.filename, si.output.getMimeType());
+
// tzefferer: added condition
if (si.exappinf == null)
{
-
- // The name parameter is actually deprecated in favour of
+
+ // The name parameter is actually deprecated in favour of
// Content-Disposition filename
// Unfortunately Acrobat reader does recognize neither of these parameters
// with its inline save-as. It always takes the page name.
@@ -292,7 +296,9 @@ public class SignServletHelper
* window.
*/
disableBrowserCacheForResponse(response);
- if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector) || Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) {
+
+ //rpiazzi added signature devices mobile and mobiletest
+ if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector) || Constants.SIGNATURE_DEVICE_MOC.equals(si.connector) || Constants.SIGNATURE_DEVICE_MOBILE.equals(si.connector) || Constants.SIGNATURE_DEVICE_MOBILETEST.equals(si.connector)) {
log.debug("Pdf-as is supposed to run within an iframe.");
log.debug("Putting external application notify url (\"" + query + "\") in session (" + session.getId() + ") for later use.");
session.setAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL, query);