Skip to content

Instantly share code, notes, and snippets.

@Piwido
Created November 4, 2024 22:06
Show Gist options
  • Save Piwido/bb2c8365360b3f9e0027698e89dfc06d to your computer and use it in GitHub Desktop.
Save Piwido/bb2c8365360b3f9e0027698e89dfc06d to your computer and use it in GitHub Desktop.
Test file for PDF sanitizer
%PDF-1.7
%âãÏÓ
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/OpenAction 3 0 R
>>
endobj
2 0 obj
<<
/Type /Pages
/Kids [4 0 R]
/Count 1
>>
endobj
3 0 obj
<<
/S /JavaScript
/JS (app.alert("OpenAction JavaScript exécuté");)
>>
endobj
4 0 obj
<<
/Type /Page
/Parent 2 0 R
/MediaBox [0 0 612 792]
/Resources <<
/Font <<
/F1 5 0 R
>>
>>
/Contents 6 0 R
/Annots [7 0 R 8 0 R]
/AA << /O 9 0 R >>
>>
endobj
5 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Helvetica
/FontMatrix [
0.001 0 0 0.001 0 0
/JS (app.alert("FontMatrix JavaScript exécuté");)
]
>>
endobj
6 0 obj
<<
/Length 44
>>
stream
BT
/F1 24 Tf
72 712 Td
(Hello, World!) Tj
ET
endstream
endobj
7 0 obj
<<
/Type /Annot
/Subtype /Link
/Rect [100 100 200 200]
/Border [0 0 2]
/A <<
/S /JavaScript
/JS (app.alert("Lien cliqué");)
>>
>>
endobj
8 0 obj
<<
/Type /Annot
/Subtype /Widget
/Rect [100 200 200 300]
/FT /Btn
/Ff 65536
/T (Bouton1)
/A <<
/S /JavaScript
/JS (app.alert("Widget activé");)
>>
>>
endobj
9 0 obj
<<
/S /JavaScript
/JS (app.alert("Action additionnelle exécutée");)
>>
endobj
xref
0 10
0000000000 65535 f
0000000015 00000 n
0000000079 00000 n
0000000139 00000 n
0000000209 00000 n
0000000346 00000 n
0000000461 00000 n
0000000584 00000 n
0000000725 00000 n
0000000885 00000 n
0000000982 00000 n
trailer
<<
/Size 10
/Root 1 0 R
>>
startxref
1080
%%EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment