diff options
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java | 24 |
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);
|