Skip to content

IndexError: list index out of range with dumppdf -at #1269

Description

@nikolas

Bug report

Running dumppdf -at on the attached PDF file returns this error:

Traceback (most recent call last):
  File "/usr/bin/dumppdf", line 468, in <module>
    main()
    ~~~~^^
  File "/usr/bin/dumppdf", line 454, in main
    dumppdf(
    ~~~~~~~^
        outfp,
        ^^^^^^
    ...<7 lines>...
        show_fallback_xref=args.show_fallback_xref,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/bin/dumppdf", line 278, in dumppdf
    dumpallobjs(outfp, doc, codec, show_fallback_xref)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/dumppdf", line 140, in dumpallobjs
    dumpxml(out, obj, codec=codec)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/dumppdf", line 76, in dumpxml
    data = obj.get_data()
  File "/usr/lib/python3/dist-packages/pdfminer/pdftypes.py", line 401, in get_data
    self.decode()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/pdfminer/pdftypes.py", line 386, in decode
    data = apply_png_predictor(
        pred,
    ...<3 lines>...
        data,
    )
  File "/usr/lib/python3/dist-packages/pdfminer/utils.py", line 215, in apply_png_predictor
    prior_x = int(line_above[j])
                  ~~~~~~~~~~^^^
IndexError: list index out of range

allabout.pdf

I am using the python3-pdfminer Debian package version 20260107+dfsg-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions