summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-11-04 16:07:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-04 16:07:25 -0700
commit04bebfe590d6d27a825b881fd234e31501843edc (patch)
tree127477b084005457579c599b2ec9eef0668a1479 /testing/resources
parent931d087b991a986cc8bfa72131fe8eda0d987fc4 (diff)
downloadpdfium-04bebfe590d6d27a825b881fd234e31501843edc.tar.xz
Implement FPDF_VIEWERREF_GetName() API.chromium/2910
This is a generic API function to retrieve any viewer preference of type name. BUG=pdfium:414 Review-Url: https://codereview.chromium.org/2475923003
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/viewer_ref.in57
-rw-r--r--testing/resources/viewer_ref.pdf82
2 files changed, 139 insertions, 0 deletions
diff --git a/testing/resources/viewer_ref.in b/testing/resources/viewer_ref.in
new file mode 100644
index 0000000000..62ae372dfe
--- /dev/null
+++ b/testing/resources/viewer_ref.in
@@ -0,0 +1,57 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /ViewerPreferences <<
+ /Foo /foo
+ /HideToolbar true
+ /Direction /R2L
+ /ViewArea /CropBox
+ /NumCopies 5
+ >>
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /Count 1
+ /Kids [
+ 3 0 R
+ ]
+>>
+endobj
+% Page number 0.
+{{object 3 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /Contents [21 0 R]
+ /MediaBox [0 0 612 792]
+>>
+endobj
+% Font resource.
+{{object 15 0}} <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Arial
+>>
+endobj
+% Content for page 0.
+{{object 21 0}} <<
+ /Length 0
+>>
+stream
+BT
+/F1 20 Tf
+100 600 TD (Page1)Tj
+ET
+endstream
+endobj
+{{xref}}
+trailer <<
+ /Size 6
+ /Root 1 0 R
+>>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/viewer_ref.pdf b/testing/resources/viewer_ref.pdf
new file mode 100644
index 0000000000..fb72107b5b
--- /dev/null
+++ b/testing/resources/viewer_ref.pdf
@@ -0,0 +1,82 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /ViewerPreferences <<
+ /Foo /foo
+ /HideToolbar true
+ /Direction /R2L
+ /ViewArea /CropBox
+ /NumCopies 5
+ >>
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /Count 1
+ /Kids [
+ 3 0 R
+ ]
+>>
+endobj
+% Page number 0.
+3 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /Contents [21 0 R]
+ /MediaBox [0 0 612 792]
+>>
+endobj
+% Font resource.
+15 0 obj <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Arial
+>>
+endobj
+% Content for page 0.
+21 0 obj <<
+ /Length 0
+>>
+stream
+BT
+/F1 20 Tf
+100 600 TD (Page1)Tj
+ET
+endstream
+endobj
+xref
+0 22
+0000000000 65535 f
+0000000015 00000 n
+0000000193 00000 n
+0000000281 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000442 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000537 00000 n
+trailer <<
+ /Size 6
+ /Root 1 0 R
+>>
+startxref
+625
+%%EOF