% !TEX TS-program = XeLaTeX 
% Commands for running this example:
% xelatex graph_09
% End of Commands
\documentclass{article}
\pagestyle{empty}
\newcommand\HR{\rule{1em}{0.4pt}}
\newcommand\bluefbox[1]{\textcolor{blue}{\setlength\fboxsep{0pt}%
                                      \fbox{\textcolor{black}{#1}}}}
\usepackage{graphicx,color}
\usepackage{xepersian}
\begin{document}
راست\HR\bluefbox{\includegraphics
     [bb=120 120 150 180]{w.pdf}}%
\HR وسط\HR
 \bluefbox{\includegraphics
     [bb=120 120 150 180,clip]{w.pdf}}%
\HR چپ
\end{document}
