Getting Info (title, subject, author, producer…) from PDF using javascript
问题 Im trying to learn how to use javascript inside pdf files, and how to grab information from the /Info object like author and title. I've found two ways to use js inside a pdf, and I've put together 2 samples, the first works, the second doesn't. They both execute javascript, but the second code can't access the /Info data. I can't figure out why. Sample 1 (This code shows an alert with the contents of /Title, works fine): %PDF-1.3 1 0 obj <</Type/Catalog/Pages 5 0 R/OpenAction 3 0 R>> endobj