serenity/Tests/LibPDF
Nico Weber 290c9541de 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.
2024-03-19 19:20:01 -04:00
..
BenchmarkPDF.cpp Tests/LibPDF: Add a benchmark for SampledFunction::evaluate() 2024-02-13 19:45:19 +01:00
CMakeLists.txt Tests/LibPDF: Add a benchmark for SampledFunction::evaluate() 2024-02-13 19:45:19 +01:00
colorspaces.pdf Tests: Add a pdf file for testing color spaces 2023-11-04 17:02:37 -04:00
complex.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
encoding.pdf LibPDF: Add (automated!) test for outline encoding 2023-11-22 09:08:06 -07:00
encryption_nocopy.pdf LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
jbig2-globals.pdf Tests/LibPDF: Add a test for resolving indirect refs during parsing 2024-03-19 19:20:01 -04:00
linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
non-linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
oss-fuzz-testcase-62065.pdf LibPDF: Don't use unsanitized values in error messages 2023-10-26 11:05:32 +02:00
password-is-sup.pdf Tests/LibPDF: Add test for AES-encrypted PDF 2023-07-12 06:28:15 +02:00
pattern.pdf Tests: Add a test for LibPDF pattern rendering 2023-12-10 16:44:24 +01:00
rotate.pdf Tests: Add a pdf with text rotation 2024-01-18 14:01:30 +01:00
standard-14-fonts.pdf Tests/LibPDF: Make standard-14-fonts.pdf 200 units less high 2024-02-27 17:42:08 -05:00
TestPDF.cpp LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
text.pdf Tests/LibPDF: Make text.pdf also use Tz, Tc, Tw, Ts operators 2024-01-18 14:01:30 +01:00
type1.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
type3.pdf Tests: Add a type3 test pdf 2023-11-19 22:33:34 +01:00
wide-gamut-only.pdf Tests: Add a pdf that embeds a wide-gamut 16-bits/channel image 2024-01-12 16:20:46 -07:00