pdftoppm produces single pixel .png from PDF with wrong T value in linearization dictionary
Running pdftoppm 22.03.0 on baddictionary.pdf like:
pdftoppm -cropbox -f 1 -l 1 -r 100 -png baddictionary.pdf output
...gives errors that include:
Syntax Error: Failed to parse XRef entry [11].
Syntax Error: Top-level pages object is wrong type (none)
...and produces a single pixel output .png, see: output-1
The issue with this PDF is that it has a slightly wrong T value in its linearization dictionary, which is:
/T 36628
The T value is supposed to point to the newline before the first entry in the xref table (so 36637), but instead points to "xref."
Poppler 0.63.0 had instead dealt with this issue by printing out something like:
Syntax Error: Failed to parse XRef entry [11].
Internal Error: xref num 11 not found but needed, try to reconstruct<0a>
...and then proceeding as normal from there, generating a correct image. That seems like much better behavior.