by Mark Gavin
Recently I have received several PDF documents which contain compressed object streams. Object Streams are described in section 7.5.7 of ISO-32000-1; and, are a mechanism of storing a collection of indirect Cos Objects together inside of a Cos Stream.
This Cos Stream; of Type “ObjStm” may or may not be compressed. Though, it would be pointless not to compress the stream.
Object Streams became available starting with PDF 1.5; and, therein lies the reason for this blog posting. Every one of the files with Object Streams, to cross my desk recently, has a version number of “PDF 1.4”.
The purpose of the PDF Version Number is to specify what PDF features may be present in a given PDF file.
When a PDF file contains Object Streams; the PDF Version number must be set to %PDF-1.5 or greater; otherwise, the PDF is malformed.
So, why is properly setting the PDF version number important?
In a nutshell; properly setting the PDF version number improves the performance and reliability of software used to read the PDF file.
Update: December 22, 2008
Today I received yet another malformed PDF file which contains compressed object streams; but, in this case the version number on this particular file is set to 1.3. It appears some PDF developers are simply not reading ISO-32000-1 or even the old PDF Reference.