# Make Rasterize/Export use Notebook-specific options?

Sometimes I need Notebook-specific options such as Background color or FontProperties -> "ScreenResolution". (Ref: How to set default magnification for all windows.)

This works just fine in most ways, except that when I use any of:

the Global value is used rather than the Notebook value, and the image is very different.

Here is a self-contained example:

SetOptions[$FrontEndSession, {Background -> None, FontProperties -> {"ScreenResolution" -> 96}}]; SetOptions[EvaluationNotebook[], {Background -> LightBlue, FontProperties -> {"ScreenResolution" -> 72}}]; Plot[Sinc[x], {x, 0, 10}, Epilog -> Text[Style[Sinc[x], 16], {5.5, 1/2}], ImageSize -> Small ] Rasterize[%]  Is there some way to make these export methods use the Notebook options? (I am especially concerned with the FontProperties -> "ScreenResolution" value.) ## 1 Answer The following approach seems to work: SetOptions[$FrontEndSession, {Background -> None,
FontProperties -> {"ScreenResolution" -> 96}}];

SetOptions[EvaluationNotebook[], {Background -> LightBlue,
FontProperties -> {"ScreenResolution" -> 72}}];

pl = Plot[Sinc[x], {x, 0, 10}, Epilog -> Text[Style[Sinc[x], 16], {5.5, 1/2}],
ImageSize -> Small]

Rasterize[Style[pl, Options[EvaluationNotebook[]]]]


It is possible to achieve better quality by specifying higher ImageResolution:

Rasterize[Style[pl, Options[EvaluationNotebook[]]], ImageResolution -> 200]


• I thought I tried "ScreenResolution" in Style and it didn't work which is why I emphasized that aspect. However I am thrilled to learn that it does! Thank you! I'll test this a bit further and wait 24 hours as I have made customary before accepting, but it seems to be the solution I needed. – Mr.Wizard Sep 8 '15 at 4:59