({{, (RefLink[CurrentNotebookImage, paclet:ref/CurrentNotebookImage])[nb] 
returns an image captured from the portion of the notebook nb that appears on your screen.}, {, (RefLink[CurrentNotebookImage, paclet:ref/CurrentNotebookImage])[]
returns an image captured from the notebook in which the function is evaluated.}})

OpenersNotesSection(Spacer1)Details and Options

The notebook nb must be specified by a (RefLink[NotebookObject, paclet:ref/NotebookObject]) and must currently be open.

If nb is not the active notebook, nb is momentarily selected with (RefLink[SetSelectedNotebook, paclet:ref/SetSelectedNotebook]).

The image returned may be clipped if nb extends off the screen.

(RefLink[CurrentNotebookImage, paclet:ref/CurrentNotebookImage])[] is equivalent to (RefLink[CurrentNotebookImage, paclet:ref/CurrentNotebookImage])[(RefLink[EvaluationNotebook, paclet:ref/EvaluationNotebook])[]].

(RefLink[CurrentNotebookImage, paclet:ref/CurrentNotebookImage]) always shows a rectangular display area. Any pixels that lie outside the display areas for any screen are assigned a color specified by the setting for the option (RefLink[Background, paclet:ref/Background]).

(RefLink[Rasterize, paclet:ref/Rasterize])[nb] gives an image of the complete contents of a notebook, including parts that appear offscreen.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Capture an image of the current notebook:

CurrentNotebookImage[]

Create a notebook and capture an image of it:

nb=CreateDocument[{a,b,c}];
SetSelectedNotebook[EvaluationNotebook[]];
CurrentNotebookImage[nb]

OpenersExampleSection1(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)Background  (1)

When a notebook is partially off the screen, pixels for that part of the notebook may not display and are instead (RefLink[Black, paclet:ref/Black]):

CurrentNotebookImage[]

The color of these pixels can be controlled with the option (RefLink[Background, paclet:ref/Background]):

CurrentNotebookImage[Background->Green]

OpenersExampleSection2(Spacer1)Possible Issues  (1)

If part of a notebook is off the screen, you can use (RefLink[Rasterize, paclet:ref/Rasterize]) to get the full notebook image:

CurrentNotebookImage[]

Rasterize[EvaluationNotebook[]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Rasterize, paclet:ref/Rasterize])  ▪  (RefLink[CurrentScreenImage, paclet:ref/CurrentScreenImage])  ▪  (RefLink[WindowMargins, paclet:ref/WindowMargins])  ▪  (RefLink[Import, paclet:ref/Import])  ▪  (RefLink[WebImage, paclet:ref/WebImage])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Tuning & Debugging, paclet:guide/TuningAndDebugging])}, {▪(RefLinkPlain[Creating & Importing Images, paclet:guide/CreatingAndImportingImages])}})}})