Oscar,

mkl wrote:
> 
> 
> OscarP wrote:
>> 
>> OK, I'm attaching a signed PDF and the code I'm using to obtain the
>> revision. But the first revision obtained with this code contains the
>> signature field. How can I obtain a revision without the signature field?
>> 
>> [...]
>> 
>>  http://www.nabble.com/file/p23649098/firmado2vecesOk.pdf
>> firmado2vecesOk.pdf 
>> 
> 
> I just used vi and head, tools available on the phone... I searched the
> prior %EOF marker and extracted the file part up to there: simply take the
> leading 32895 bytes of your signed file --- that should be the unsigned
> revision.
> 

Now being back in office and having an Acrobat at hands, I see that I was
off-by-one: The outermost signature was added to the revision consisting of
the first 32896 bytes of your file (
http://www.nabble.com/file/p23667389/firmado.pdf firmado.pdf ).

This revision in turn is signed, too, the signature having been applied to
the revision consisting of the first 11277 bytes (
http://www.nabble.com/file/p23667389/small.pdf small.pdf ).

The revisions managed by AcroFields.java revision methods only contain those
revisions genuinely signed in addition to only the revision circumpassing
the whole PDF file if it is not already among those genuinely signed ones.

Code that actually wants to walk _all_ revisions has to analyze the %%EOF
markers, startxref offset, trailer /Prev values, offsets of the first
indirect objects after an %%EOF, and signature byte ranges. It has to
consider the effects of linearized initial documents (containing an
additional trailer and cross reference) and the effects of possibly mixed
cross reference tables and streams. Not too easy, I think.

Regards, Michael.
-- 
View this message in context: 
http://www.nabble.com/Signature-PDF.-How-obtain-Original-PDF-tp23620527p23667389.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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/

Reply via email to