I have 2 cases here. First case, I want to set the paper size to the size of $\displaystyle E=mc^2$ and second case it is set to the size of \fbox{$\displaystyle E=mc^2$}.
Unfortunately, in both cases I got outputs that got cropped at the top and bottom.
Note: The gray frame in the following screenshot is not a part of my drawing. Instead it is the background color of Adobe Reader X.
Case 1: Without using \fbox
\documentclass[cmyk]{minimal}
\usepackage{pstricks}
\newsavebox\IBox
\savebox\IBox{$\displaystyle E=mc^2$}
\newdimen\mywidth
\newdimen\myheight
\mywidth=\wd\IBox
\myheight=\ht\IBox
\paperwidth=\mywidth
\paperheight=\myheight
\voffset=-1in
\hoffset=-1in
\topskip=0bp
\special{papersize=\the\mywidth,\the\myheight}
\parindent=0cm
\pagecolor{cyan}
\begin{document}
\begin{pspicture}(\mywidth,\myheight)
\psframe[linecolor=red](\mywidth,\myheight)
\rput[lb](0,0){\usebox{\IBox}}
\end{pspicture}
\end{document}

Note: The top and bottom parts get cropped.
Case 2: Using \fbox
\documentclass[cmyk]{minimal}
\usepackage{pstricks}
\newsavebox\IBox
\savebox\IBox{\fbox{$\displaystyle E=mc^2$}}
\newdimen\mywidth
\newdimen\myheight
\mywidth=\wd\IBox
\myheight=\ht\IBox
\paperwidth=\mywidth
\paperheight=\myheight
\voffset=-1in
\hoffset=-1in
\topskip=0bp
\special{papersize=\the\mywidth,\the\myheight}
\parindent=0cm
\pagecolor{cyan}
\begin{document}
\begin{pspicture}(\mywidth,\myheight)
%\psframe[linecolor=red](\mywidth,\myheight)
\rput(0.5\mywidth,0.5\myheight){\usebox{\IBox}}
\end{pspicture}
\end{document}

Note: The top and bottom parts get cropped.
Questions:
How to increase the
accuracy of \newsavebox? Is it possible?
