summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-06-28 15:31:56 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-28 19:58:25 +0000
commit9ba8fbc02e86a6b7cb5c4142d9481ae3238c1ec4 (patch)
tree3121a73de34a92edd84b982e04b2b900a878e90c /testing
parentd4fb57a4e23ccc2e374c64ea5d5705f492fdd083 (diff)
downloadpdfium-9ba8fbc02e86a6b7cb5c4142d9481ae3238c1ec4.tar.xz
Set default graphics before generating page contents
In this CL, the content generator sets some default graphics states before processing the page objects. In particular, a default ExtGState is now set before processing, and the last CTM is now stored right after parsing finishes: the only command to change matrix is ctm, and it concatenates, so inverting requires knowing the current value. Bug: pdfium:779 Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6 Reviewed-on: https://pdfium-review.googlesource.com/7070 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/resources/bug_779.in50
-rw-r--r--testing/resources/bug_779.pdf60
2 files changed, 110 insertions, 0 deletions
diff --git a/testing/resources/bug_779.in b/testing/resources/bug_779.in
new file mode 100644
index 0000000000..f8e21a0aad
--- /dev/null
+++ b/testing/resources/bug_779.in
@@ -0,0 +1,50 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /MediaBox [ 0 0 612 792 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+{{object 3 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Contents 4 0 R
+ /Resources 5 0 R
+>>
+endobj
+{{object 4 0}} <<
+>>
+stream
+1 0 0 -1 0 792 cm
+0 0 255 RG
+255 0 0 rg
+5 w
+/GS1 gs
+q
+100 100 m
+200 200 l
+200 300 l
+b*
+endstream
+endobj
+{{object 5 0}} <<
+ /ExtGState <<
+ /GS1 6 0 R
+ >>
+>>
+endobj
+{{object 6 0}} <<
+ /Type /ExtGState
+ /CA 0.3
+ /ca 0.3
+>>
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF \ No newline at end of file
diff --git a/testing/resources/bug_779.pdf b/testing/resources/bug_779.pdf
new file mode 100644
index 0000000000..2d609045cc
--- /dev/null
+++ b/testing/resources/bug_779.pdf
@@ -0,0 +1,60 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /MediaBox [ 0 0 612 792 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+3 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Contents 4 0 R
+ /Resources 5 0 R
+>>
+endobj
+4 0 obj <<
+>>
+stream
+1 0 0 -1 0 792 cm
+0 0 255 RG
+255 0 0 rg
+5 w
+/GS1 gs
+q
+100 100 m
+200 200 l
+200 300 l
+b*
+endstream
+endobj
+5 0 obj <<
+ /ExtGState <<
+ /GS1 6 0 R
+ >>
+>>
+endobj
+6 0 obj <<
+ /Type /ExtGState
+ /CA 0.3
+ /ca 0.3
+>>
+xref
+0 7
+0000000000 65535 f
+0000000015 00000 n
+0000000068 00000 n
+0000000161 00000 n
+0000000249 00000 n
+0000000374 00000 n
+0000000431 00000 n
+trailer<< /Root 1 0 R /Size 7 >>
+startxref
+484
+%%EOF \ No newline at end of file