Edit, I found out how to do it, but it is not rendering the notebook style correctly for some reason
:(
Export[FileNameJoin[{NotebookDirectory[], "image.jpg"}], SelectedNotebook[]]
Edit: Andrew Lewis of the Wolfram Technical Support team confirmed the bug and provided me this work-around using WebExecute (tested on WL version 14.0):
:)
(* 1. Export as html *) exp=NotebookDirectory[]; Export[exp<>"test.html",NotebookObject[style (2).nb]]; (* 2. Open the exported .html using the web browser driver *) session=StartWebSession["Firefox",Visible->False]; WebExecute[session,"OpenPage"->"file://"<>exp<>"test.html"]; (* 3. Use the web browser driver to take a screenshot *) width=WebExecute[session,"JavascriptExecute"->"return document.documentElement.scrollWidth"]; height=WebExecute[session,"JavascriptExecute"->"return document.documentElement.scrollHeight"]; WebExecute[session,"SetWindowSize"->{width,height}]; webpageImage=WebExecute[session,"CapturePage"]; (* 4. Save the screenshot *) Export[exp<>"screenshot.png",webpageImage];
Notebooks[], then export one of the itmes to pdf or png etc. See my answer mathematica.stackexchange.com/a/231071/72111 $\endgroup$