Repository navigation
Description
No way for a caller to learn about a notify-and-continue condition
ISO 32000-2 Annex I.2 (informative) describes what a PDF processor should do when it hits a
recoverable problem: "Upon the first error that is caused by encountering an unrecognised feature,
the PDF processor should notify the user that an error has occurred but that no further errors
will be reported. ... Processing should continue if possible." The reader follows the "continue"
half of that everywhere it can, but has no channel for the "notify" half — no ILogger, no event,
no diagnostics object a caller can inspect after the fact.
#373 is the motivating case: an indirect /Filter that fails to resolve is, per §7.3.10 and
§7.3.9, correctly treated as no /Filter at all, so the stream comes back unfiltered rather than
throwing. That reading is settled and #373 closes on it. But it means a document with this shape
hands back wrong-looking content (compressed bytes where the caller expected plaintext) with
nothing to tell them the reader took a spec-sanctioned shortcut instead of running the filter they
declared. Every other unresolvable object in the reader degrades to a visible null; this one
degrades to content that looks correct and isn't, and this issue is the general fix for that class
of problem, not just the one instance.
Also in scope, found alongside #373: PdfFilters.GetFilterList (src/VellumPdf.Reader/Filters.cs,
~:588-597) has two neighbouring drops that are not spec-mandated the way the null case is — they're
malformed input, not a null object:
- A
/Filterarray whose elements are not all names silently skips the non-name ones and decodes
with whatever's left. - A
/Filtervalue that's neither a name nor an array (a number, a dictionary, whatever) yields an
empty filter list — same "stream has no filter" outcome as the null case, but for a different and
arguably worse reason: the document said something is wrong, not nothing.
These three shapes — spec-mandated null, malformed array element, malformed value — currently look
identical to a caller: an unfiltered stream and no exception. They deserve to be distinguishable,
which means a vocabulary for "this condition happened" beyond a single bool.
Existing precedent
PdfDocumentReader.WasReconstructed is the one thing in the reader today that reports a
recoverable condition back to the caller — a single bool, and VellumPdf.Reader is still Preview
so its shape isn't locked. A richer diagnostics surface could grow from the same idea: one member
among several, rather than a one-off.
Origin
Found in the review round of #372 (which itself grew out of #206), where the absence of a warning
channel was identified as the common root of several findings, #373 among them. Related: #228
(nothing asserts the oracles actually ran) is the same shape of problem — a check that silently
doesn't discriminate — on the test-tooling side rather than the reader side.
Activity
Tim81 commentedon Aug 31, 2026
Found while closing #373: the ISO clause chain that settles the scalar
/Filtercase doesn'tcover one of the two malformed-input drops already listed above as in scope.
GetFilterList's array branch silently skips an element that fails to resolve:Table 5 ("Entries common to all stream dictionaries") describes
/Filteras "the name, or anarray of zero, one or several names" — nothing there sanctions a null element the way the table
does for
/DecodeParms, whose array entry is explicitly "the parameter dictionary for thatfilter, or the null object if that filter has no parameters." That asymmetry means an
unresolvable
/Filterarray element isn't the same spec-mandated-null shape as the scalar case#373 closed on; it's the malformed-array-element drop already named above, now with the Table 5
citation that pins it there rather than leaving it looking like a smaller instance of the settled
scalar case.
fix(reader): round-1 review fixes for the diagnostics channel
feat(reader): add a diagnostics channel for notify-and-continue condi…
feat(reader): add a diagnostics channel for notify-and-continue condi…
feat(reader): add a diagnostics channel for notify-and-continue condi…