From 9ba8fbc02e86a6b7cb5c4142d9481ae3238c1ec4 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 28 Jun 2017 15:31:56 -0400 Subject: Set default graphics before generating page contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: dsinclair --- testing/resources/bug_779.pdf | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 testing/resources/bug_779.pdf (limited to 'testing/resources/bug_779.pdf') 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 -- cgit v1.2.3