pdf-association / arlington-pdf-model

A vendor- and implementation-independent specification-derived, machine-readable model of PDF.
Apache License 2.0
77 stars 6 forks source link

DL field in HalfToneType6 #21

Closed faceless2 closed 2 years ago

faceless2 commented 2 years ago

HalfToneType6 and other stream-based halftones have

DL integer 1.5 FALSE FALSE FALSE [fn:Eval(fn:StreamLength(DL)==(@Width * @Height))]

But DL isn't a real field, at least not in ISO32000 2008 or 2020.

I'm guessing this is a placeholder to mean something like "decompressed length" and is meant to refer to the number of bytes that can be read from the stream after decompression? I can't find a magic definition of DL anywhere.

In which case a related question, as DL is only used with fn:StreamLength: you've also defined fn:StreamLength as

Uses the value of the streams' /Length key, rather than reading and decoding actual streams.

If you needed the number of compressed bytes (and I can't think of anywhere this is required) couldn't you just use @Length for this?

petervwyatt commented 2 years ago

DL is a very real key that was introduced in PDF 1.5. It is the last row of "Table 5 — Entries common to all stream dictionaries" in both ISO 32000-1:2008 and ISO 32000-2:2020. It is thus applicable to every PDF stream... I assume you missed seeing that?

faceless2 commented 2 years ago

Well I did say I'd make some errors... I did indeed miss that, thanks. And I'll switch to the extensions branch as you've suggested.