diff --git a/ChangeLog b/ChangeLog index 8b2f6867..2c8499d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-05-08 Jay Berkenbilt + + * Fix 11-year-old bug of leaving unreferenced objects in preserved + object streams. Fixes #520. + 2021-04-17 Jay Berkenbilt * Portability fix: use tm_gmtoff rather than global timezone diff --git a/TODO b/TODO index 55c6a2c1..beaab0e1 100644 --- a/TODO +++ b/TODO @@ -511,9 +511,6 @@ I find it useful to make reference to them in this list. implemented, update the docs on crypto providers, which mention that this may happen in the future. - * See if we can avoid preserving unreferenced objects in object - streams even when preserving the object streams. - * Provide APIs for embedded files. See *attachments*.pdf in test suite. The private method findAttachmentStreams finds at least cases for modern versions of Adobe Reader (>= 1.7, maybe earlier). diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 689fef74..83349b48 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -2363,17 +2363,36 @@ QPDFWriter::preserveObjectStreams() { // Our object_to_object_stream map has to map ObjGen -> ObjGen // since we may be generating object streams out of old objects - // that have generation numbers greater than zero. However in an + // that have generation numbers greater than zero. However in an // existing PDF, all object stream objects and all objects in them // must have generation 0 because the PDF spec does not provide - // any way to do otherwise. + // any way to do otherwise. This code filters out objects that are + // not allowed to be in object streams. In addition to removing + // objects that were erroneously included in object streams in the + // source PDF, it also prevents unreferenced objects from being + // included. + std::set eligible; + if (! this->m->preserve_unreferenced_objects) + { + std::vector eligible_v = + QPDF::Writer::getCompressibleObjGens(this->m->pdf); + eligible = std::set(eligible_v.begin(), eligible_v.end()); + } + QTC::TC("qpdf", "QPDFWriter preserve object streams", + this->m->preserve_unreferenced_objects ? 0 : 1); std::map omap; QPDF::Writer::getObjectStreamData(this->m->pdf, omap); - for (std::map::iterator iter = omap.begin(); - iter != omap.end(); ++iter) + for (auto iter: omap) { - this->m->object_to_object_stream[QPDFObjGen((*iter).first, 0)] = - (*iter).second; + QPDFObjGen og(iter.first, 0); + if (eligible.count(og) || this->m->preserve_unreferenced_objects) + { + this->m->object_to_object_stream[og] = iter.second; + } + else + { + QTC::TC("qpdf", "QPDFWriter exclude from object stream"); + } } } diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index b6766c24..fe54a3a3 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -5060,6 +5060,27 @@ print "\n"; --> + + 10.3.2: May 8, 2021 + + + + + Bug Fixes + + + + + When generating a file while preserving object streams, + unreferenced objects are correctly removed unless + is specified. + + + + + + + 10.3.1: March 11, 2021 diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov index b2e8057f..9a15ae69 100644 --- a/qpdf/qpdf.testcov +++ b/qpdf/qpdf.testcov @@ -592,3 +592,5 @@ QPDFAcroFormDocumentHelper AP parse error 0 qpdf copy fields not this file 0 qpdf copy fields non-first from orig 0 QPDF resolve duplicated page in insert 0 +QPDFWriter preserve object streams 1 +QPDFWriter exclude from object stream 0 diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index b3f99975..5a978d30 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -986,7 +986,7 @@ my @bug_tests = ( ["106", "zlib data error", 3], ["141a", "/W entry size 0", 2], ["141b", "/W entry size 0", 2], - ["143", "self-referential ostream", 3], + ["143", "self-referential ostream", 3, "--preserve-unreferenced"], ["146", "very deeply nested array", 2], ["147", "previously caused memory error", 2], ["148", "free memory on bad flate", 2], @@ -996,14 +996,18 @@ my @bug_tests = ( ["263", "empty xref stream", 2], ["335a", "ozz-fuzz-12152", 2], ["335b", "ozz-fuzz-14845", 2], - ["fuzz-16214", "stream in object stream", 3], + ["fuzz-16214", "stream in object stream", 3, "--preserve-unreferenced"], # When adding to this list, consider adding to SEED_CORPUS_FILES # in fuzz/build.mk and updating the count in fuzz/qtest/fuzz.test. ); $n_tests += scalar(@bug_tests); foreach my $d (@bug_tests) { - my ($n, $description, $exit_status) = @$d; + my ($n, $description, $exit_status, $xargs) = @$d; + if (! defined $xargs) + { + $xargs = ""; + } if (-f "issue-$n.obfuscated") { # Some of the PDF files in the test suite trigger anti-virus @@ -1025,7 +1029,7 @@ foreach my $d (@bug_tests) { my $base = (-f "issue-$n.pdf") ? "issue-$n" : "$n"; $td->runtest($description, - {$td->COMMAND => "qpdf $base.pdf a.pdf"}, + {$td->COMMAND => "qpdf $xargs $base.pdf a.pdf"}, {$td->FILE => "$base.out", $td->EXIT_STATUS => $exit_status}, $td->NORMALIZE_NEWLINES); @@ -1304,7 +1308,8 @@ $n_tests += 2; # that in turn contains an indirect scalar (bug 2974522). $td->runtest("unreferenced indirect scalar", {$td->COMMAND => - "qpdf --qdf --static-id --object-streams=preserve" . + "qpdf --qdf --static-id --preserve-unreferenced" . + " --object-streams=preserve" . " unreferenced-indirect-scalar.pdf a.qdf"}, {$td->STRING => "", $td->EXIT_STATUS => 0}, diff --git a/qpdf/qtest/qpdf/nontrivial-crypt-filter-decrypted.pdf b/qpdf/qtest/qpdf/nontrivial-crypt-filter-decrypted.pdf index 8f3ac59e..7c5bd010 100644 Binary files a/qpdf/qtest/qpdf/nontrivial-crypt-filter-decrypted.pdf and b/qpdf/qtest/qpdf/nontrivial-crypt-filter-decrypted.pdf differ diff --git a/qpdf/qtest/qpdf/sample-form-out.pdf b/qpdf/qtest/qpdf/sample-form-out.pdf index 892b4a15..51b3fad2 100644 --- a/qpdf/qtest/qpdf/sample-form-out.pdf +++ b/qpdf/qtest/qpdf/sample-form-out.pdf @@ -5,15 +5,15 @@ 1 0 obj << /Lang (en-GB) - /Metadata 43 0 R + /Metadata 15 0 R /OpenAction [ - 45 0 R + 17 0 R /XYZ null null 0 ] - /Pages 22 0 R + /Pages 5 0 R /Type /Catalog /ViewerPreferences << /DisplayDocTitle true @@ -24,619 +24,43 @@ endobj 2 0 obj << /Type /ObjStm - /Length 16787 - /N 40 - /First 359 + /Length 6089 + /N 12 + /First 118 >> stream 3 0 -4 361 -5 492 -6 850 -7 1226 -8 1534 -9 1837 -10 3431 -11 3853 -12 4153 -13 4678 -14 4780 -15 5582 -16 6009 -17 6440 -18 6871 -19 7302 -20 7733 -21 8208 -22 8514 -23 8675 -24 8933 -25 9539 -26 9770 -27 11700 -28 11934 -29 12161 -30 12293 -31 12489 -32 12685 -33 12881 -34 13077 -35 13273 -36 13469 -37 13665 -38 13861 -39 14057 -40 14253 -41 14449 -42 16364 +4 126 +5 226 +6 385 +7 641 +8 1244 +9 1473 +10 3401 +11 3634 +12 3860 +13 3992 +14 5907 %% Object stream: object 3, index 0 << - /AP << - /N 46 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 40 - /P 45 0 R - /Rect [ - 165.7 - 453.7 - 315.7 - 467.9 - ] - /Subtype /Widget - /T (Given Name Text Box) - /TU - /Type /Annot - /V (ABC) + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R >> %% Object stream: object 4, index 1 -<< - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R ->> -%% Object stream: object 5, index 2 -<< - /AP << - /N 48 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 40 - /P 45 0 R - /Rect [ - 165.7 - 421.2 - 315.7 - 435.4 - ] - /Subtype /Widget - /T (Family Name Text Box) - /TU - /Type /Annot - /V (DEF) ->> -%% Object stream: object 6, index 3 -<< - /AP << - /N 50 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 20 - /P 45 0 R - /Rect [ - 378.4 - 388.4 - 446.9 - 402.6 - ] - /Subtype /Widget - /T (House nr Text Box) - /TU - /Type /Annot - /V () ->> -%% Object stream: object 7, index 4 -<< - /AP << - /N 52 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 40 - /P 45 0 R - /Rect [ - 165.7 - 368.4 - 315.7 - 382.6 - ] - /Subtype /Widget - /T (Address 2 Text Box) - /Type /Annot - /V ->> -%% Object stream: object 8, index 5 -<< - /AP << - /N 54 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 20 - /P 45 0 R - /Rect [ - 165.7 - 348.5 - 238.5 - 362.7 - ] - /Subtype /Widget - /T (Postcode Text Box) - /Type /Annot - /V () ->> -%% Object stream: object 9, index 6 -<< - /AP << - /N 56 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Ch - /Ff 393216 - /Opt [ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ] - /P 45 0 R - /Rect [ - 165.7 - 315.9 - 315.7 - 330.1 - ] - /Subtype /Widget - /T (Country Combo Box) - /TU - /Type /Annot - /V () ->> -%% Object stream: object 10, index 7 -<< - /AP << - /N 58 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 20 - /P 45 0 R - /Rect [ - 165.7 - 250.8 - 238 - 265 - ] - /Subtype /Widget - /T (Height Formatted Field) - /TU - /Type /Annot - /V () ->> -%% Object stream: object 11, index 8 -<< - /AP << - /N 60 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 40 - /P 45 0 R - /Rect [ - 297.1 - 348.5 - 447.2 - 362.7 - ] - /Subtype /Widget - /T (City Text Box) - /Type /Annot - /V () ->> -%% Object stream: object 12, index 9 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Yes - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Off - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 164.1 - 221.4 - 175.4 - 232.3 - ] - /Subtype /Widget - /T (Driving License Check Box) - /TU - /Type /Annot - /V /Yes ->> -%% Object stream: object 13, index 10 << /BaseFont /ZapfDingbats /Subtype /Type1 /Type /Font >> -%% Object stream: object 14, index 11 -<< - /AP << - /N 68 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Ch - /Ff 131072 - /I [ - 6 - ] - /Opt [ - - - - - - - - - - - ] - /P 45 0 R - /Rect [ - 165.7 - 143.4 - 322.8 - 157.6 - ] - /Subtype /Widget - /T (Favourite Colour List Box) - /TU - /Type /Annot - /V ->> -%% Object stream: object 15, index 12 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Off - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Off - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 57.7 - 177.6 - 69 - 188.5 - ] - /Subtype /Widget - /T (Language 1 Check Box) - /Type /Annot - /V /Off ->> -%% Object stream: object 16, index 13 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Yes - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Yes - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 154.8 - 177.6 - 166.1 - 188.5 - ] - /Subtype /Widget - /T (Language 2 Check Box) - /Type /Annot - /V /Yes ->> -%% Object stream: object 17, index 14 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Off - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Off - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 251.8 - 177.6 - 263.1 - 188.5 - ] - /Subtype /Widget - /T (Language 3 Check Box) - /Type /Annot - /V /Off ->> -%% Object stream: object 18, index 15 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Off - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Off - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 342.8 - 177.6 - 354.1 - 188.5 - ] - /Subtype /Widget - /T (Language 4 Check Box) - /Type /Annot - /V /Off ->> -%% Object stream: object 19, index 16 -<< - /AP << - /D << - /Off 62 0 R - /Yes 64 0 R - >> - /N << - /Yes 66 0 R - >> - >> - /AS /Off - /DA (0 0 0 rg /ZaDi 0 Tf) - /DR << - /Font << - /ZaDi 13 0 R - >> - >> - /DV /Off - /F 4 - /FT /Btn - /MK << - /CA (8) - >> - /P 45 0 R - /Rect [ - 439.8 - 177.6 - 451.1 - 188.5 - ] - /Subtype /Widget - /T (Language 5 Check Box) - /Type /Annot - /V /Off ->> -%% Object stream: object 20, index 17 -<< - /AP << - /N 70 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Ch - /Ff 131072 - /Opt [ - - - ] - /P 45 0 R - /Rect [ - 165.7 - 283.4 - 241.2 - 297.6 - ] - /Subtype /Widget - /T (Gender List Box) - /TU - /Type /Annot - /V ->> -%% Object stream: object 21, index 18 -<< - /AP << - /N 72 0 R - >> - /DA (0 0 0 rg /F3 11 Tf) - /DR << - /Font 4 0 R - >> - /DV - /F 4 - /FT /Tx - /MaxLen 40 - /P 45 0 R - /Rect [ - 165.7 - 388.3 - 315.7 - 402.5 - ] - /Subtype /Widget - /T (Address 1 Text Box) - /Type /Annot - /V () ->> -%% Object stream: object 22, index 19 +%% Object stream: object 5, index 2 << /Count 1 /Kids [ - 45 0 R + 17 0 R ] /MediaBox [ 0 @@ -644,10 +68,10 @@ stream 595 842 ] - /Resources 27 0 R + /Resources 10 0 R /Type /Pages >> -%% Object stream: object 23, index 20 +%% Object stream: object 6, index 3 << /Ascent 905 /CapHeight 1005 @@ -659,20 +83,20 @@ stream 2000 1006 ] - /FontFile2 74 0 R + /FontFile2 18 0 R /FontName /CAAAAA+ArialMT /ItalicAngle 0 /StemV 80 /Type /FontDescriptor >> -%% Object stream: object 24, index 21 +%% Object stream: object 7, index 4 << /BaseFont /CAAAAA+ArialMT /FirstChar 0 - /FontDescriptor 23 0 R + /FontDescriptor 6 0 R /LastChar 50 /Subtype /TrueType - /ToUnicode 76 0 R + /ToUnicode 20 0 R /Type /Font /Widths [ 750 @@ -728,7 +152,7 @@ stream 500 ] >> -%% Object stream: object 25, index 22 +%% Object stream: object 8, index 5 << /Ascent 905 /CapHeight 1005 @@ -745,12 +169,12 @@ stream /StemV 80 /Type /FontDescriptor >> -%% Object stream: object 26, index 23 +%% Object stream: object 9, index 6 << /BaseFont /ArialMT /Encoding /WinAnsiEncoding /FirstChar 32 - /FontDescriptor 25 0 R + /FontDescriptor 8 0 R /LastChar 255 /Subtype /TrueType /Type /Font @@ -981,15 +405,15 @@ stream 500 ] >> -%% Object stream: object 27, index 24 +%% Object stream: object 10, index 7 << /Encoding << - /PDFDocEncoding 41 0 R + /PDFDocEncoding 13 0 R >> /ExtGState << - /FXE1 42 0 R + /FXE1 14 0 R >> - /Font 4 0 R + /Font 3 0 R /ProcSet [ /PDF /Text @@ -1000,7 +424,7 @@ stream /XObject << >> >> -%% Object stream: object 28, index 25 +%% Object stream: object 11, index 8 << /CreationDate (D:20130629204853+02'00') /Creator (Writer) @@ -1009,191 +433,15 @@ stream /Producer (OpenOffice.org 3.4) /Title (PDF Form Example) >> -%% Object stream: object 29, index 26 +%% Object stream: object 12, index 9 << /BaseFont /Helvetica - /Encoding 41 0 R + /Encoding 13 0 R /Name /Helv /Subtype /Type1 /Type /Font >> -%% Object stream: object 30, index 27 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 31, index 28 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 32, index 29 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 33, index 30 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 34, index 31 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 35, index 32 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 36, index 33 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 37, index 34 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 38, index 35 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 39, index 36 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 40, index 37 -<< - /Encoding << - /PDFDocEncoding 41 0 R - >> - /Font 4 0 R - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> ->> -%% Object stream: object 41, index 38 +%% Object stream: object 13, index 10 << /Differences [ 24 @@ -1339,7 +587,7 @@ stream ] /Type /Encoding >> -%% Object stream: object 42, index 39 +%% Object stream: object 14, index 11 << /AIS false /BM /Normal @@ -1350,11 +598,11 @@ stream endstream endobj -43 0 obj +15 0 obj << /Subtype /XML /Type /Metadata - /Length 44 0 R + /Length 16 0 R >> stream @@ -1408,17 +656,17 @@ endstream endobj %QDF: ignore_newline -44 0 obj +16 0 obj 3352 endobj %% Page 1 -45 0 obj +17 0 obj << /Contents [ - 78 0 R - 80 0 R - 82 0 R + 22 0 R + 24 0 R + 26 0 R ] /Group << /CS /DeviceRGB @@ -1431,17 +679,17 @@ endobj 595 842 ] - /ParaLinkXML 84 0 R - /ParaXML 86 0 R - /Parent 22 0 R + /ParaLinkXML 28 0 R + /ParaXML 30 0 R + /Parent 5 0 R /Resources << /Encoding << - /PDFDocEncoding 41 0 R + /PDFDocEncoding 13 0 R >> /ExtGState << - /FXE1 42 0 R + /FXE1 14 0 R >> - /Font 4 0 R + /Font 3 0 R /ProcSet [ /PDF /Text @@ -1450,805 +698,29 @@ endobj /ImageB ] /XObject << - /Fxo1 46 0 R - /Fxo10 58 0 R - /Fxo11 66 0 R - /Fxo12 66 0 R - /Fxo13 68 0 R - /Fxo2 48 0 R - /Fxo3 72 0 R - /Fxo4 50 0 R - /Fxo5 52 0 R - /Fxo6 54 0 R - /Fxo7 60 0 R - /Fxo8 56 0 R - /Fxo9 70 0 R + /Fxo1 32 0 R + /Fxo10 34 0 R + /Fxo11 36 0 R + /Fxo12 36 0 R + /Fxo13 38 0 R + /Fxo2 40 0 R + /Fxo3 42 0 R + /Fxo4 44 0 R + /Fxo5 46 0 R + /Fxo6 48 0 R + /Fxo7 50 0 R + /Fxo8 52 0 R + /Fxo9 54 0 R >> >> /Type /Page >> endobj -46 0 obj -<< - /BBox [ - 0 - 0 - 150 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 47 0 R ->> -stream -q -Q -/Tx BMC -q -1 1 148 12.2 re -W -n -BT -0 0 0 rg -1 3.28299 Td -/FXF1 11 Tf -(ABC) Tj -ET -Q -EMC -endstream -endobj - -47 0 obj -89 -endobj - -48 0 obj -<< - /BBox [ - 0 - 0 - 150 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 49 0 R ->> -stream -q -Q -/Tx BMC -q -1 1 148 12.2 re -W -n -BT -0 0 0 rg -1 3.28299 Td -/FXF1 11 Tf -(DEF) Tj -ET -Q -EMC -endstream -endobj - -49 0 obj -89 -endobj - -50 0 obj -<< - /BBox [ - 0 - 0 - 68.5 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 51 0 R ->> -stream -q -Q -endstream -endobj - -51 0 obj -4 -endobj - -52 0 obj -<< - /BBox [ - 0 - 0 - 150 - 14.2 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 53 0 R ->> -stream -/Tx BMC -EMC -endstream -endobj - -%QDF: ignore_newline -53 0 obj -12 -endobj - -54 0 obj -<< - /BBox [ - 0 - 0 - 72.8 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 55 0 R ->> -stream -q -Q -endstream -endobj - -55 0 obj -4 -endobj - -56 0 obj -<< - /BBox [ - 0 - 0 - 150 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 57 0 R ->> -stream -q -Q -endstream -endobj - -57 0 obj -4 -endobj - -58 0 obj -<< - /BBox [ - 0 - 0 - 72.3 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 59 0 R ->> -stream -q -Q -endstream -endobj - -59 0 obj -4 -endobj - -60 0 obj -<< - /BBox [ - 0 - 0 - 150.1 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 61 0 R ->> -stream -q -Q -endstream -endobj - -61 0 obj -4 -endobj - -62 0 obj -<< - /BBox [ - 0 - 0 - 11.3 - 10.9 - ] - /FormType 1 - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /ProcSet [ - /PDF - ] - >> - /Subtype /Form - /Type /XObject - /Length 63 0 R ->> -stream -0.749023 g -0 0 11.3 10.9 re -f -endstream -endobj - -63 0 obj -30 -endobj - -64 0 obj -<< - /BBox [ - 0 - 0 - 11.3 - 10.9 - ] - /FormType 1 - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /ProcSet [ - /PDF - ] - >> - /Subtype /Form - /Type /XObject - /Length 65 0 R ->> -stream -0.749023 g -0 0 11.3 10.9 re -f -q -1 1 9.3 8.9 re -W -n -0 G -2.2 8.9 m -9.1 2 l -9.1 8.9 m -2.2 2 l -s -Q -endstream -endobj - -65 0 obj -95 -endobj - -66 0 obj -<< - /BBox [ - 0 - 0 - 11.3 - 10.9 - ] - /FormType 1 - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Type /XObject - /Length 67 0 R ->> -stream -q -1 1 9.3 8.9 re -W -n -0 G -2.2 8.9 m -9.1 2 l -9.1 8.9 m -2.2 2 l -s -Q -endstream -endobj - -67 0 obj -65 -endobj - -68 0 obj -<< - /BBox [ - 0 - 0 - 157.1 - 14.2 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 69 0 R ->> -stream -1 1 0.6 rg -0 0 156.9 14.4 re f* -/Tx BMC -BT -0 0 0 rg /F3 11 Tf -0 g -2 2.106 Td -(Blue) Tj -ET -EMC -endstream -endobj - -69 0 obj -95 -endobj - -70 0 obj -<< - /BBox [ - 0 - 0 - 75.5 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 71 0 R ->> -stream -q -Q -/Tx BMC -q -1 1 60.5 12.2 re -W -n -BT -0 0 0 rg -1 3.24501 Td -/FXF1 11 Tf -(Man) Tj -ET -Q -EMC -endstream -endobj - -71 0 obj -90 -endobj - -72 0 obj -<< - /BBox [ - 0 - 0 - 150 - 14.2 - ] - /Matrix [ - 1 - 0 - 0 - 1 - 0 - 0 - ] - /Resources << - /Encoding << - /PDFDocEncoding 41 0 R - >> - /ExtGState << - /FXE1 42 0 R - >> - /Font << - /ArialMT 26 0 R - /F2 24 0 R - /F3 26 0 R - /FXF1 26 0 R - /Helv 29 0 R - /ZaDi 13 0 R - >> - /ProcSet [ - /PDF - /Text - /ImageC - /ImageI - /ImageB - ] - /XObject << - >> - >> - /Subtype /Form - /Length 73 0 R ->> -stream -q -Q -endstream -endobj - -73 0 obj -4 -endobj - -74 0 obj +18 0 obj << /Length1 37060 - /Length 75 0 R + /Length 19 0 R >> stream true €@cmapY:.RÌcvt •Ü.Úà0fpgm bxRnglyf!ä$Å€I˜headNp7X6hheaƒþ‚XP$hmtx€¼ÃXtÐlocabø þYDjmaxp› @@ -2564,13 +1036,13 @@ endstream endobj %QDF: ignore_newline -75 0 obj +19 0 obj 37060 endobj -76 0 obj +20 0 obj << - /Length 77 0 R + /Length 21 0 R >> stream /CIDInit/ProcSet findresource begin @@ -2645,28 +1117,28 @@ end endstream endobj -77 0 obj +21 0 obj 918 endobj %% Contents for page 1 -78 0 obj +22 0 obj << - /Length 79 0 R + /Length 23 0 R >> stream q endstream endobj -79 0 obj +23 0 obj 2 endobj %% Contents for page 1 -80 0 obj +24 0 obj << - /Length 81 0 R + /Length 25 0 R >> stream q @@ -2688,14 +1160,14 @@ B* endstream endobj -81 0 obj +25 0 obj 747 endobj %% Contents for page 1 -82 0 obj +26 0 obj << - /Length 83 0 R + /Length 27 0 R >> stream @@ -2755,30 +1227,30 @@ Q endstream endobj -83 0 obj +27 0 obj 475 endobj -84 0 obj +28 0 obj << /SubType /XML /Type /ParaLinkXML - /Length 85 0 R + /Length 29 0 R >> stream endstream endobj -85 0 obj +29 0 obj 55 endobj -86 0 obj +30 0 obj << /SubType /XML /Type /ParaXML - /Length 87 0 R + /Length 31 0 R >> stream @@ -2786,28 +1258,718 @@ stream endstream endobj -87 0 obj +31 0 obj 84 endobj -88 0 obj +32 0 obj +<< + /BBox [ + 0 + 0 + 150 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 33 0 R +>> +stream +q +Q +/Tx BMC +q +1 1 148 12.2 re +W +n +BT +0 0 0 rg +1 3.28299 Td +/FXF1 11 Tf +(ABC) Tj +ET +Q +EMC +endstream +endobj + +33 0 obj +89 +endobj + +34 0 obj +<< + /BBox [ + 0 + 0 + 72.3 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 35 0 R +>> +stream +q +Q +endstream +endobj + +35 0 obj +4 +endobj + +36 0 obj +<< + /BBox [ + 0 + 0 + 11.3 + 10.9 + ] + /FormType 1 + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Type /XObject + /Length 37 0 R +>> +stream +q +1 1 9.3 8.9 re +W +n +0 G +2.2 8.9 m +9.1 2 l +9.1 8.9 m +2.2 2 l +s +Q +endstream +endobj + +37 0 obj +65 +endobj + +38 0 obj +<< + /BBox [ + 0 + 0 + 157.1 + 14.2 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 39 0 R +>> +stream +1 1 0.6 rg +0 0 156.9 14.4 re f* +/Tx BMC +BT +0 0 0 rg /F3 11 Tf +0 g +2 2.106 Td +(Blue) Tj +ET +EMC +endstream +endobj + +39 0 obj +95 +endobj + +40 0 obj +<< + /BBox [ + 0 + 0 + 150 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 41 0 R +>> +stream +q +Q +/Tx BMC +q +1 1 148 12.2 re +W +n +BT +0 0 0 rg +1 3.28299 Td +/FXF1 11 Tf +(DEF) Tj +ET +Q +EMC +endstream +endobj + +41 0 obj +89 +endobj + +42 0 obj +<< + /BBox [ + 0 + 0 + 150 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 43 0 R +>> +stream +q +Q +endstream +endobj + +43 0 obj +4 +endobj + +44 0 obj +<< + /BBox [ + 0 + 0 + 68.5 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 45 0 R +>> +stream +q +Q +endstream +endobj + +45 0 obj +4 +endobj + +46 0 obj +<< + /BBox [ + 0 + 0 + 150 + 14.2 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 47 0 R +>> +stream +/Tx BMC +EMC +endstream +endobj + +%QDF: ignore_newline +47 0 obj +12 +endobj + +48 0 obj +<< + /BBox [ + 0 + 0 + 72.8 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 49 0 R +>> +stream +q +Q +endstream +endobj + +49 0 obj +4 +endobj + +50 0 obj +<< + /BBox [ + 0 + 0 + 150.1 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 51 0 R +>> +stream +q +Q +endstream +endobj + +51 0 obj +4 +endobj + +52 0 obj +<< + /BBox [ + 0 + 0 + 150 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 53 0 R +>> +stream +q +Q +endstream +endobj + +53 0 obj +4 +endobj + +54 0 obj +<< + /BBox [ + 0 + 0 + 75.5 + 14.2 + ] + /Matrix [ + 1 + 0 + 0 + 1 + 0 + 0 + ] + /Resources << + /Encoding << + /PDFDocEncoding 13 0 R + >> + /ExtGState << + /FXE1 14 0 R + >> + /Font << + /ArialMT 9 0 R + /F2 7 0 R + /F3 9 0 R + /FXF1 9 0 R + /Helv 12 0 R + /ZaDi 4 0 R + >> + /ProcSet [ + /PDF + /Text + /ImageC + /ImageI + /ImageB + ] + /XObject << + >> + >> + /Subtype /Form + /Length 55 0 R +>> +stream +q +Q +/Tx BMC +q +1 1 60.5 12.2 re +W +n +BT +0 0 0 rg +1 3.24501 Td +/FXF1 11 Tf +(Man) Tj +ET +Q +EMC +endstream +endobj + +55 0 obj +90 +endobj + +56 0 obj << /Type /XRef - /Length 445 - /W [ 1 3 1 ] - /Info 28 0 R + /Length 228 + /W [ 1 2 1 ] + /Info 11 0 R /Root 1 0 R - /Size 89 + /Size 57 /ID [<5e0a553555622a0516e9877ca55217a6><31415926535897932384626433832795>] >> stream -ê  -    !"#$%&'BÙPbP‚StUÞUòX\XpZ†Z™\˜\¬^Â^Õ`ê`ýcc&e=ePflf€gÝgñjcjwlµlÉo5oIq^qq•¬{§â  -0 -\ p …  . Ü ð +é  +  &–&¶)§ºËºâ¾±¾Ý¿¿BÂfÂ’ĦÄ»ÅPÅdÆÆ&È‹ÈŸÊ°ÊÃÍ0ÍDÏ}Ï‘ÑöÒ +ÔÔ-Ö>ÖQØKØ_ÚpڃܕܨÞ¸ÞËá2áF endstream endobj startxref -69104 +57670 %%EOF diff --git a/qpdf/qtest/qpdf/unreferenced-indirect-scalar.out b/qpdf/qtest/qpdf/unreferenced-indirect-scalar.out index af070310..469e88b1 100644 Binary files a/qpdf/qtest/qpdf/unreferenced-indirect-scalar.out and b/qpdf/qtest/qpdf/unreferenced-indirect-scalar.out differ