Description of the /AF key
Reinhard Kotucha <[email protected]> Tue, 22 Aug 2023 23:49:37 +0200
| Newsgroups | gmane.comp.tex.pdftex |
|---|---|
| Message-ID | <[email protected]> |
Hello everybody, I'm currently working on a texlua script supposed to extract embedded files from a PDF file created by pdftex and the LaTeX package embedfile. There are two ways to locate attachments: | 51 0 obj | << | /Type /Catalog | /Pages 33 0 R | /Outlines 48 0 R | /Names 50 0 R | /PageMode/UseOutlines/PageLayout/SinglePage/AF 35 0 R | /OpenAction 25 0 R | >> | endobj The most convenient way is go to obj 35 as mentioned in the line | /PageMode/UseOutlines/PageLayout/SinglePage/AF 35 0 R The /AF key points to an array with pointers to the embedded files: | 35 0 obj | [ 12 0 R 2 0 R 4 0 R 6 0 R 8 0 R 10 0 R] | endobj Another, much less convenient way, is to is to follow | /Names 50 0 R mentioned in the catalogue: | 50 0 obj | << | /Dests 49 0 R | /EmbeddedFiles 34 0 R | >> and obj 34 contains | 34 0 obj | <</Names[(../attachments)12 0 R(./embfiles/01-lpegsplit\040H\303\240\040N\341\273\231i.lua)2 0 R(embfiles/02-luafiles.zip)4 0 R(embfiles/03-luasplit.lua)6 0 R(embfiles/04-luatable.lua)8 0 R(embfiles/subdir/05-MLKspeech.pdf)10 0 R]>> | endobj As yo can see, this is more difficult to process, hence I prefer the /AF way, but I can't find any description of the /AF key in the PDF specification. Is this pdftex specific or did I miss something? Regards, Reinhard -- ------------------------------------------------------------------ Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:[email protected] ------------------------------------------------------------------