summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/bug_492_1.in
diff options
context:
space:
mode:
authortonikitoo <tonikitoo@igalia.com>2016-08-26 14:41:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-26 14:41:29 -0700
commit0ee35908e906922a423fb18d7085ef80d0d8d8c8 (patch)
tree83921c5170c6a361b2317901f01d8d8928921282 /testing/resources/javascript/bug_492_1.in
parentb7fb1fd087cfe20cfc29cabc80af2c11e91538c6 (diff)
downloadpdfium-0ee35908e906922a423fb18d7085ef80d0d8d8c8.tar.xz
Add support to Document::getAnnots method
Although notably, the parameters handling support is not complete, CL intends to be the first step towards a more complete implementation of this API. TEST=testing/resources/javascript/bug_492_1.in BUG=pdfium:492 Review-Url: https://codereview.chromium.org/2281273002
Diffstat (limited to 'testing/resources/javascript/bug_492_1.in')
-rw-r--r--testing/resources/javascript/bug_492_1.in95
1 files changed, 95 insertions, 0 deletions
diff --git a/testing/resources/javascript/bug_492_1.in b/testing/resources/javascript/bug_492_1.in
new file mode 100644
index 0000000000..f2b03b01bc
--- /dev/null
+++ b/testing/resources/javascript/bug_492_1.in
@@ -0,0 +1,95 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /OpenAction 20 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /Count 2
+ /Kids [
+ 10 0 R
+ 11 0 R
+ ]
+>>
+endobj
+% Page number 0.
+{{object 10 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ ]
+ /Tabs /R
+>>
+endobj
+% Page number 1.
+{{object 11 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ ]
+ /Tabs /C
+>>
+endobj
+
+% OpenAction action
+{{object 20 0}} <<
+ /Type /Action
+ /S /JavaScript
+ /JS 21 0 R
+>>
+endobj
+% JS program to exexute
+{{object 21 0}} <<
+>>
+stream
+ var annots = this.getAnnots();
+ for (var i = 0; i < annots.length; i++)
+ app.alert(annots[i].name);
+endstream
+endobj
+
+{{object 22 0}} <<
+ /Type /Annot
+ /Subtype /Highlight
+ /QuadPoints [
+ 115.80264
+ 718.9139232
+ 157.211172
+ 718.9139232
+ 115.80264
+ 706.26441
+ 6
+ 157.211172
+ 706.264416
+ ]
+ /Rect [ 115.75062 706.328568 157.001868 719.2715904 ]
+ /F 4
+ /Border [ 0 0 1 ]
+ /C [ 1 1 0 ]
+ /CA 1
+ /Contents <feff>
+ /M (D:20160712221733)
+ /NM (annot_s_name)
+ /P 9 0 R
+ /T <feff004a006100650020004800790075006e0020005000610072006b>
+>>
+endobj
+
+{{xref}}
+trailer <<
+ /Root 1 0 R
+>>
+{{startxref}}
+%%EOF