summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-06-12 20:27:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-12 20:27:35 +0000
commit6eb7939300d1bc7c31afd5086c1b93d4a7628481 (patch)
treecda239de969cb7a3c0477d9f8e67bf33b207b693 /testing/resources
parentef9fe9ed8a00be4a1788228cfa5df303e34d4d73 (diff)
downloadpdfium-6eb7939300d1bc7c31afd5086c1b93d4a7628481.tar.xz
Fill m_ContentStream field in CPDF_PageObject.
From the comment of CPDF_PageObject::GetContentStream(): """ Get what content stream the object was parsed from in its page. This number is the index of the content stream in the "Contents" array, or 0 if there is a single content stream. If the object is newly created, -1 is returned. If the object is spread among more than one content stream, this is the index of the last one. """ Bug: pdfium:1051 Change-Id: I9f7804af4f263dda0422e9542e025e3320ff7c31 Reviewed-on: https://pdfium-review.googlesource.com/34250 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/split_streams.in124
-rw-r--r--testing/resources/split_streams.pdf142
2 files changed, 266 insertions, 0 deletions
diff --git a/testing/resources/split_streams.in b/testing/resources/split_streams.in
new file mode 100644
index 0000000000..b13476936b
--- /dev/null
+++ b/testing/resources/split_streams.in
@@ -0,0 +1,124 @@
+{{header}}
+{{object 1 0}}
+<< /Pages 2 0 R /Type /Catalog >>
+endobj
+{{object 2 0}}
+<< /Count 1 /Kids [ 3 0 R ] /MediaBox [ 0 0 200 200 ] /Type /Pages >>
+endobj
+{{object 3 0}}
+<<
+ /Contents 4 0 R
+ /Parent 2 0 R
+ /Resources <<
+ /ExtGState << /FXE1 5 0 R /FXE2 6 0 R >>
+ /Font << /F1 7 0 R /F2 8 0 R /FXF1 9 0 R /FXF2 10 0 R >>
+ >>
+ /Type /Page
+>>
+endobj
+{{object 4 0}}
+[ 12 0 R 13 0 R 14 0 R ]
+endobj
+{{object 5 0}}
+<< /BM /Normal /CA 1 /ca 1 >>
+endobj
+{{object 6 0}}
+<< /ca 0.705882 >>
+endobj
+{{object 7 0}}
+<< /BaseFont /Times-Roman /Subtype /Type1 /Type /Font >>
+endobj
+{{object 8 0}}
+<< /BaseFont /Helvetica /Subtype /Type1 /Type /Font >>
+endobj
+{{object 9 0}}
+<< /BaseFont /Courier-Bold /Subtype /Type1 /Type /Font >>
+endobj
+{{object 10 0}}
+<< /BaseFont /Times-Bold /Subtype /Type1 /Type /Font >>
+endobj
+{{object 12 0}}
+<< {{streamlen}} >>
+stream
+q
+0 0 0 RG 0 0 0 rg 1 w 0 J 0 j
+/FXE1 gs
+q 0 0 0 rg /FXE2 gs BT 1 0 0 1 120 100 Tm /FXF1 9 Tf (Test 1) Tj ET Q
+q 0 0 0.0509804 rg /FXE2 gs
+BT 0.995597 -0.341789 0.341789 0.995597 119.912 93.1642
+Tm /FXF2 9 Tf (Test 2) Tj ET Q
+q 0 0 0.101961 rg /FXE2 gs
+BT 0.872208 -0.678867 0.678867 0.872208 117.444 86.4227
+Tm /FXF1 9 Tf (Test 3) Tj ET Q
+q 0 0 0.156863 rg /FXE2 gs
+BT 0.633308 -0.969351 0.969351 0.633308 112.666 80.613
+Tm /FXF2 9 Tf (Test 4) Tj ET Q
+q 0 0 0.207843 rg /FXE2 gs
+BT 0.297167 -1.17348 1.17348 0.297167 105.943 76.5303
+Tm /FXF1 9 Tf (Test 5) Tj ET Q
+q 0 0 0.262745 rg /FXE2 gs
+BT -0.104311 -1.25884 1.25884 -0.104311 97.9138 74.8231
+Tm /FXF2 9 Tf (Test 6) Tj ET Q
+q 0 0 0.313726 rg /FXE2 gs
+BT -0.528547 -1.20496 1.20496 -0.528547 89.4291 75.9007
+Tm /FXF1 9 Tf (Test 7) Tj ET Q
+q 0 0 0.364706 rg /FXE2 gs
+BT -0.926806 -1.00678 1.00678 -0.926806 81.4639 79.8644
+Tm /FXF2 9 Tf (Test 8) Tj ET Q
+q 0 0 0.419608 rg /FXE2 gs
+BT -1.24978 -0.676346 0.676346 -1.24978 75.0044 86.4731
+Tm /FXF1 9 Tf (Test 9) Tj ET Q
+q 0 0 0.470588 rg /FXE2 gs
+BT -1.45359 -0.24256 0.24256 -1.45359 70.9283 95.1488
+Tm /FXF2 9 Tf (Test 10) Tj ET Q
+q 0 0 0.52549 rg /FXE2 gs
+BT -1.5055 0.251223 -0.251223 -1.5055 69.89 105.024
+Tm /FXF1 9 Tf (Test 11) Tj ET Q
+q 0 0 0.576471 rg /FXE2 gs
+BT -1.38864 0.751496 -0.751496 -1.38864 72.2271 115.03
+Tm /FXF2 9 Tf (Test 12) Tj ET Q
+q 0 0 0.631373 rg /FXE2 gs
+BT -1.10504 1.20039 -1.20039 -1.10504 77.8992 124.008
+Tm /FXF1 9 Tf (Test 13) Tj ET Q
+q 0 0 0.682353 rg /FXE2 gs
+BT -0.67654 1.54236 -1.54236 -0.67654 86.4692 130.847
+Tm /FXF2 9 Tf (Test 14) Tj ET Q
+q 0 0 0.733333 rg /FXE2 gs
+BT -0.143427 1.73091 -1.73091 -0.143427 97.1315 134.618
+Tm /FXF1 9 Tf (Test 15) Tj ET Q
+endstream
+endobj
+
+{{object 13 0}}
+<< {{streamlen}} >>
+stream
+q 0 0 0.788235 rg /FXE2 gs
+BT 0.43929 1.73472 -1.73472 0.43929 108.786 134.694
+Tm /FXF2 9 Tf (Test 16) Tj ET Q
+q 0 0 0.839216 rg /FXE2 gs
+BT 1.00754 1.54215 -1.54215 1.00754 120.151 130.843
+Tm /FXF1 9 Tf (Test 17) Tj ET Q
+q 0 0 0.894118 rg /FXE2 gs
+BT 1.49521 1.16377 -1.16377 1.49521 129.904 123.275
+Tm /FXF2 9 Tf (Test 18) Tj ET Q
+endstream
+endobj
+
+{{object 14 0}}
+<< {{streamlen}} >>
+stream
+q 0 0 0.945098 rg /FXE2 gs
+BT 1.84185 0.632309 -0.632309 1.84185 136.837 112.646
+Tm /FXF1 9 Tf (Test 19) Tj ET Q
+Q
+endstream
+endobj
+
+{{xref}}
+trailer <<
+ /Root 1 0 R
+ /Size 15
+ /ID [<f341ae654a77acd5065a7645e596e6e6><bc37298a3f87f479229bce997ca791f7>]
+>>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/split_streams.pdf b/testing/resources/split_streams.pdf
new file mode 100644
index 0000000000..d1768caa28
--- /dev/null
+++ b/testing/resources/split_streams.pdf
@@ -0,0 +1,142 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj
+<< /Pages 2 0 R /Type /Catalog >>
+endobj
+2 0 obj
+<< /Count 1 /Kids [ 3 0 R ] /MediaBox [ 0 0 200 200 ] /Type /Pages >>
+endobj
+3 0 obj
+<<
+ /Contents 4 0 R
+ /Parent 2 0 R
+ /Resources <<
+ /ExtGState << /FXE1 5 0 R /FXE2 6 0 R >>
+ /Font << /F1 7 0 R /F2 8 0 R /FXF1 9 0 R /FXF2 10 0 R >>
+ >>
+ /Type /Page
+>>
+endobj
+4 0 obj
+[ 12 0 R 13 0 R 14 0 R ]
+endobj
+5 0 obj
+<< /BM /Normal /CA 1 /ca 1 >>
+endobj
+6 0 obj
+<< /ca 0.705882 >>
+endobj
+7 0 obj
+<< /BaseFont /Times-Roman /Subtype /Type1 /Type /Font >>
+endobj
+8 0 obj
+<< /BaseFont /Helvetica /Subtype /Type1 /Type /Font >>
+endobj
+9 0 obj
+<< /BaseFont /Courier-Bold /Subtype /Type1 /Type /Font >>
+endobj
+10 0 obj
+<< /BaseFont /Times-Bold /Subtype /Type1 /Type /Font >>
+endobj
+12 0 obj
+<< /Length 1699 >>
+stream
+q
+0 0 0 RG 0 0 0 rg 1 w 0 J 0 j
+/FXE1 gs
+q 0 0 0 rg /FXE2 gs BT 1 0 0 1 120 100 Tm /FXF1 9 Tf (Test 1) Tj ET Q
+q 0 0 0.0509804 rg /FXE2 gs
+BT 0.995597 -0.341789 0.341789 0.995597 119.912 93.1642
+Tm /FXF2 9 Tf (Test 2) Tj ET Q
+q 0 0 0.101961 rg /FXE2 gs
+BT 0.872208 -0.678867 0.678867 0.872208 117.444 86.4227
+Tm /FXF1 9 Tf (Test 3) Tj ET Q
+q 0 0 0.156863 rg /FXE2 gs
+BT 0.633308 -0.969351 0.969351 0.633308 112.666 80.613
+Tm /FXF2 9 Tf (Test 4) Tj ET Q
+q 0 0 0.207843 rg /FXE2 gs
+BT 0.297167 -1.17348 1.17348 0.297167 105.943 76.5303
+Tm /FXF1 9 Tf (Test 5) Tj ET Q
+q 0 0 0.262745 rg /FXE2 gs
+BT -0.104311 -1.25884 1.25884 -0.104311 97.9138 74.8231
+Tm /FXF2 9 Tf (Test 6) Tj ET Q
+q 0 0 0.313726 rg /FXE2 gs
+BT -0.528547 -1.20496 1.20496 -0.528547 89.4291 75.9007
+Tm /FXF1 9 Tf (Test 7) Tj ET Q
+q 0 0 0.364706 rg /FXE2 gs
+BT -0.926806 -1.00678 1.00678 -0.926806 81.4639 79.8644
+Tm /FXF2 9 Tf (Test 8) Tj ET Q
+q 0 0 0.419608 rg /FXE2 gs
+BT -1.24978 -0.676346 0.676346 -1.24978 75.0044 86.4731
+Tm /FXF1 9 Tf (Test 9) Tj ET Q
+q 0 0 0.470588 rg /FXE2 gs
+BT -1.45359 -0.24256 0.24256 -1.45359 70.9283 95.1488
+Tm /FXF2 9 Tf (Test 10) Tj ET Q
+q 0 0 0.52549 rg /FXE2 gs
+BT -1.5055 0.251223 -0.251223 -1.5055 69.89 105.024
+Tm /FXF1 9 Tf (Test 11) Tj ET Q
+q 0 0 0.576471 rg /FXE2 gs
+BT -1.38864 0.751496 -0.751496 -1.38864 72.2271 115.03
+Tm /FXF2 9 Tf (Test 12) Tj ET Q
+q 0 0 0.631373 rg /FXE2 gs
+BT -1.10504 1.20039 -1.20039 -1.10504 77.8992 124.008
+Tm /FXF1 9 Tf (Test 13) Tj ET Q
+q 0 0 0.682353 rg /FXE2 gs
+BT -0.67654 1.54236 -1.54236 -0.67654 86.4692 130.847
+Tm /FXF2 9 Tf (Test 14) Tj ET Q
+q 0 0 0.733333 rg /FXE2 gs
+BT -0.143427 1.73091 -1.73091 -0.143427 97.1315 134.618
+Tm /FXF1 9 Tf (Test 15) Tj ET Q
+endstream
+endobj
+
+13 0 obj
+<< /Length 333 >>
+stream
+q 0 0 0.788235 rg /FXE2 gs
+BT 0.43929 1.73472 -1.73472 0.43929 108.786 134.694
+Tm /FXF2 9 Tf (Test 16) Tj ET Q
+q 0 0 0.839216 rg /FXE2 gs
+BT 1.00754 1.54215 -1.54215 1.00754 120.151 130.843
+Tm /FXF1 9 Tf (Test 17) Tj ET Q
+q 0 0 0.894118 rg /FXE2 gs
+BT 1.49521 1.16377 -1.16377 1.49521 129.904 123.275
+Tm /FXF2 9 Tf (Test 18) Tj ET Q
+endstream
+endobj
+
+14 0 obj
+<< /Length 115 >>
+stream
+q 0 0 0.945098 rg /FXE2 gs
+BT 1.84185 0.632309 -0.632309 1.84185 136.837 112.646
+Tm /FXF1 9 Tf (Test 19) Tj ET Q
+Q
+endstream
+endobj
+
+xref
+0 15
+0000000000 65535 f
+0000000015 00000 n
+0000000064 00000 n
+0000000149 00000 n
+0000000345 00000 n
+0000000385 00000 n
+0000000430 00000 n
+0000000464 00000 n
+0000000536 00000 n
+0000000606 00000 n
+0000000679 00000 n
+0000000000 65535 f
+0000000751 00000 n
+0000002503 00000 n
+0000002888 00000 n
+trailer <<
+ /Root 1 0 R
+ /Size 15
+ /ID [<f341ae654a77acd5065a7645e596e6e6><bc37298a3f87f479229bce997ca791f7>]
+>>
+startxref
+3055
+%%EOF