On Jun 17, 2008, at 9:30 AM, Jian hua huang wrote:
I used PdfReader.getMedata() to get XMP out a PDF file and it works fine when a PDF file is not encrypted or has no restrictions (such as No Print).

When a PDF file is encrypted or has restrictions on it, I get exception if I don’t have owner password.

That is correct, since the default (and only option until PDF 1.4) was to encrypt everything.



According to PDF Spec 1.4, if you encrypt a PDF document, you can choose to no encrypt its metadata streams. In other words, the PDF content is encrypted but metadata streams are left as plain text. I still get the exception from PdfReader.getMetadata() method if my PDF file is only encrypted on its content.

        
        As you note - YOU CAN CHOOSE...

        Most users don't make this choice (unfortunately).


Leonard

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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