summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorrbpotter <rbpotter@chromium.org>2017-04-28 12:42:47 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-29 00:13:24 +0000
commitce8e51e6c444f6caaa160bf8b1decd5d7ec84e6f (patch)
tree7a5def9963d8a21b787c66892b2e523c8034ef83 /testing/resources
parent75b656a185ded6423b170546b89a945ac7aed74d (diff)
downloadpdfium-ce8e51e6c444f6caaa160bf8b1decd5d7ec84e6f.tar.xz
Normalize rotations read from PDF documents. Make FPDFPage_GetRotation always return a value 0 to 3 as specified in fpdf_edit.h instead of returning the page rotation / 90 (page rotation may be negative for some PDFs). BUG=chromium:713197 Change-Id: Ie477803f7d298b777a3ace89b21cfda8b7f6808b Reviewed-on: https://pdfium-review.googlesource.com/4532 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/bug_713197.in27
-rw-r--r--testing/resources/bug_713197.pdf34
2 files changed, 61 insertions, 0 deletions
diff --git a/testing/resources/bug_713197.in b/testing/resources/bug_713197.in
new file mode 100644
index 0000000000..49eaee2d93
--- /dev/null
+++ b/testing/resources/bug_713197.in
@@ -0,0 +1,27 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+{{object 2 0}}<<
+ /Type /Pages
+ /MediaBox [0 0 600 800]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+{{object 3 0}}<<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<>>
+ /Rotate -90
+>>
+endobj
+{{xref}}
+trailer <<
+ /Size 4
+ /Root 1 0 R
+>>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/bug_713197.pdf b/testing/resources/bug_713197.pdf
new file mode 100644
index 0000000000..571cde9d7f
--- /dev/null
+++ b/testing/resources/bug_713197.pdf
@@ -0,0 +1,34 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+2 0 obj<<
+ /Type /Pages
+ /MediaBox [0 0 600 800]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+3 0 obj<<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<>>
+ /Rotate -90
+>>
+endobj
+xref
+0 4
+0000000000 65535 f
+0000000016 00000 n
+0000000074 00000 n
+0000000171 00000 n
+trailer <<
+ /Size 4
+ /Root 1 0 R
+>>
+startxref
+260
+%%EOF