In Confluence Server 6.7.0, I'm using Space Tools > Content Tools > Export to export a subset of pages from a space. I'd like to manipulate what Atlassian refers to as the intermediary HTML, preferably using JavaScript.
Failing that, without requiring Confluence admin rights—I'd be okay if it only required Space admin rights—I'd like a centralized method for manipulating the original HTML source of all of the pages included in a PDF export. I don't want to have to include a macro (say, an HTML macro containing a script element) individually in each page.
As an experiment, I inserted an HTML macro containing a script into the space header (Space Tools > Look and Feel): that worked when viewing the pages in a browser, but not when exporting to PDF.
In case it occurs to you: I can't achieve what I want via CSS. At least, not via the (2.1?) CSS selectors currently supported by Confluence PDF export (Flying Saucer with iText 2.1.7; did I get that right?).