Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

Stream lengths

$
0
0
Here's a place where the specification is just flat out ambiguous (yet again, a tiny example would have resolved the problem).

If the line break character is LF, what is the length of the following stream:

stream
ABCDE
endstream

In C++: "stream\nABCDE\nendstream"

Is it 5 because the LF after streamis not counted? Is it 6, because the LF after streamis counted? The specification says that the trailing LF is not counted, but it is mute on the LF after stream.

Also, I encountered this in a file (not one of mine):

<</Length 0>>
stream

endstream

"<</Length 0>>\nstream\n\nendstream"

The above suggests that additional line breaks within a stream may not always be part of the length? If so, is does this apply to leading LFs, trailing LFs, or both?

Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>