summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-06-20 13:53:39 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-20 21:21:40 +0000
commitb5c5ec06396158232d7f6955dde7b3512df0ae6e (patch)
tree6c42a803e0761d2cb8ab1e8a8376c5ab52565b9f
parente10509a3d2a1641984845d579963d574305ea6cc (diff)
downloadpdfium-b5c5ec06396158232d7f6955dde7b3512df0ae6e.tar.xz
Add sample PDF with comboboxes.
There are three comboboxes: 1) Normal combobox with pre-selected value. 2) User editable combobox. 3) Read-only combobox, which is actually invisible. Change-Id: I6bc7955459a11bf043ace7002393c2d7ee8471e9 Reviewed-on: https://pdfium-review.googlesource.com/6770 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
-rw-r--r--testing/resources/combobox_form.in84
-rw-r--r--testing/resources/combobox_form.pdf98
2 files changed, 182 insertions, 0 deletions
diff --git a/testing/resources/combobox_form.in b/testing/resources/combobox_form.in
new file mode 100644
index 0000000000..c64f329f22
--- /dev/null
+++ b/testing/resources/combobox_form.in
@@ -0,0 +1,84 @@
+{{header}}
+{{object 1 0}}
+<<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm << /Fields [ 8 0 R 9 0 R 10 0 R ] /DR 4 0 R >>
+>>
+endobj
+{{object 2 0}}
+<< /Count 1 /Kids [ 3 0 R ] /Type /Pages >>
+endobj
+{{object 3 0}}
+<<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources 4 0 R
+ /MediaBox [ 0 0 300 300 ]
+ /Contents 7 0 R
+ /Annots [ 8 0 R 9 0 R 10 0 R ]
+>>
+endobj
+{{object 4 0}}
+<< /Font 5 0 R >>
+endobj
+{{object 5 0}}
+<< /F1 6 0 R >>
+endobj
+{{object 6 0}}
+<<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Helvetica
+>>
+{{object 7 0}}
+<< /Length 51 >>
+stream
+BT
+0 0 0 rg
+/F1 12 Tf
+100 150 Td
+(Test Form) Tj
+ET
+endstream
+endobj
+{{object 8 0}}
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 393216
+ /T (Combo_Editable)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 50 200 80 ]
+ /Subtype /Widget
+ /Opt [[(foo) (Foo)] [(bar) (Bar)] [(qux) (Qux)]]
+>>
+endobj
+{{object 9 0}}
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 131072
+ /T (Combo1)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 100 200 130 ]
+ /Subtype /Widget
+ /Opt [(Apple) (Banana) (Cherry)]
+ /V (Banana)
+>>
+{{object 10 0}}
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 131073
+ /T (Combo_ReadOnly)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 200 200 230 ]
+ /Subtype /Widget
+ /Opt [(Dog) (Elephant) (Frog)]
+>>
+endobj
+{{xref}}
+trailer<< /Size 10 /Root 1 0 R >>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/combobox_form.pdf b/testing/resources/combobox_form.pdf
new file mode 100644
index 0000000000..d543737606
--- /dev/null
+++ b/testing/resources/combobox_form.pdf
@@ -0,0 +1,98 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj
+<<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm << /Fields [ 8 0 R 9 0 R 10 0 R ] /DR 4 0 R >>
+>>
+endobj
+2 0 obj
+<< /Count 1 /Kids [ 3 0 R ] /Type /Pages >>
+endobj
+3 0 obj
+<<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources 4 0 R
+ /MediaBox [ 0 0 300 300 ]
+ /Contents 7 0 R
+ /Annots [ 8 0 R 9 0 R 10 0 R ]
+>>
+endobj
+4 0 obj
+<< /Font 5 0 R >>
+endobj
+5 0 obj
+<< /F1 6 0 R >>
+endobj
+6 0 obj
+<<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Helvetica
+>>
+7 0 obj
+<< /Length 51 >>
+stream
+BT
+0 0 0 rg
+/F1 12 Tf
+100 150 Td
+(Test Form) Tj
+ET
+endstream
+endobj
+8 0 obj
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 393216
+ /T (Combo_Editable)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 50 200 80 ]
+ /Subtype /Widget
+ /Opt [[(foo) (Foo)] [(bar) (Bar)] [(qux) (Qux)]]
+>>
+endobj
+9 0 obj
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 131072
+ /T (Combo1)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 100 200 130 ]
+ /Subtype /Widget
+ /Opt [(Apple) (Banana) (Cherry)]
+ /V (Banana)
+>>
+10 0 obj
+<<
+ /Type /Annot
+ /FT /Ch
+ /Ff 131073
+ /T (Combo_ReadOnly)
+ /DA (0 0 0 rg /F1 12 Tf)
+ /Rect [ 100 200 200 230 ]
+ /Subtype /Widget
+ /Opt [(Dog) (Elephant) (Frog)]
+>>
+endobj
+xref
+0 11
+0000000000 65535 f
+0000000015 00000 n
+0000000127 00000 n
+0000000186 00000 n
+0000000335 00000 n
+0000000368 00000 n
+0000000399 00000 n
+0000000468 00000 n
+0000000568 00000 n
+0000000772 00000 n
+0000000961 00000 n
+trailer<< /Size 10 /Root 1 0 R >>
+startxref
+1150
+%%EOF