Voici une solution (il faut compiler deux fois)
fois).
\documentclass[border=5cm]{standalone}
\makeatletter
\AtEndDocument{%
\setlength{\@tempdima}{.1\dimexpr\paperwidth-\sa@border@left-\sa@border@right\relax}%
\@settopoint{\@tempdima}%
\immediate\write\@mainaux{%
\gdef\string\sa@border@left{\the\@tempdima}%
\gdef\string\sa@border@right{\the\@tempdima}%
}%
\setlength{\@tempdima}{.1\dimexpr\paperheight-\sa@border@top-\sa@border@bottom\relax}%
\@settopoint{\@tempdima}%
\immediate\write\@mainaux{%
\gdef\string\sa@border@top{\the\@tempdima}%
\gdef\string\sa@border@bottom{\the\@tempdima}%
}%
}
\makeatother
\begin{document}
\rule{200pt}{10pt}
\end{document}