3
$\begingroup$

I managed to add footers and headers to my document when I print it. But there seems to be no chance to have anything other than text. How can I add a graphics like a logo or an image?

something like:

PageFooters -> {{alogohere, "a2", "a3"}, {"a4", "a5", someimagethere}}

$\endgroup$
1
  • 1
    $\begingroup$ I would avoid printing notebooks at all costs... notoriously buggy $\endgroup$
    – M.R.
    Apr 24, 2020 at 18:21

1 Answer 1

3
$\begingroup$

It seems unnecessarily complicated, but this works for me. First, grab and resize a logo.

image = ImageResize[Import["~/Mathematica/Mathematica_8_logo.png"], 50]

Define centred footers for left- and right-hand pages.

leftPageFooterCenter = 
   Cell[TextData[Cell[BoxData[ToBoxes[image]]]], "Footer", 
        CellMargins -> {{Inherited, Inherited}, {Inherited, Inherited}}];
rightPageFooterCenter = 
   Cell[TextData[Cell[BoxData[ToBoxes[image]]]], "Footer", 
        CellMargins -> {{Inherited, Inherited}, {Inherited, Inherited}}];

Set options for the notebook.

SetOptions[EvaluationNotebook[],
   PageFooters -> {
      {None, leftPageFooterCenter, None},
      {None, rightPageFooterCenter, None}
   }
]

Evaluating these and printing the notebook gives the following.

footer image

$\endgroup$
1
  • $\begingroup$ Works! Great. Thanks a lot! $\endgroup$ Apr 27, 2020 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.