It's what you want to do - not "how to recognize it". Do you ONLY want to sign the data OR do you want the sign the entire PDF? Adobe Reader supports signing & validation of both - it's up to your workflow/design/systems...
If you are using the PDF classes in iText, then you are creating a PDF signature and that will NOT appear in the XFA. The message from Reader says that you broke the "Reader Extensions" of the file in the way you signed it - it has NOTHING to do with XFA...You need to do an appended sign. -----Original Message----- From: Martin Sarfy [mailto:[email protected]] Sent: Monday, January 18, 2010 8:19 AM To: iText Questions Cc: Leonard Rosenthol Subject: Re: [iText-questions] Digital signature with XFA On Mon, Jan 18, 2010 at 03:39:50AM -0800, Leonard Rosenthol wrote: > Are you trying to sign ONLY the data in the XFA _OR_ are you trying to sign > the PDF? How can I recognize it? I mean, I need to sign PDF like Adobe Reader does when user clicks on signature widget in the form. In XDP dump, there is a <signature> widget and there is not any <signData> element in XDP dump. But when I made an experiment comparing unsigned XDP packed and signed XDP packet (signed in Adobe Reader by clicking on the signature widget), there is no XMLDigSig in <signature> field, both elements looks the same: <signature type="PDF1.6"> <border> <?templateDesigner StyleID aped3?> <edge stroke="lowered"/> </border> <margin/> <manifest action="all"/> </signature> So, if it is PDF signature, I'm trying to sign it by iText using following code: PdfStamper pdfStamper = PdfStamper.createSignature(reader, fout, '\0'); pdfStamper.getSignatureAppearance().setCrypto(privateKey, chain, null, PdfSignatureAppearance.VERISIGN_SIGNED); This works regulary for other PDF files, but in this case Adobe Reader shows the following message box: "This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available." Signature icon in acroread reports "Unsigned Signature Fields" "root[0].root[0].zapati[0].podpis[0].podpis[0]" (which coresponds to that <signature> field). Attached there is this PDF signed using iText and using Adobe Reader. Thanks for any help, Martin > > Data signatures use XMLDigSig and the information goes inside the XFA > <signature> block - as described in the XFA spec. A full document/PDF > signature is handled by standard PDF rules and can be done using iText. > > Leonard > > -----Original Message----- > From: Martin Sarfy [mailto:[email protected]] > Sent: Monday, January 18, 2010 3:37 AM > To: [email protected] > Subject: [iText-questions] Digital signature with XFA > > > Hello all, > > I would like to sign XFA form -- in the XFA there is a <signature> > field so (if I understand it correctly) it is not an "XFA signature" > but a "PDF signature" (as referred in XFA specification), hence the > scenario of extracting XFA, signing data using XMLDigSig and puting it > all together doesn't work here. > > Standard iText method for signing PDF doesn't work either -- no error > is reported by iText but in Adobe Reader, there is no signature (Adobe > reports missing signature in <signature> field). > > Any ideas, please? > > The PDF form is available at > http://epodatelna.justice.cz/ePodatelna/common/documents/ezoppex.pdf > > Thank you, > Martin > > > On Tue, Apr 28, 2009 at 17:51 -0700, Berns Cokee <[email protected]>wrote: > > > > I appreciate your advice Leonard. Thank you. > > > > On Tue, Apr 28, 2009 at 7:21 PM, Leonard Rosenthol > > <[email protected]>wrote: > > > > > In order to do data signatures in XFA, you will need to read the > > > XFA specification to understand how such signatures are applied > > > and included in the XFA structures. The technology is based on > > > standard XMLDigSig, as per the W3C, so you should be able to use > > > common components that implement that standard. But you’ll need > > > to put it all together – iText doesn’t have anything here to help you > > > (except getting/setting the XFA from the PDF). > > > > > > > > > > > > After you do the data signatures, you can use a standard PDF > > > signature, via itext, to sign the entire PDF. > > > > > > > > > > > > Leonard > > > > > > > > > > > > *From:* Berns Cokee [mailto:[email protected]] > > > *Sent:* Monday, April 27, 2009 11:26 PM > > > *To:* Post all your questions about iText here > > > *Subject:* Re: [iText-questions] Digital signature with XFA > > > > > > > > > > > > > > > Thank you for your immediate response. > > > > > > With regards to your question, I want both. The signature would be > > > applied to the entire document, as well as across some/all of the data > > > in the XFA. > > > Let's say I have a PDF form with subforms in it. Each subform > > > would have its own digital signature field. Aside from signatures > > > for each subform, there would also be a signature field that applies to > > > the entire PDF form. > > > > > > Do you think it's possible to set the signature values in the XFA > > > data? My plan is to extract the XFA data from an unfilled PDF > > > form, programmatically populate the XFA datasets including the > > > signature (if possible) , then stuff the XFA back into the PDF form. > > > > > > > > > > > > On Mon, Apr 27, 2009 at 8:07 PM, Leonard Rosenthol > > > <[email protected]> > > > wrote: > > > > > > Do you want a document signature on an XFA-based PDF _*OR*_ a data > > > signature across some/all of the data in the XFA? > > > > > > > > > > > > Leonard > > > > > > > > > > > > *From:* Berns Cokee [mailto:[email protected]] > > > *Sent:* Monday, April 27, 2009 7:33 AM > > > *To:* [email protected] > > > *Subject:* [iText-questions] Digital signature with XFA > > > > > > > > > > > > Could anyone please share some advice on how to set a digital > > > signature in an XFA using iText. I'm aware of the fact that XFA is > > > not fully supported yet by itext, but i'm hoping someone could > > > point me in the right direction. > > > > > > Although I was able to populate a signature field either by using > > > Acrobat or by itext API ( PdfStamper.createSignature(...) ), the > > > signature value didn't appear in the XFA (i.e. signature field under xfa: > > > dataset is empty). > > > Could someone please explain the reason for this. > > > > > > > > > Cheers > > > > > > > > > > > > ------------------------------------------------------------------ > > > ------------ Crystal Reports - New Free Runtime and 30 Day > > > Trial Check out the new simplified licensign option that enables > > > unlimited royalty-free distribution of the report engine for > > > externally facing server and web deployment. > > > http://p.sf.net/sfu/businessobjects > > > _______________________________________________ > > > iText-questions mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > Buy the iText book: http://www.1t3xt.com/docs/book.php > > > > > > > > > > > > > > > -- > > > Best Regards, > > > Berns > > > > > > > > > ------------------------------------------------------------------ > > > ------------ Register Now & Save for Velocity, the Web Performance > > > & Operations Conference from O'Reilly Media. Velocity features a > > > full day of expert-led, hands-on workshops and two days of > > > sessions from industry leaders in dedicated Performance & > > > Operations tracks. Use code vel09scf and Save an extra 15% before > > > 5/3. http://p.sf.net/sfu/velocityconf > > > _______________________________________________ > > > iText-questions mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > Buy the iText book: http://www.1t3xt.com/docs/book.php > > > Check the site with examples before you ask questions: > > > http://www.1t3xt.info/examples/ > > > You can also search the keywords list: > > > http://1t3xt.info/tutorials/keywords/ > > > > > > > > > > > -- > > Best Regards, > > Berns > > > > -------------------------------------------------------------------- > > ---------- Register Now & Save for Velocity, the Web Performance & > > Operations Conference from O'Reilly Media. Velocity features a full > > day of expert-led, hands-on workshops and two days of sessions from > > industry leaders in dedicated Performance & Operations tracks. Use > > code vel09scf and Save an extra 15% before 5/3. > > http://p.sf.net/sfu/velocityconf > > > > _______________________________________________ > > iText-questions mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > Buy the iText book: http://www.1t3xt.com/docs/book.php > > Check the site with examples before you ask questions: > > http://www.1t3xt.info/examples/ > > You can also search the keywords list: > > http://1t3xt.info/tutorials/keywords/ > > -- > Best regards, > Martin > > ---------------------------------------------------------------------- > -------- Throughout its 18-year history, RSA Conference consistently > attracts the world's best and brightest in the field, creating > opportunities for Conference attendees to learn about information > security's most important issues through interactions with peers, > luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > ---------------------------------------------------------------------- > -------- Throughout its 18-year history, RSA Conference consistently > attracts the world's best and brightest in the field, creating > opportunities for Conference attendees to learn about information > security's most important issues through interactions with peers, > luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ -- s pozdravem Martin Sarfy ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
