|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package info.bukova.isspst.reporting;
|
|
|
|
|
|
|
|
|
|
import com.lowagie.text.Rectangle;
|
|
|
|
|
import com.lowagie.text.pdf.PdfAnnotation;
|
|
|
|
|
import com.lowagie.text.pdf.PdfFormField;
|
|
|
|
|
import com.lowagie.text.pdf.PdfName;
|
|
|
|
|
import net.sf.jasperreports.engine.JRGenericPrintElement;
|
|
|
|
@ -27,7 +26,8 @@ public class SignaturePdfHandler implements GenericElementPdfHandler, GenericEle
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void exportElement(JRPdfExporterContext exporterContext, JRGenericPrintElement element) {
|
|
|
|
|
PdfFormField field = PdfFormField.createSignature(exporterContext.getPdfWriter());
|
|
|
|
|
//PdfFormField field = PdfFormField.createSignature(exporterContext.getPdfWriter());
|
|
|
|
|
PdfFormField field = PdfFormField.createTextField(exporterContext.getPdfWriter(), true, false, 255);
|
|
|
|
|
Object param = element.getParameterValue("index");
|
|
|
|
|
String index = param != null ? String.valueOf(param) : null;
|
|
|
|
|
|
|
|
|
@ -37,7 +37,9 @@ public class SignaturePdfHandler implements GenericElementPdfHandler, GenericEle
|
|
|
|
|
field.setFieldName("signature");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
field.setFieldFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_LOCKED);
|
|
|
|
|
field.put(PdfName.V, exporterContext.getPdfWriter().getPdfIndirectReference());
|
|
|
|
|
field.setFieldFlags(PdfFormField.FF_READ_ONLY);
|
|
|
|
|
|
|
|
|
|
field.setWidget(new Rectangle(element.getX(),
|
|
|
|
|
exporterContext.getExportedReport().getPageHeight() - element.getY(),
|
|
|
|
|
element.getX() + element.getWidth(),
|
|
|
|
|