The ID is just that - a unique ID for each document, regardless of  
content.   For any two documents that are NOT actual copies - the ID  
should be different.

In addition, PDF is NOT designed to be "binary compatible" when  
creating a document from the same content.  There are many variables  
that can be introduced that will cause objects to be ordered  
differently, named differently, etc.

Perhaps if you explained WHY you need things to work this way - we  
can give you more guidance.

Leonard

On Apr 22, 2008, at 3:32 PM, kan wrote:

> Hi, everyone!
>
> I'm using the library to generate PDF. I've found the library
> generates different document even if content is absolutely the same. I
> examined the library source code and found a reason. This is an ID
> field in a trailer of each document. Somewhere inside PdfWriter there
> is code:
> fileID = PdfEncryption.createInfoId(PdfEncryption.createDocumentId());
> and createDocumentId() generates different id based on some random
> stuff like milliseconds, etc.
>
> I want to have ability to generate documents which are binary equal if
> they have same content, but that random ID prevents it. Is there any
> proper way to avoid it? What is that field for? Can I just comment it
> out in library source code? Does it break anything? Or maybe is there
> better way?
>
> -- 
> WBR, kan.
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http:// 
> java.sun.com/javaone
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
>


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to