Thanks Paulo,

I believe I need to get the content from each extracted pdf  ( from the
revision) rather than from the main pdf.

Regards,
Wahaj

"Paulo Soares" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Have a look at the source of AcroFields.updateByteRange().
>
> Paulo
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Wahaj Khan
> > Sent: Tuesday, July 11, 2006 6:20 PM
> > To: [email protected]
> > Subject: Re: [iText-questions] Getting PDF from a revision
> >
> > Thanks Paulo,
> >
> > I have got it working now but I was expecting that when I get
> > the revision
> > pdf I will get the actual PDF which was signed without
> > signature rather than
> > the pdf with the signature. My question is can I get the pdf
> > contents which
> > was actually signed excluding the Content area i.e. the PKCS7
> > ( which was
> > ofcourse not part of the hash).  I want to verify the
> > signatures my self, I
> > have the PKCS7, I just need the content which was hashed at
> > the time signing
> > and then I can verify them externally.
> >
> > Regards,
> > Wahaj
> >
> >
> > "Paulo Soares" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > Works for me using the following code and the latest iText version.
> >
> > PdfReader reader = new PdfReader("c:\\hello.pdf");
> > AcroFields af = reader.getAcroFields();
> > ArrayList names = af.getSignatureNames();
> > for (int k = 0; k < names.size(); ++k) {
> >     String name = (String)names.get(k);
> >     System.out.println("Signature name: " + name);
> >     System.out.println("Signature covers whole document: " +
> > af.signatureCoversWholeDocument(name));
> >     System.out.println("Document revision: " +
> > af.getRevision(name) + "
> > of " + af.getTotalRevisions());
> >     FileOutputStream out = new FileOutputStream("c:\\hello_" + name +
> > ".pdf");
> >     byte bb[] = new byte[22222];
> >     InputStream ip = af.extractRevision(name);
> >     int n = 0;
> >     while ((n = ip.read(bb)) > 0)
> >         out.write(bb, 0, n);
> >     out.close();
> >     ip.close();
> > }
> >
> >
> > Paulo
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On
> > > Behalf Of Wahaj Khan
> > > Sent: Tuesday, July 11, 2006 12:11 PM
> > > To: [email protected]
> > > Subject: Re: [iText-questions] Getting PDF from a revision
> > >
> > > Yes I can, see attached PDF document. I am using iText-paulo
> > > 154. Also when
> > > I call
> > > m_objAcroFields.signatureCoversWholeDocument(str_FieldName) I am
> > > getting false.
> > >
> > > Regards,
> > > Wahaj
> > >
> > > "Paulo Soares" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > Can you verify that revision in Acrobat?
> > > >
> > > > Paulo
> > > >
> > > > ----- Original Message -----
> > > > From: "Wahaj Khan" <[EMAIL PROTECTED]>
> > > > To: <[email protected]>
> > > > Sent: Monday, July 10, 2006 8:25 PM
> > > > Subject: [iText-questions] Getting PDF from a revision
> > > >
> > > >
> > > > > Hi All,
> > > > >
> > > > > I am trying get a PDF which was actually signed using the
> > > function:
> > > > > objAcroFields.extractRevision(SignatureFieldName)
> > > > > I am able to get the inputStream but when I am reading
> > > this stream I
> > > get:
> > > > >
> > > > > java.io.EOFException
> > > > > at
> > > > >
> > > com.lowagie.text.pdf.RandomAccessFileOrArray.readFully(RandomA
> > > ccessFileOrArr
> > > > > ay.java:223)
> > > > >
> > > > > Am I doing some thing wrong here ?
> > > > >
> > > > > Regards,
> > > > > Wahaj
> > > >
> > > >
> > > >
> > > >
> > > --------------------------------------------------------------
> > > -----------
> > > > Using Tomcat but need to do more? Need to support web
> > > services, security?
> > > > Get stuff done quickly with pre-integrated technology to
> > > make your job
> > > easier
> > > > Download IBM WebSphere Application Server v.1.0.1 based on
> > > Apache Geronimo
> > > >
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > > dat=121642
> > >
> > >
> > >
> >
> >
> > Aviso Legal:
> > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
> > informação confidencial ou legalmente protegida. A incorrecta
> > transmissão
> > desta mensagem não significa a perca de confidencialidade. Se
> > esta mensagem
> > for recebida por engano, por favor envie-a de volta para o remetente e
> > apague-a do seu sistema de imediato. É proibido a qualquer
> > pessoa que não o
> > destinatário de usar, revelar ou distribuir qualquer parte
> > desta mensagem.
> >
> > Disclaimer:
> > This message is destined exclusively to the intended receiver. It may
> > contain confidential or legally protected information. The incorrect
> > transmission of this message does not mean the loss of its
> > confidentiality.
> > If this message is received by mistake, please send it back
> > to the sender
> > and delete it from your system immediately. It is forbidden
> > to any person
> > who is not the intended receiver to use, distribute or copy
> > any part of this
> > message.
> >
> >
> >
> >
> > --------------------------------------------------------------
> > --------------
> > ----
> >
> >
> > >
> > >
> > --------------------------------------------------------------
> > -----------
> > > Using Tomcat but need to do more? Need to support web
> > services, security?
> > > Get stuff done quickly with pre-integrated technology to
> > make your job
> > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on
> > Apache Geronimo
> > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > >
> >
> >
> > --------------------------------------------------------------
> > --------------
> > ----
> >
> >
> > > _______________________________________________
> > > iText-questions mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > >
> >
> >
> >
> > --
> > ----------------------------------------
> > I am using the free version of SPAMfighter for private users.
> > It has removed 181 spam emails to date.
> > Paying users do not have this message in their emails.
> > Get the free SPAMfighter here: http://www.spamfighter.com/len
> >
> >
> >
> >
> >
>
>
> Aviso Legal:
> Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão
desta mensagem não significa a perca de confidencialidade. Se esta mensagem
for recebida por engano, por favor envie-a de volta para o remetente e
apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o
destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.
>
> Disclaimer:
> This message is destined exclusively to the intended receiver. It may
contain confidential or legally protected information. The incorrect
transmission of this message does not mean the loss of its confidentiality.
If this message is received by mistake, please send it back to the sender
and delete it from your system immediately. It is forbidden to any person
who is not the intended receiver to use, distribute or copy any part of this
message.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to