Pārlūkot izejas kodu

Tests/LibPDF: Add a test for resolving indirect refs during parsing

This test uses a JBIG2Globals with an indirect reference,
and contains an indirect reference for a stream length.
When we parse the main JBIG2 image's stream, we unfilter
its data, which causes these two indirect references to
be resolved during parsing.

I started with the output of

    Meta/jbig2_to_pdf.py -o foo.pdf \
        Tests/LibGfx/test-inputs/jbig2/bitmap.jbig2

and then manually added a

    /DecodeParms <</JBIG2Globals 6 0 R>>

entry pointing to an empty stream, and made that new stream
object's length an indirect reference too for good measure.

I used `mutool clean` to fix up offsets a bit. But that also
removes the indirect reference for a stream's length, so I
manually put that back in and adjusted the offset to the last
object in the xref table and the startxref value.
Nico Weber 1 gadu atpakaļ
vecāks
revīzija
290c9541de
1 mainītis faili ar 0 papildinājumiem un 0 dzēšanām
  1. BIN
      Tests/LibPDF/jbig2-globals.pdf

BIN
Tests/LibPDF/jbig2-globals.pdf