External Streams & Acrobat

Introduced with PDF 1.2, the External Stream feature, broke the “all content in a PDF had to be contained inside the single .pdf file” metaphor. It was now possible to specify an external file (or in PDF 1.3, a URI) containing the data for any stream (most useful for image data, but technically supported for any stream).

The PDF reference documents (Table 3.4) the /F key for a stream’s attributes dictionary as follows:

file specification
(Optional; PDF 1.2) The file containing the stream data. If this entry is present, the bytes between stream and endstream are ignored, the filters are specified by FFilter rather than Filter, and the filter parame-
ters are specified by FDecodeParms rather than DecodeParms. However, the Length entry should still specify the number of those bytes. (Usually, there are no bytes and Length is 0.)

An example of this, for an externally referenced .jpg, would look like:

14 0 obj
<< /Type /XObject /Subtype /Image /Name /Im1 /Width 2835 /Height 2400 /BitsPerComponent 8 /ColorSpace 8 0 R /FFilter [ /DCTDecode ] /Length 0 /F << /DOS <image.jpg> >> >>
stream
endstream
endobj

NOTE: this can ONLY work for JPEG (.,jpg) files because the JFIF/JPEG format matches that expected by the DCTDecode filter - it won’t work for other types.
Sounds like a great feature - doesn’t it? Especially if you could use an URL/URI instead of an embedded image and get dynamic updates from a server - right? Well, it would, except for two things.

1. NO VERSION of Adobe Reader supports it! That means that if your users only have Reader, they won’t see anything for your image. In addition, none of the 3rd party PDF viewers support the feature either.

2. Acrobat 7.0.x (not sure which x) now has this feature OFF by default - with a preference on the Trust Manager panel to enable it either for all domains or for those you choose.

In addition, it should be noted that neither of the current ISO PDF standards (PDF/X and PDF/A) support external streams.