I would like to display the following header on of each page of an exported pdf
specificTitle XXX
XXX should be the page number while specificTitle should be a custom title that I would like to be able to set in the Front End Cells.
Currently I am using the following code to the add the Page header. Unfortunately I can't seem to figure out a way to set the title while in the notebook front end. EDIT: To help clarify I am looking to not necessarily have separate titles on each page, but have a way to set different titles for each group of pages.
SetOptions[EvaluationNotebook[],
PrintingOptions -> {"FirstPageHeader" -> True},
PrintingStartingPageNumber -> 1,
PageHeaders -> {
{Cell[TextData[{CounterBox["Page"]}], "PageNumber"], None, None},
{None, None, Cell[TextData[{CounterBox["Page"]}], "PageNumber"]}
},
PageFooters -> {{None, None, None}, {None, None, None}}
];
Originally I planed to use Dynamic cell inside the PageHeaders like so
Cell[BoxData[
DynamicBox[ToBoxes[$CellContext`a, StandardForm]]], "Output"]
And then I planned to set a at different points throughout the notebook. It becomes clear if you render this that each page of the pdf isn't rendered separately but instead the entire notebook is rendered(and executed) then the notebook is converted to a pdf. This makes sense but makes my current approach impractical.



PageBreakAboveandPageBreakBelowoptions to force a pagebreak. – Silvia Jan 02 '14 at 05:56