hello!
> You can use the PdfAcroForm for this.
>
> PdfAcroForm acroForm = aWriter.getAcroForm();
>
> and
>
> PdfFormField.createSignature(PdfWriter writer);
i don't understand this.
what i did is
// build the signature
PdfSignature pdfs=new PdfSignature("Adobe.PPKLite");
...
pdfs.setString("ByteRange",new String(brange));
pdfs.setSubFilter("adbe.pkcs7.detached");
sig=bytesToHex(sig).getBytes();
pdfs.setContents(sig);
pdfs.setName("10.10.10.200");
pdfs.put(PdfName.TYPE, new PdfName("Sig"));
...
// read and copy the object
reader=new PdfReader(INFILE);
n = reader.getNumberOfPages();
document = new Document(reader.getPageSizeWithRotation(1));
baos=new ByteArrayOutputStream();
writer = new PdfCopy(document, new
FileOutputStream("outfileunsigned.pdf"));
document.open();
for (int i = 0; i < n; ) {
++i;
page = writer.getImportedPage(reader, i);
writer.addPage(page);
System.out.println("Processed page " + i);
}
form = reader.getAcroForm();
if (form != null)
{
System.err.println("COPYING FORM!!!!");
writer.copyAcroForm(reader);
}
// here i add the signature
writer.addToBody( pdfs );
document.close();
// after this i manipulate the byte-array
how can i use
PdfAcroForm acroForm = writer.getAcroForm();
PdfFormField.createSignature(writer);
instead or additional?
i have build a signature object, is this useless for adding a formfield?
> With the standard implementation of iText you can generate
> a hidden signature (x,y,dx,dy all 0).
what is a hidden signature, does this mean it never shows in acrobat? what
is this good for?
> But to create a visible signature you'll have to do a lot more.
> I didn't manage to do it (luckily it wasn't a requirement in my case).
i dont need to see the signature like a watermark, but when i go to the
acrobat menu signatures, i'd like to see it.
regards
randolph
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions