The pdfTeX manual claims that "the token list [in \pdfpageattr] is expanded when pdfTeX ships out a page" (page 32, dated 18 February 2021). However, this does not seem to be true. Here is a simple example:
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\pdfpageattr={\iffalse /Rotate 90\fi}
Hello world
\bye
The PDF page object is the following:
2 0 obj
<<
/Type /Page
/Contents 3 0 R
/Resources 1 0 R
/MediaBox [0 0 612 792]
\iffalse /Rotate 90\fi
/Parent 5 0 R
>>
endobj
Clearly, the conditional was not expanded. Incidentally, the same issue occurs with \pdfpagesattr.
Is this a bug? Or did I misinterpret the manual or do something wrong?
pdftexversions and it's always the same. – egreg Aug 10 '21 at 09:48