Is the trailer element always required in a PDF document?

I have recently encountered documents without the trailer (IOException "trailer not found" when instantiating PdfReader).

In the past, the "save as" feature of Acrobat produced a PDF with the trailer.

Now I am using Acrobat 9 and the "save as" does not add the trailer (at least to the files I am encountering at the moment).

Looking at the PDF specification at http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf (I hope this is the right location), I see at the end of section 7.5.8.1 the following:

"The value following the startxref keyword shall be the offset of the cross-reference stream rather than the xrefkeyword. For files that use cross-reference streams entirely (that is, files that are not hybrid-reference files; see 7.5.8.4, "Compatibility with Applications That Do Not Support Compressed Reference Streams"), the keywords xref and trailer shall no longer be used. Therefore, with the exception of the startxref address %%EOFsegment and comments, a file may be entirely a sequence of objects."

I am in no way a PDF expert, so I don't know whether this is apropos to this situation or not, but I am trying to do homework before asking for help :-)

I can not supply the PDF I received, due to its confidential content.
I have, however, edited it with Acrobat 9 to remove all the content I could see, then saved it ("save as") to a file called test-saved-from-acrobat-9.pdf, which I am attaching.

So, does anyone know more about this, i.e. whether in this situation it really is legitimate that the trailer is omitted?

And if so, is there a way to deal with this in iText? I am currently using iText 2.1.4.

<<inline: test-saved-from-acrobat-9.pdf>>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing 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
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