How to get the content size (in pixels, width and height) of the output in an output cell?
Asked
Active
Viewed 173 times
1 Answers
7
Make this button:
Button["Get size",
Print@FrontEndExecute[
FrontEnd`ExportPacket[NotebookSelection[], "BoundingBox"]]]
Then select the output cell and press the button.
It only works when the full output cell is selected (i.e. cell bracket), not just some content within the cell.
Reference: https://mathematica.stackexchange.com/a/1411/12
You might be able to move the selection programmatically to the output cell, then use this method (without the button).
Export[..., "PNG"], a front end process will be silently started up in the background to handle the request. – Szabolcs Dec 07 '14 at 18:00