pdfium/testing/resources/javascript/bug_421304870.in
Wang Yongjie 83f4169f7f Fixed a return value error in CJS_Document::getAnnots.
The function incorrectly returned the number of pages. After the fix, it
returns the total number of annotations across all pages.

Bug: 421304870
Change-Id: I923dfa5b9cabf7d37bdc75a1cb2f41e90d60c9c5
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135230
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2025-09-03 11:19:47 -07:00

58 lines
738 B
Plaintext

{{header}}
{{object 1 0}} <<
/Type /Catalog
/Pages 2 0 R
/OpenAction 7 0 R
>>
endobj
{{object 2 0}} <<
/Type /Pages
/MediaBox [0 0 400 400]
/Kids [3 0 R]
/Count 1
>>
endobj
{{object 3 0}} <<
/Type /Page
/Parent 2 0 R
/Annots [4 0 R 5 0 R 6 0 R]
>>
endobj
{{object 4 0}} <<
/Type /Annot
/Subtype /Text
/Rect [100 100 200 200]
/Contents (Hello Annotation_1)
>>
endobj
{{object 5 0}} <<
/Type /Annot
/Subtype /Popup
/Parent 4 0 R
/Rect [200 200 300 300]
>>
endobj
{{object 6 0}} <<
/Type /Annot
/Subtype /Widget
/Rect [300 300 400 400]
>>
endobj
{{object 7 0}} <<
/Type /Action
/S /JavaScript
/JS (app.alert(this.getAnnots().length);)
>>
endobj
{{xref}}
{{trailer}}
{{startxref}}
%%EOF